fix ce loss with label smooth
@@ -48,4 +48,5 @@ class CELoss(nn.Layer):
else:
soft_label = False
loss = F.cross_entropy(x, label=label, soft_label=soft_label)
+ loss = loss.mean()
return {"CELoss": loss}
