Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed at layer conv4_3_norm_mbox_loc, layer's bottom not detected ... #18

Open
huiofficial opened this issue Aug 16, 2020 · 3 comments

Comments

@huiofficial
Copy link

I try to use your code to convert TensorRT7.0's SSD caffe model to ONNX, I modified the caffe.proto to add all the Ops and it works fine until I met Layer conv4_3_norm_mbox_loc.

In src/caffe-onnx.py I find that the function __getLastLayerOutNameAndShape() cannot read this layers output so the convert is stopped. I find you use import ipdb; ipdb.set_trace() to specifically deal with layer conv4_3_norm_mbox_loc, but I don't know how to use it the right way and help me finish the convert.

Your code is:

if Layers[i].type == "Convolution" or Layers[i].type == Layer_CONVOLUTION:
                #1.获取节点输入名、输入维度、输出名、节点名
                if Layers[i].name == "conv4_3_norm_mbox_loc":
                    import ipdb; ipdb.set_trace()
                inname, input_shape = self.__getLastLayerOutNameAndShape(Layers[i])
                outname = self.__getCurrentLayerOutName(Layers[i])
                nodename = Layers[i].name

Thanks.

@huiofficial
Copy link
Author

Besides, I find that Ops doesn't have all the operations I need, but your doc says only to modify my caffe.proto. I wonder whether it matters.

@syangdung
Copy link

The code uses the onnx helper.make_node to convert the caffemodel to onnx model. Before calling the helper.make_node, you should get the parameters of the function. It is necessary to define the operators you need in the OPs directory. Before you define the operator, you need to check for the operators that onnx support.

@moon142857
Copy link

我也遇到了。他上一层是Normalize 目前代码里没实现。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants