当前位置:网站首页>MindSpore:【model_zoo】【resnet】尝试用THOR优化器运行时报cannot import name ‘THOR‘
MindSpore:【model_zoo】【resnet】尝试用THOR优化器运行时报cannot import name ‘THOR‘
2022-08-04 09:03:00 【小乐快乐】
问题描述:
【功能模块】
https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/resnet
框架版本是 mindspore-ascend 1.1.1
【操作步骤&问题现象】
1、在src/config.py中指定"optimizer": "Thor"
2、cd scripts/ && bash run_standalone_train.sh resnet50 cifar10 /home/data_set/cifar-10-batches-bin
3、
查看日志:
[email protected]:/home/thor/mindspore/model_zoo/official/cv/resnet/scripts# cat train/log
WARNING: 'ControlDepend' is deprecated from version 1.1 and will be removed in a future version, use 'Depend' instead.
Traceback (most recent call last):
File "train.py", line 21, in <module>
from mindspore.nn.optim import Momentum, THOR
ImportError: cannot import name 'THOR' from 'mindspore.nn.optim' (/usr/local/python3.7.5/lib/python3.7/site-packages/mindspore/nn/optim/__init__.py)
【截图信息】
解决方案:
通过检查发现问题应该时脚本代码和MindSpore版本不匹配,因为从MindSpore1.2版本开始才有THOR优化器,1.1版本还没有
边栏推荐
- 线程和进程之间的区别
- How many assertion methods are commonly used in JMeter?
- OAK-FFC-4P全网首次测试
- 速速脱单诀窍
- Explanation of spark operator
- 记录十条工作中便利的API小技巧
- ShuffleNet v2 network structure reproduction (Pytorch version)
- 发现WRH几个表被锁了,怎么办?
- Shared_preload_libraries cause many syntaxes not supported
- 已解决No module named ‘flask_misaka‘【BUG解决】
猜你喜欢
Interview at 14:00 in the afternoon, I came out at 14:08 with my head down, asking too much...
Anton Paar安东帕密度计比重计维修DMA35性能参数
ShuffleNet v2 network structure reproduction (Pytorch version)
PD 源码分析- Checker: region 健康卫士
TiDB升级与案例分享(TiDB v4.0.1 → v5.4.1)
Detailed explanation of NAT/NAPT address translation (internal and external network communication) technology [Huawei eNSP]
如何快速将Zabbix5.0升级至6.0?
.NET深入解析LINQ框架(五:IQueryable、IQueryProvider接口详解)
反序列化漏洞
我和 TiDB 的故事 | TiDB 对我不离不弃,我亦如此
随机推荐
VRRP+MSTP配置详解【华为eNSP实验】
2022年化工自动化控制仪表考试模拟100题及模拟考试
华为od项目
王爽汇编语言第四章:第一个程序
ansible部署脚本--亲测可用无坑
三层交换机/路由器OSPF配置详解【华为eNSP实验】
【Attention】Dual Attention(DANet) & Fully Attention(FLA)
他97年的,我既然卷不过他...
Quick tips for getting out of a single
TiFlash 源码阅读(五) DeltaTree 存储引擎设计及实现分析 - Part 2
菲沃泰科创板上市:市值123亿 宗坚赵静艳夫妇身价76亿
[STM32] STM32F103 series name and package, memory
蘑菇书EasyRL学习笔记
csdn图片去水印 | 其他方法无效时的解决方案
Cloud function to achieve automatic website check-in configuration details [Web function/Nodejs/cookie]
交换机链路聚合详解【华为eNSP】
Get the number of cpu cores
cannot import name 'import_string' from 'werkzeug' [bug solution]
GBsae 8 c database using an error, how to do?
已解决No module named ‘flask_misaka‘【BUG解决】