提交 905eebb1 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!287 change ckpoint_file_name to ckpt_file_name

Merge pull request !287 from chenzhongming/master
......@@ -87,7 +87,7 @@ To perform on-device model inference using MindSpore, perform the following step
### Generating an On-Device Model File
1. After training is complete, load the generated checkpoint file to the defined network.
```python
param_dict = load_checkpoint(ckpoint_file_name=ckpt_file_path)
param_dict = load_checkpoint(ckpt_file_name=ckpt_file_path)
load_param_into_net(net, param_dict)
```
2. Call the `export` API to export the `.ms` model file on the device.
......@@ -145,7 +145,7 @@ if __name__ == '__main__':
is_ckpt_exist = os.path.exists(ckpt_file_path)
if is_ckpt_exist:
param_dict = load_checkpoint(ckpoint_file_name=ckpt_file_path)
param_dict = load_checkpoint(ckpt_file_name=ckpt_file_path)
load_param_into_net(net, param_dict)
export(net, input_data, file_name="./lenet.ms", file_format='LITE')
print("export model success.")
......
......@@ -86,7 +86,7 @@ MindSpore进行端侧模型推理的步骤如下。
### 生成端侧模型文件
1. 加载训练完毕所生成的CheckPoint文件至定义好的网络中。
```python
param_dict = load_checkpoint(ckpoint_file_name=ckpt_file_path)
param_dict = load_checkpoint(ckpt_file_name=ckpt_file_path)
load_param_into_net(net, param_dict)
```
2. 调用`export`接口,导出端侧模型文件(`.ms`)。
......@@ -144,7 +144,7 @@ if __name__ == '__main__':
is_ckpt_exist = os.path.exists(ckpt_file_path)
if is_ckpt_exist:
param_dict = load_checkpoint(ckpoint_file_name=ckpt_file_path)
param_dict = load_checkpoint(ckpt_file_name=ckpt_file_path)
load_param_into_net(net, param_dict)
export(net, input_data, file_name="./lenet.ms", file_format='LITE')
print("export model success.")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册