Browse Source

!10612 delete meta

From: @caozhou_huawei
Reviewed-by: @changzherui,@zh_qh,@zhunaipan
Signed-off-by: @zhunaipan
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
dd3fd238e0
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      mindspore/train/callback/_checkpoint.py

+ 2
- 0
mindspore/train/callback/_checkpoint.py View File

@@ -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)


Loading…
Cancel
Save