Skip to content

Commit adb0834

Browse files
Check for more than just falsy lr
1 parent ca068f1 commit adb0834

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imagenet/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def main_worker(gpu, ngpus_per_node, args):
215215
best_acc1 = best_acc1.to(args.gpu)
216216
model.load_state_dict(checkpoint['state_dict'])
217217
optimizer.load_state_dict(checkpoint['optimizer'])
218-
if args.lr:
218+
if args.lr != parser.get_default('lr'):
219219
# resume with newly specified learning rate
220220
optimizer.param_groups[0]['lr'] = args.lr
221221
scheduler.load_state_dict(checkpoint['scheduler'])

0 commit comments

Comments
 (0)