Skip to content
Snippets Groups Projects
Commit 0acd4190 authored by andres's avatar andres
Browse files

fixing bug in training where val_loss was not being logged

parent 9d6350b1
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ def train_model(model: nn.Module, train_loader: DataLoader, valid_loader: DataLo
# Update metrics
with torch.autocast(device_type=device):
metric_aggregator.step(y_hat_prob=y_hat_prob, y=y, loss=loss, epoch=torch.tensor(epoch+1), lr=lr, phase="valid")
metric_aggregator.step(y_hat_prob=y_hat_prob, y=y, loss=val_loss, epoch=torch.tensor(epoch+1), lr=lr, phase="valid")
# Compute and log metrics
with torch.autocast(device_type=device):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment