ms 报错 ";ValueError: Please input the correct checkpoint
·
1. 系统环境:
Hardware Environment(Ascend/GPU/CPU): ALL
Software Environment:
MindSpore version (source or binary): 1.7.0 & Earlier versions
Python version (e.g., Python 3.7.5): 3.7.6
OS platform and distribution (e.g., Linux Ubuntu 16.04): Ubuntu
GCC/Compiler version (if compiled from source):
复制
2. python代码样例
net = Net()
param_dict = load_checkpoint("error.ckpt")
复制
3. 报错信息:
ValueError: For 'load_checkpoint', the checkpoint file: /home/error.ckpt does not exist, please check whether the 'ckpt_file_name' is correct.
复制
4. 原因分析
报错信息为:加载checkpoint时,没有找到脚本中指定的文件。
加载checkpoint时,会去找load_checkpoint方法中ckpt_file_name参数指定的文件。
如果没有找到这个文件,会报ValueError错误。
5. 解决方法
报错信息中,会把指定文件的绝对路径打印出来,可以根据打印出的信息,查看系统上有没有这个文件。
6. 参考文档
checkpoint 用法可以参考: 保存与加载
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐

所有评论(0)