diff --git a/train.py b/train.py index 5402f707..5915848a 100644 --- a/train.py +++ b/train.py @@ -411,7 +411,7 @@ if __name__ == '__main__': parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset') parser.add_argument('--freeze-layers', action='store_true', help='Freeze non-output layers') opt = parser.parse_args() - opt.weights = last if opt.resume else opt.weights + opt.weights = last if opt.resume and not opt.weights else opt.weights check_git_status() opt.cfg = check_file(opt.cfg) # check file opt.data = check_file(opt.data) # check file