fix combined loss

This commit is contained in:
LDOUBLEV 2021-07-06 08:16:01 +00:00
parent 48898ac357
commit 9811a09e93
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ class CombinedLoss(nn.Layer):
for key in loss:
if key == "loss":
loss_all += loss[key] * weight
# else:
# loss[f"{key}_{idx}"] = loss[key]
else:
loss["{}_{}".format(key, idx)] = loss[key]
# loss[f"{key}_{idx}"] = loss[key]
loss_dict.update(loss)
loss_dict["loss"] = loss_all
return loss_dict