提交 03dc7639 编写于 作者: J jinyuKing

add hapi/simnet_model

上级 c138701d
......@@ -18,17 +18,7 @@ softmax loss
import sys
sys.path.append("../")
import paddle.fluid as fluid
from hapi.model import Loss
'''
class SoftmaxCrossEntropyLoss(Loss):
def __init__(self,conf_dict):
super(SoftmaxCrossEntropyLoss,self).__init__()
def forward(self,input,label):
cost=fluid.layers.cross_entropy(input=input,label=label)
avg_cost=fluid.layers.reduce_mean(cost)
return avg_cost
'''
from paddle.incubate.hapi.loss import Loss
class SoftmaxCrossEntropyLoss(Loss):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册