update best_norm_ED setting

This commit is contained in:
Baek JeongHun 2019-12-28 14:29:11 +09:00 committed by GitHub
parent 307e776a11
commit 8645108824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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):
@ -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}'