mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
support for paddle1.8
This commit is contained in:
parent
bcc373db98
commit
a55f826683
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user