From a795464fb1a42dda719866e3579b671b916f938b Mon Sep 17 00:00:00 2001 From: caozhou Date: Sat, 26 Dec 2020 20:17:33 +0800 Subject: [PATCH] delete meta in r1.1 --- mindspore/train/callback/_checkpoint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mindspore/train/callback/_checkpoint.py b/mindspore/train/callback/_checkpoint.py index 5cbfaa0358..46580ecaf2 100644 --- a/mindspore/train/callback/_checkpoint.py +++ b/mindspore/train/callback/_checkpoint.py @@ -275,6 +275,8 @@ class ModelCheckpoint(Callback): # save graph (only once) if not self._graph_saved: graph_file_name = os.path.join(self._directory, self._prefix + '-graph.meta') + if os.path.isfile(graph_file_name): + os.remove(graph_file_name) _save_graph(cb_params.train_network, graph_file_name) self._graph_saved = True self._save_ckpt(cb_params)