avoid getting undefined
parent
89ba0da910
commit
7a6369156f
|
@ -136,8 +136,8 @@ def resume_checkpoint(
|
||||||
if 'version' in checkpoint and checkpoint['version'] > 1:
|
if 'version' in checkpoint and checkpoint['version'] > 1:
|
||||||
resume_epoch += 1 # start at the next epoch, old checkpoints incremented before save
|
resume_epoch += 1 # start at the next epoch, old checkpoints incremented before save
|
||||||
|
|
||||||
if log_info:
|
if log_info:
|
||||||
_logger.info("Loaded checkpoint '{}' (epoch {})".format(checkpoint_path, checkpoint['epoch']))
|
_logger.info("Loaded checkpoint '{}' (epoch {})".format(checkpoint_path, checkpoint['epoch']))
|
||||||
else:
|
else:
|
||||||
model.load_state_dict(checkpoint)
|
model.load_state_dict(checkpoint)
|
||||||
if log_info:
|
if log_info:
|
||||||
|
|
Loading…
Reference in New Issue