diff --git a/examples/similarity_net/nets/losses/softmax_cross_entropy_loss.py b/examples/similarity_net/nets/losses/softmax_cross_entropy_loss.py index b410040f114292b0b102ce5ab703f9cb839ad6b5..9701538bca26bdf6df92792b9de47fe9748c8e49 100644 --- a/examples/similarity_net/nets/losses/softmax_cross_entropy_loss.py +++ b/examples/similarity_net/nets/losses/softmax_cross_entropy_loss.py @@ -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):