Update celoss.py

pull/2486/head
cuicheng01 2022-11-14 21:39:55 +08:00 committed by GitHub
parent e5771019e5
commit 2e41b5de5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -51,7 +51,6 @@ class CELoss(nn.Layer):
loss = paddle.sum(x * label, axis=-1)
else:
if label.shape[-1] == x.shape[-1]:
label = F.softmax(label, axis=-1)
soft_label = True
else:
soft_label = False