335 Star 1.5K Fork 858

MindSpore / docs

 / 详情

Advanced usage of checkpoint.

DONE
Task-Tracking
创建于  
2020-12-08 21:05
name about labels
Task Welcome to all developers!

Task Description

There are many ways to use checkpoints during training and fine-tuning tasks.
You can summarize some advanced ways to use it to help other developers to complete training tasks using MindSpore.

The basic checkpoint tutorial can refer to the official website checkpoint tutorial.
For details about how to use function save checkpoint, please refer to checkpoint.
This task is not affected by the environment and can be executed on the Ascend\GPU\CPU.

Please refer to Document Writing Specifications.

Task Goal

Write checkpoint advanced tutorials.
Then submit the tutorial to https://gitee.com/mindspore/docs/tree/master/tutorials/training/source_zh_cn/advanced_use/advanced_usage_of_checkpoint.md and submit the complete sample code to https://gitee.com/mindspore/docs/tree/master/tutorials/tutorial_code/advanced_usage_of_checkpoint.

Sub Task

The tutorial must contain the following contents:

  1. Do not use the callback function during model.train, call save_checkpoint function to save the checkpoint file.

    net = resnet()
    save_checkpoint(net, "resnet.ckpt")
    
  2. Filter the specified parameter prefix during checkpoint loading. (use load_checkpoint)

    param_dict = load_checkpoint("resnet.ckpt", filter_prefix="conv1")
    
  3. Save parameters in the user-defined network (such as sub-network or an optimizer) as a checkpoint file.

    config = CheckpointConfig(saved_network=net)
    ckpoint_cb = ModelCheckpoint(prefix='LeNet5', config=config)
    model.train(10, dataset, callbacks=ckpoint_cb)
    

Level

Difficult

评论 (0)

changzherui 创建了RFC
changzherui 计划截止日期设置为2020-12-31
changzherui 负责人设置为changzherui
changzherui 里程碑设置为IT-ME-TODO
changzherui 计划开始日期设置为2020-12-08
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
wangnan39 关联项目MindSpore Iteration Management 修改为未设置
wangnan39 里程碑IT-ME-TODO 修改为未设置
changzherui 任务类型RFC 修改为Task-Tracking
changzherui 修改了描述
changzherui 关联仓库设置为MindSpore/docs
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了标题
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
changzherui 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 添加了
 
mindspore-contrib
标签
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 负责人changzherui 修改为未设置
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 修改了描述
TingWang 任务状态TODO 修改为DONE
展开全部操作日志

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(1)
7347217 changzherui 1584948547
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs

搜索帮助