ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

pnnx转换后模型结构正确但值不正确

Open sankexin opened this issue 2 years ago • 1 comments

error log | 日志或报错信息 | ログ

############# pass_level1 unknown Parameter value kind prim::Constant of TensorType, t.dim = 1 unknown Parameter value kind prim::Constant unknown Parameter value kind prim::Constant of TensorType, t.dim = 1 no attribute value no attribute value unknown Parameter value kind prim::Constant no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value no attribute value unknown Parameter value kind prim::Constant no attribute value no attribute value unknown Parameter value kind prim::Constant no attribute value no attribute value unknown Parameter value kind prim::Constant no attribute value no attribute value unknown Parameter value kind prim::Constant no attribute value no attribute value ############# pass_level2 ############# pass_level3 assign unique operator name pnnx_unique_0 to decoder.avgpool.avgpool assign unique operator name pnnx_unique_1 to decoder.avgpool.avgpool ############# pass_level4 ############# pass_level5 make_slice_expression input 198 ############# pass_ncnn

context | 编译/运行环境 | バックグラウンド

Ubuntu16.04 cuda10.2

how to reproduce | 复现步骤 | 再現方法

原始模型文件: rvm_mobilenetv3_fp32.zip 转换:./build/src/pnnx rvm_mobilenetv3_fp32.pt inputshape=[1,3,270,480] 1.直接读取转后的模型会报错:Segmentation fault (core dumped),用python读取中间层看到很多正常的层却输出错误的值,从这里开始就不对了: image 模型结构正确,这些层也是普通的层,为什么获得的值会不对呢?看起来转换后是把那些函数的功能全改变了,怎么修改正确呢? 2.例如:上图的顶部那个concat输出通道数不对,不是总和: out0: (64, 17, 30) out1: (64, 17, 30) out2: (64, 17, 30) 3.例如:上图左边最上面那个pool特征图大小和通道数不对: out0: (3, 270, 480) out1: (72, 68, 120)

more | 其他 | その他

例如:Interp上采样也是错误结果等: out0: (3, 68, 120) out1: (40, 34, 60)

sankexin avatar Aug 15 '22 09:08 sankexin

怎么让网络获取到正确的权重呢@nihui

sankexin avatar Aug 24 '22 02:08 sankexin

有找到正确方法不 等个回答👀

lblbk avatar Oct 13 '22 12:10 lblbk