99 Star 796 Fork 1.4K

MindSpore / models

 / 详情

[Bug]: AdderQuant can not load pretrained weights and can not run

TODO
创建于  
2024-05-13 11:54

问题描述

你好,AdderQuant的预训练模型,里边的结构和代码里的结构对应不上,https://download-mindspore.osinfra.cn/model_zoo/research/cv/AdderQuant/这里好像给的是原始addernet的预训练模型,而AdderQuant里边的层都改了名字了,能否发一下正确的预训练模型?

另外,adder_quant.py第37行运行报错, 发生异常: IndexError index 5 is out of bounds for dimension with size 5 File "~/work/AdderQuant/adder_quant.py", line 37, in original_order z[:, int(indices[i]), :, :] = ordered[:, i, :, :]

print(indices) [ 4 5 8 11 14 1 2 9 10 15 3 0 6 7 12 13]

print(ordered.shape) (128, 5, 32, 32) 超范围了

环境信息

  • Hardware Environment(Ascend/GPU/CPU) / 硬件环境:

Please delete the backend not involved / 请删除不涉及的后端:
/device GPU

  • Software Environment / 软件环境 (Mandatory / 必填):
    -- MindSpore version : 2.2.14
    -- Python version : 3.9
    -- OS platform and distribution : Ubuntu 22.04
    -- GCC/Compiler version : 11.4.0

  • Execute Mode / 执行模式 (Mandatory / 必填)(PyNative/Graph):

/mode pynative

关联用例

https://gitee.com/mindspore/models/tree/master/research/cv/AdderQuant

重现步骤

python eval.py

预期结果

应该能正常运行才对,实际上报错

日志/截图

[在这里上传图片]
无法读取与训练模型

运行报错

备注

评论 (2)

tju-sun-lab 创建了任务
tju-sun-lab 添加了
 
kind/bug
标签
展开全部操作日志

Please assign maintainer to check this issue.
请为此issue分配处理人。
@fangwenyi @chengxiaoli @Shawny

感谢您的提问,您可以评论//mindspore-assistant更快获取帮助:

  1. 如果您刚刚接触MindSpore,或许您可以在教程找到答案
  2. 如果您是资深Pytorch用户,您或许需要:
  1. 如果您遇到动态图问题,可以设置set_context(pynative_synchronize=True)查看报错栈协助定位
  2. 模型精度调优问题可参考官网调优指南
  3. 如果您反馈的是框架BUG,请确认您在ISSUE中提供了MindSpore版本、使用的后端类型(CPU、GPU、Ascend)、环境、训练的代码官方链接以及可以复现报错的代码的启动方式等必要的定位信息
  4. 如果您已经定位出问题根因,欢迎提交PR参与MindSpore开源社区,我们会尽快review
Shawny 负责人设置为hewei
Shawny 任务类型任务 修改为Question
Shawny 关联项目设置为MindSpore Issue Assistant
Shawny 计划开始日期设置为2024-05-13
Shawny 计划截止日期设置为2024-06-13
Shawny 添加了
 
mindspore-assistant
标签

登录 后才可以发表评论

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

搜索帮助