Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
Dataset
  • Loading branch information
Zi-YuanYang authored Mar 19, 2024
1 parent 2bf70da commit 461f9cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def fit(epoch, model, data_loader, phase='training'):
epoch_loss, epoch_accuracy = fit(epoch, net, data_loader_train, phase='training')
# print('finish')

val_epoch_loss, val_epoch_accuracy = fit(epoch, net, data_loader_test, phase='testing')
val_epoch_loss, val_epoch_accuracy = fit(epoch, net, data_loader_train, phase='testing')

scheduler.step()

Expand Down Expand Up @@ -419,4 +419,4 @@ def fit(epoch, model, data_loader, phase='training'):

print('------------\n')
print('Best')
test(best_net)
test(best_net)

0 comments on commit 461f9cc

Please sign in to comment.