Closed ming197 closed 2 years ago
Hi - thanks for spotting the issue! The args of these loss functions were intended to keep the order of outputs
, targets
, weights
. We did not carefully check the released code, but it has been updated now (a6fdc45d45c04e6f5c40f43925bc66e580911084).
In loss.py, "weights" is the last parameter in function of weighted_huber_loss or weighted_focal
but in train.py,
loss = globals()[f"weighted_{args.loss}_loss"](outputs, targets, weights)
no atrribute name for weights
maybe it should be
loss = globals()[f"weighted_{args.loss}_loss"](outputs, targets, weights = weights)
or it would make mistakes when using huber + LDS or focal + LDS