Skip to content

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

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 9月 03, 2020 by saxon_zh@saxon_zhGuest

pp-yolo剪枝的时候报通道错误

Created by: thunder95

对已训练好的的模型进行剪枝,但是报错了卷积核通道数量不匹配的问题

python prune.py -c ../../myconfigs/my_ppyolo.yml --pruned_params "yolo_block.0.0.0.conv.weights,yolo_block.0.0.1.conv.weights,yolo_block.0.1.0.conv.weights" --pruned_ratios="0.2,0.3,0.4"


Python Call Stacks (More useful to users):

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2798, in append_op attrs=kwargs.get("attrs", None)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 1581, in conv2d "data_format": data_format, File "/home/aistudio/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 166, in _conv_bn bias_attr=False) File "/home/aistudio/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 241, in _detection_block name='{}.{}.spp.conv'.format(name, j)) File "/home/aistudio/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 335, in _get_outputs name=self.prefix_name + "yolo_block.{}".format(i)) File "/home/aistudio/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 389, in get_loss outputs = self._get_outputs(input, is_train=True) File "/home/aistudio/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 85, in build gt_score, targets) File "/home/aistudio/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 159, in train return self.build(feed_vars, mode='train') File "prune.py", line 100, in main train_fetches = model.train(feed_vars) File "prune.py", line 412, in main()


Error Message Summary:

InvalidArgumentError: The number of input's channels should be equal to filter's channels * groups for Op(Conv). But received: the input's channels is 1228, the input's shape is [32, 1228, 13, 13]; the filter's channels is 1843, the filter's shape is [512, 1843, 1, 1]; the groups is 1, the data_format is NCHW. The error may come from wrong data_format setting. [Hint: Expected input_channels == filter_dims[1] * groups, but received input_channels:1228 != filter_dims[1] * groups:1843.] at (/paddle/paddle/fluid/operators/conv_op.cc:94) [operator < conv2d > error]

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleDetection#1346
渝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