-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Description
System information (version)
- OpenCV =>4.30.
- Operating System / Platform =>Ubuntu 18.04
- Compiler =>Qt5
Detailed description
There may be a bug in importing an 'Expand' layer.
It can be reproduced with the network in #17516 (comment).
Set the 'state' as an input of 'forward':
def forward(self, x, state):then, delete:
state = torch.zeros(1, self.sDim)In this manner, it will be copied and concatenated.
I think there may be a bug, because the name of the 'concat' layer is the same with the last copy of input.
I think we should add
node_proto.set_output(0, layerParams.name);after
opencv/modules/dnn/src/onnx/onnx_importer.cpp
Line 1221 in 55ca0fc
| layerParams.set("axis", broadcast_axes[0]); |
If not, it will throw an exception in the following steps, because the concat layer can not be found with a wrong name.
Steps to reproduce
It is described above.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable