×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

关于conv3d的使用 已完结 陈叶飞2021-08-06 16:37:21 回复 6 查看 使用求助
关于conv3d的使用
分享到:

替换默认conv3d算子后, 量化完成后, 推理时第一层3d卷积层输入输出类型报错. 请问该如何解决? 具体情况如下:


情况说明:

在使用中, 用到conv3d算子, 由于卷积核尺寸不满足常规conv3d算子要求(CNML_STATUS_INVALIDPARAM), 便根据文档提示, 使用export USE_CNML_CONV3D=true更换 Conv3d 的底层实现版本. 但是更换后, 在pytorch量化后, 使用online推理时, 报如下错误:

FIRSTCONV3D: check_ : FirstConv3D 53: given input onchip datatype, input data type unsupport !! current input onchip datatype is (INT8, pos -5, scale 1.50331), input datatype is FLOAT32

根据提示, 查看了量化参数, 确保没有使用firstconv, 同时, 改变过输入, 从HalfTensor到IntTensor都尝试过, 分别报如下错误:

 [HalfTensor的情况] FIRSTCONV3D: check_ : FirstConv3D 53: given input onchip datatype, input data type unsupport !! current input onchip datatype is (INT8, pos -5, scale 1.50331), input datatype is FLOAT16
 [IntTensor的情况] FIRSTCONV3D: check_ : FirstConv3D 53: with given filter onchip datatype, the input or output onchip datatype unsupport! current filter onchip datatype is (INT8, pos -5, scale 1.12864), input onchip datatype is (INT8, pos -5, scale 1.50331), output onchip datatype is (INT32, pos0, scale -1)


量化时参数设置如下: 

没有使用firstconv

qconfig = { 'per_channel':False, 'firstconv':False ,}#'mean': mlu_mean , 'std': mlu_std}
model_quantized = mlu_quantize.quantize_dynamic_mlu(model, qconfig, dtype=dtype, gen_quant = True)


使用的版本:

官网获取的docker镜像: cambricon_pytorch_u16.04_v1.7.0_pt0.15.0, 驱动版本v1.7.0



版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭