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 78fc04726f1a0977a87396c7c0ef02082efb852e..9b2cc2625b9de393f2d27cf3c84b5f59397936b8 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 dc4848e1872805f99426f8cd7ec15baa30b076c2..7ebf822df2e4333984497e0a1e3dba9f32fea5e7 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文件。