You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: (-2:Unspecified error) More than one input is Const op in function 'getConstBlob' #13839
I wrote the model of PNet into freeze pb, the load the mode by readNetFromTensorflow. Then it occur error . I tried for RNet and ONet, then load correctly.
Does the dnn do not support load multi-input nodes ? I modify the input of the pb as only one input, error occor as the same.
Steps to reproduce
```.python
pb_file = "PNet_pnet.pb"
net = cv.dnn.readNetFromTensorflow(pb_file)
print(net)
```
cv2.error: OpenCV(3.4.5) /Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:522: error: (-2:Unspecified error) More than one input is Const op in function 'getConstBlob'
@dkurt The output results varied when I remove the squeeze from the network definition. I check the graph in the tensorboard, the Softmax operation is missing. I substitute the tf.sequeeze by tf.identity, but the DNN can not load the PB. How can I solve this problem ? Maybe other solution can substitute.
Activity
dkurt commentedon Feb 15, 2019
@plbmw, May I ask you to provide some code with network definition? At least a part with flattening,

taerc commentedon Feb 16, 2019
@dkurt Here is the network definition.
taerc commentedon Feb 16, 2019
@dkurt I remove squeeze ops refer to Layers for MobileNet from TensorFlow #9517 , then dnn load PNet_pnet.pb successfully. Can you provide some tutorials or blogs for the newer ?
Appreciate for your help very much.
taerc commentedon Feb 16, 2019
@dkurt The output results varied when I remove the squeeze from the network definition. I check the graph in the tensorboard, the Softmax operation is missing. I substitute the tf.sequeeze by tf.identity, but the DNN can not load the PB. How can I solve this problem ? Maybe other solution can substitute.

dkurt commentedon Apr 12, 2019
@plbmw, please test the changes from PR #14315 (the model from issue's topic works for me).