keras_to_tensorflow
keras_to_tensorflow copied to clipboard
Can not load TF model after converting
Hi All I converted the model successfully and without any error message, I also created the pbtxt file. However when I try to load the model using OpenCV I am getting the following error:-
tensorflowNet = cv2.dnn.readNetFromTensorflow(weightsFile, pbTXTFile) cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\dnn\src\tensorflow\tf_importer.cpp:616: error: (-215:Assertion failed) const_layers.insert(std::make_pair(name, li)).second in function 'cv::dnn::dnn4_v20180917::`anonymous-namespace'::addConstNodes'
I can load other original TF model uising OpenCV without any problem.
Can anyone please help resolve this issue?
Thanks
I have not seen this error, but I have not also tried to load models with tf_importer of OpenCV.
The error seems to be around the const_layers. Have you checked line 616 of the tf_importer.cpp to get a more detailed understanding of what's going on around the addConstNodes call?
hi iam having a similar issue loading my model did you find a work around to this?