diff --git a/dygraph/utils/utils.py b/dygraph/utils/utils.py index fa995d27af3f78e97bc06d586fa7bb2ecf439f83..3d4fc62e63a511c129118e42784a6275e6e08856 100644 --- a/dygraph/utils/utils.py +++ b/dygraph/utils/utils.py @@ -88,6 +88,7 @@ def resume(model, optimizer, resume_model): if resume_model is not None: logging.info('Resume model from {}'.format(resume_model)) if os.path.exists(resume_model): + resume_model = os.path.normpath(resume_model) ckpt_path = os.path.join(resume_model, 'model') para_state_dict, opti_state_dict = fluid.load_dygraph(ckpt_path) model.set_dict(para_state_dict)