Double Scaling Bug Fix (#282)

remove duplicate scaling.
This commit is contained in:
Alexander Kristoffersen authored and GitHub committed 2022-08-16 13:25:41 -07:00
1 parent 6879a8a9bd
commit 261f1f3344
1 file changed
-4
-4
View File
@@ -175,10 +175,6 @@ class Model(nn.Module):
outputs=outputs, batch=batch, metrics_dict=metrics_dict, loss_coefficients=self.loss_coefficients
)
# scaling losses by coefficients.
for loss_name in loss_dict.keys():
if loss_name in self.loss_coefficients:
loss_dict[loss_name] *= self.loss_coefficients[loss_name]
return outputs, loss_dict, metrics_dict
def get_metrics_dict(self, outputs, batch) -> Dict[str, torch.Tensor]: