FT start iter update

This commit is contained in:
Baek JeongHun 2019-12-27 11:01:01 +00:00
parent 6a55be4d91
commit 307e776a11
1 changed files with 5 additions and 2 deletions

View File

@ -123,8 +123,11 @@ def train(opt):
""" start training """ """ start training """
start_iter = 0 start_iter = 0
if opt.saved_model != '': if opt.saved_model != '':
start_iter = int(opt.saved_model.split('_')[-1].split('.')[0]) try:
print(f'continue to train, start_iter: {start_iter}') start_iter = int(opt.saved_model.split('_')[-1].split('.')[0])
print(f'continue to train, start_iter: {start_iter}')
except:
pass
start_time = time.time() start_time = time.time()
best_accuracy = -1 best_accuracy = -1