From ba103336bc34679a00798bb56f123bd5a467fe3a Mon Sep 17 00:00:00 2001 From: changzherui Date: Fri, 24 Jul 2020 00:15:49 +0800 Subject: [PATCH] modify ckpt doc --- tutorials/source_en/use/saving_and_loading_model_parameters.md | 1 + .../source_zh_cn/use/saving_and_loading_model_parameters.md | 1 + 2 files changed, 2 insertions(+) diff --git a/tutorials/source_en/use/saving_and_loading_model_parameters.md b/tutorials/source_en/use/saving_and_loading_model_parameters.md index 78fc04726f..9b2cc2625b 100644 --- a/tutorials/source_en/use/saving_and_loading_model_parameters.md +++ b/tutorials/source_en/use/saving_and_loading_model_parameters.md @@ -60,6 +60,7 @@ In the preceding code, initialize a `TrainConfig` class object to set the saving `save_checkpoint_steps` indicates the saving frequency. That is, parameters are saved every specified number of steps. `keep_checkpoint_max` indicates the maximum number of CheckPoint files that can be saved. `prefix` indicates the prefix name of the generated CheckPoint file. `directory` indicates the directory for storing the file. Create a `ModelCheckpoint` object and transfer it to the model.train method. Then you can use the CheckPoint function during training. +If you want to delete the `.ckpt` file, please delete the `.meta` file simultaneously. Generated CheckPoint files are as follows: diff --git a/tutorials/source_zh_cn/use/saving_and_loading_model_parameters.md b/tutorials/source_zh_cn/use/saving_and_loading_model_parameters.md index dc4848e187..7ebf822df2 100644 --- a/tutorials/source_zh_cn/use/saving_and_loading_model_parameters.md +++ b/tutorials/source_zh_cn/use/saving_and_loading_model_parameters.md @@ -72,6 +72,7 @@ model.train(epoch_num, dataset, callbacks=ckpoint_cb) 如果用户使用相同的前缀名,运行多次训练脚本,可能会生成同名CheckPoint文件。 MindSpore为方便用户区分每次生成的文件,会在用户定义的前缀后添加"_"和数字加以区分。 +如果想要删除`.ckpt`文件时,请同步删除`.meta` 文件。 例:`resnet50_3-2_32.ckpt` 表示运行第3次脚本生成的第2个epoch的第32个step的CheckPoint文件。 -- Gitee