Skip to content

Commit

Permalink
printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Oct 2, 2023
1 parent 71213c8 commit dd2178a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def validate_epoch(model, loader, criterion, device):

for epoch in range(num_epochs):
train_loss, train_acc = train_epoch(model, train_loader, optimizer, criterion, device)
print(train_loss, train_acc)

val_loss, val_acc = validate_epoch(model, val_loader, criterion, device)
print(val_loss, val_acc)

print(f"Epoch: {epoch+1}/{num_epochs}, Train Loss: {train_loss:.4f}, Train Acc: {train_acc:.4f}, Val Loss: {val_loss:.4f}, Val Acc: {val_acc:.4f}")

Expand Down

0 comments on commit dd2178a

Please sign in to comment.