提交 858963b4 编写于 作者: W wangxiao

fix a bug

上级 56f73f88
...@@ -79,8 +79,8 @@ class TaskParadigm(task_paradigm): ...@@ -79,8 +79,8 @@ class TaskParadigm(task_paradigm):
initializer=fluid.initializer.Constant(0.))) initializer=fluid.initializer.Constant(0.)))
if self._is_training: if self._is_training:
ce_loss, probs = fluid.layers.cross_entropy( ce_loss = fluid.layers.cross_entropy(
input=logits, label=labels, return_softmax=True) input=logits, label=labels)
loss = fluid.layers.mean(x=ce_loss) loss = fluid.layers.mean(x=ce_loss)
return {'loss': loss} return {'loss': loss}
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册