OpenCV Error: Assertion failed (blobs[0].dims >= 2 && (size_t)(innerSize * numOutput) == blobs[0].total()) in FullyConnectedLayerImpl

asked 2017-12-28 01:36:23 -0500

updated 2017-12-28 01:40:20 -0500

berak gravatar image

I've trained google net model on own dataset and trying to deploy for image classification but when I'm loading the cyrrup_googlenet_iter_8000.caffemodel and deploy.prototxt and the following error I'm getting.

Error:

[INFO] loading model... 

OpenCV Error: Assertion failed (blobs[0].dims >= 2 && (size_t)(innerSize * numOutput) == blobs[0].total()) in FullyConnectedLayerImpl, file /io/opencv/modules/dnn/src/layers/fully_connected_layer.cpp, line 68
Traceback (most recent call last):
  File "pi_deep_learning.py", line 45, in <module>
    preds = net.forward()
cv2.error: /io/opencv/modules/dnn/src/layers/fully_connected_layer.cpp:68: error: (-215) blobs[0].dims >= 2 && (size_t)(innerSize * numOutput) == blobs[0].total() in function FullyConnectedLayerImpl

Please help me with this, If anyone needs more information, Please let me know, I would be happy to discuss.

Thanks

edit retag flag offensive close merge delete

Comments

@prabhundps, Please show a piece of .prototxt (a part with input image sizes) and how you put input blob into the model (resize or blobFromImage invocations).

dkurt gravatar imagedkurt ( 2017-12-28 07:56:13 -0500 )edit