Skip to content

Commit

Permalink
update best_norm_ED setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ku21fan authored Dec 28, 2019
1 parent 307e776 commit 8645108
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 @@ -131,7 +131,7 @@ def train(opt):

start_time = time.time()
best_accuracy = -1
best_norm_ED = 1e+6
best_norm_ED = -1
i = start_iter

while(True):
Expand Down Expand Up @@ -191,7 +191,7 @@ def train(opt):
if current_accuracy > best_accuracy:
best_accuracy = current_accuracy
torch.save(model.state_dict(), f'./saved_models/{opt.experiment_name}/best_accuracy.pth')
if current_norm_ED < best_norm_ED:
if current_norm_ED > best_norm_ED:
best_norm_ED = current_norm_ED
torch.save(model.state_dict(), f'./saved_models/{opt.experiment_name}/best_norm_ED.pth')
best_model_log = f'{"Best_accuracy":17s}: {best_accuracy:0.3f}, {"Best_norm_ED":17s}: {best_norm_ED:0.2f}'
Expand Down

0 comments on commit 8645108

Please sign in to comment.