Skip to content

Commit

Permalink
fix warning about potential uninitialized variable
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandra Antonova <[email protected]>
  • Loading branch information
bene-ges committed Dec 4, 2023
1 parent e196bca commit 6507eba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def on_validation_epoch_end(self):
split = "test" if self.trainer.testing else "val"
if split == 'val':
avg_loss = torch.stack([x[f'{split}_loss'] for x in self.validation_step_outputs]).mean()
elif split == 'test':
else:
avg_loss = torch.stack([x[f'{split}_loss'] for x in self.test_step_outputs]).mean()

# Calculate metrics and classification report
Expand Down

0 comments on commit 6507eba

Please sign in to comment.