From 307e776a11c0aaf94204d1bb2560f63371a217c0 Mon Sep 17 00:00:00 2001 From: Baek JeongHun Date: Fri, 27 Dec 2019 11:01:01 +0000 Subject: [PATCH] FT start iter update --- train.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index c814294..7bb13cc 100755 --- a/train.py +++ b/train.py @@ -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