-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
cv::dnn::readNetFromONNX pnet load error #15244
Copy link
Copy link
Closed
Labels
Description
- OpenCV => 4.1.1
- Operating System / Platform => centos x86_64
- Compiler => gcc
Detailed description
When I load the onnx model (converted from pytorch ) using cv::dnn::readNetFromONNX, it will get the "terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.1.1) /opt/notebook_files/usefull/opencv-4.1.1/modules/dnn/src/dnn.cpp:525: error: (-2:Unspecified error) Can't create layer "23" of type "Exp" in function 'getLayerInstance'"
the script i use to convert pytorch to onnx is:
example = torch.rand(1, 3, 12, 12, requires_grad=True).to(config.DEVICES)
torch_out = torch.onnx._export(pnet,
example,
"pnet_model_final.onnx",
export_params=True)
Reactions are currently unavailable