未验证 提交 bd67368c 编写于 作者: L littletomatodonkey 提交者: GitHub

Merge pull request #130 from littletomatodonkey/fix_lsb

fix one hot problem
......@@ -39,6 +39,8 @@ class Loss(object):
one_hot_target = target
soft_target = fluid.layers.label_smooth(
label=one_hot_target, epsilon=self._epsilon, dtype="float32")
soft_target = fluid.layers.reshape(
soft_target, shape=[-1, self._class_dim])
return soft_target
def _crossentropy(self, input, target):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册