Skip to content

Commit

Permalink
Fix runtime bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DubiousCactus committed May 31, 2024
1 parent 2f551e8 commit e1fd196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _train_val_iteration(
x, y = batch
y_hat = self._model(x)
losses: Dict[str, torch.Tensor] = self._training_loss(y, y_hat)
loss: torch.Tensor = torch.sum(torch.tensor([v for v in losses.values()]))
loss: torch.Tensor = sum(list(losses.values())) # type: ignore
return loss, losses

def _train_epoch(
Expand Down

0 comments on commit e1fd196

Please sign in to comment.