-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
(-215:Assertion failed) inputs.size() in function cv::dnn::dnn4_v20191202::Layer::getMemoryShapes #16323
Copy link
Copy link
Closed
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/category: dnnconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
System information (version)
- OpenCV => 4.2.0-pre
- Operating System / Platform => Windows 10 64 Bit
- Compiler => Visual Studio 2016
Detailed description
When im trying to load ONNX model im getting error:
F:\OpenCV\opencv-master\modules\dnn\src\dnn.cpp:4479: error: (-215:Assertion failed) inputs.size() in function 'cv::dnn::dnn4_v20191202::Layer::getMemoryShapes'\n" ...}
Model architecture:
HRNet
Model was exported from PyTorch to ONNX with following code:
model.load_state_dict(torch.load(args.model_file))
data = torch.zeros((1, 3, 288, 384)).cuda()
model.eval()
model.cuda()
model.float()
torch.onnx.export(model, data, 'test.onnx')Model properties and first input layer:
About error
Looks like error appears in onnx_importer.cpp at line
Ptr<Layer> layer = dstNet.getLayer(id);
layer->getMemoryShapes(layerInpShapes, 0, layerOutShapes, layerInternalShapes);on layer id = 113
Steps to reproduce:
- Upload_model
- load in:
auto network = readNetFromONNX("test.onnx");Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/category: dnnconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
