MTLab / onnx2caffe

pytorch to caffe by onnx
MIT License
370 stars 102 forks source link

TypeError: ONNX node of type Shape is not supported. #26

Open wanglaotou opened 5 years ago

wanglaotou commented 5 years ago

i have redefine the layer type like prelu and Transpose, when i run convertCaffe.py and i get error like this. onnx my env is ubuntu16.04, pytorch 1.3.0 and torchvision 0.3.0.

wanglaotou commented 5 years ago

the onnx model comes from: https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/models/onnx

yjhuasheng commented 5 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

LeonNerd commented 4 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,请问我转的是faster r-cnn 我的 --input-shape 应该如何输入。我的faster r-cnn.onnx来自onnx model zool

ShidiDaisy commented 4 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,请问我转的是faster r-cnn 我的 --input-shape 应该如何输入。我的faster r-cnn.onnx来自onnx model zool

I also have this issue. Have u solved it?

yjhuasheng commented 4 years ago

如果这个不行的话,我就不知道了啊

------------------ 原始邮件 ------------------ 发件人: "MTlab/onnx2caffe" <notifications@github.com>; 发送时间: 2020年8月19日(星期三) 晚上8:04 收件人: "MTlab/onnx2caffe"<onnx2caffe@noreply.github.com>; 抄送: "康春生"<1176154395@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [MTlab/onnx2caffe] TypeError: ONNX node of type Shape is not supported. (#26)

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,请问我转的是faster r-cnn 我的 --input-shape 应该如何输入。我的faster r-cnn.onnx来自onnx model zool

I also have this issue. Have u solved it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

china56321 commented 4 years ago

i have redefine the layer type like prelu and Transpose, when i run convertCaffe.py and i get error like this. onnx my env is ubuntu16.04, pytorch 1.3.0 and torchvision 0.3.0.

Have you solved this problem ? i encountered the same issue ?

ruabliuqiu commented 4 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,我该怎么用onnx-simplifier去掉reshape节点呢

yjhuasheng commented 4 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,我该怎么用onnx-simplifier去掉reshape节点呢

那我就不清楚了啊

ruabliuqiu commented 4 years ago

i have redefine the layer type like prelu and Transpose, when i run convertCaffe.py and i get error like this. onnx my env is ubuntu16.04, pytorch 1.3.0 and torchvision 0.3.0.

Have you solved this problem ? i encountered the same issue ?

你解决了吗?

se7enXF commented 3 years ago

一样的问题,请问有人解决了吗?

gufanyuanying0852 commented 3 years ago

我也是遇到了一样的问题,想问有人解决了吗

tothedistance commented 3 years ago

先使用这个https://github.com/daquexian/onnx-simplifier,可以去掉这些层

您好,我该怎么用onnx-simplifier去掉reshape节点呢

python -m onnxsim onnx模型名称 yolov5s-simple.onnx 得到最终简化后的onnx模型 https://github.com/Wulingtian/yolov5_onnx2caffe

tothedistance commented 3 years ago

detect层里算坐标里面有shape。但一般移植都是cpu算这部分,simplifier刚好去掉了。估计原理是不支持的就去掉,但感觉不稳定。