Error while running converted .h5 to .pb graph with OpenCV's dnn module

asked 2019-07-03 05:12:18 -0600

I have converted a custom trained keras model's .h5 file to .pb file. I have been trying to run the model using OpenCV's dnn module. But I am getting following mentioned error while inferencing.

Traceback (most recent call last): File "opencv_dnn.py", line 14, in networkOutput = tensorflowNet.forward() cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\dnn\src\dnn.cpp:524: error: (-2:Unspecified error) Can't create layer "leaky_0/LeakyRelu" of type "LeakyRelu" in function 'cv::dnn::dnn4_v20190122::LayerData::getLayerInstance'

How to run the model successfully?

edit retag flag offensive close merge delete

Comments

Please share the model if it's possible.

dkurt gravatar imagedkurt ( 2019-07-04 22:49:25 -0600 )edit