打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
有一个卷积层,参数如下:
convolution_param {
num_output: 512
bias_term: true
group: 512
pad_h: 2
pad_w: 2
kernel_h: 3
kernel_w: 3
stride_h: 1
stride_w: 1
dilation: 2
}
该卷积层pad为2,核为3*3,dilation为2,所以输出宽高和输入宽高是一模一样。在caffe下是正常运行的。
对模型进行量化一切正常,然后生成离线模型时,提示如下错误:
[cnmlError] MLU::conv_depthwise dimension mismatch,output shape is wrong, the given shape is:(n=1, c=512,h=32,w=48, d=0, t=0, data in array:{1, 32, 48, 512, } , but the expected shape is:(n=1, c=512,h=34,w=50, d=0, t=0, data in array:{1, 34, 50, 512, }
输出形状居然宽高各多了2。
假设卷积参数为
convolution_param {
num_output: 512
bias_term: true
group: 512
pad_h: 2
pad_w: 2
kernel_h: 3
kernel_w: 3
stride_h: 1
stride_w: 1
dilation: 1
}
则会出现输出宽高比输入宽高各多2的情况。
因此猜测是不是mlu的实现中,对空洞卷积有问题所导致的?
热门帖子
精华帖子