Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleDetection
  • Issue
  • #413

P
PaddleDetection
  • 项目概览

PaddlePaddle / PaddleDetection
大约 2 年 前同步成功

通知 708
Star 11112
Fork 2696
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PaddleDetection
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 184
    • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
    • 合并请求 40
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 3月 30, 2020 by saxon_zh@saxon_zhGuest

PaddleDetection剪枝的基础上再量化该怎么做

Created by: TianyouChen

我想用剪枝出来的模型进行量化,发现参数加载不匹配,网络加载原始yolov3,但是参数加载剪枝后的,这个该怎么配置修改让参数匹配并能量化训练? 详细信息如下: 训练指令:

python3 slim/quantization/train.py --not_quant_pattern slim_output \
 --eval --c ./configs/yolov3_mobilenet_v1_Headshoulder.yml -o max_iters=30000 \
save_dir=./output/prune_quant_yolov3 LearningRate.base_lr=0.0001 LearningRate.schedulers="[!PiecewiseDecay {gamma: 0.1, milestones: [10000]}]" pretrain_weights=output/prue_Headshoulder/yolov3_mobilenet_v1_Headshoulder/best_model

报错信息:

2020-03-30 09:53:24,269-INFO: 1690 samples in file dataset/voc/test.txt
2020-03-30 09:53:24,270-INFO: places would be ommited when DataLoader is not iterable
W0330 09:53:25.296880  6945 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0
W0330 09:53:25.300591  6945 device_context.cc:245] device: 0, cuDNN Version: 7.6.
2020-03-30 09:53:28,249-INFO: Loading parameters from output/prue_Headshoulder/yolov3_mobilenet_v1_Headshoulder/best_model...
Traceback (most recent call last):
  File "slim/quantization/train.py", line 314, in <module>
    main()
  File "slim/quantization/train.py", line 193, in main
    ignore_params=ignore_params)
  File "/home/chenchaocun/PaddleDetection_3.27/ppdet/utils/checkpoint.py", line 142, in load_params
    fluid.io.set_program_state(prog, state)
  File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/io.py", line 1942, in set_program_state
    .format(orig_para_np.shape, para.name, new_para_np.shape)
AssertionError: Shape not matching: the Program requires a parameter with a shape of ((512, 1024, 1, 1)), while the loaded parameter (namely [ yolo_block.0.0.0.conv.weights ]) has a shape of  ((51, 1024, 1, 1)).

多谢指教~

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleDetection#413
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7