Skip to content

Commit

Permalink
FT start iter update
Browse files Browse the repository at this point in the history
  • Loading branch information
Baek JeongHun committed Dec 27, 2019
1 parent 6a55be4 commit 307e776
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ def train(opt):
""" start training """
start_iter = 0
if opt.saved_model != '':
start_iter = int(opt.saved_model.split('_')[-1].split('.')[0])
print(f'continue to train, start_iter: {start_iter}')
try:
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()
best_accuracy = -1
Expand Down

0 comments on commit 307e776

Please sign in to comment.