support for paddle1.8

This commit is contained in:
WuHaobo 2020-05-14 20:18:17 +08:00
parent bcc373db98
commit a55f826683

View File

@ -34,7 +34,7 @@ class Loss(object):
def _labelsmoothing(self, target):
if target.shape[-1] != self._class_dim:
one_hot_target = fluid.layers.one_hot(
one_hot_target = fluid.one_hot(
input=target, depth=self._class_dim)
else:
one_hot_target = target