Ask Your Question

Revision history [back]

error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

Hello, i am train keras model, after that i am convert keras model to pb model and try to use pb model via openCV dnn model by:

liveness_pb = r'.\pb\liveness_8_batch_1_epoch_test2.pb' modelCV = cv2.dnn.readNetFromTensorflow(liveness_pb)

prepare image and:

modelCV.setInput(face)
out = modelCV.forward()

but then get next error:

OpenCV(4.0.1) C:\projects\opencv-python\opencv\modules\dnn\src\layers\permute_layer.cpp:173: error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

can someone explain what i am doing wrong? and how to fix it?

error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

Hello, i am train keras model, after that i am convert keras model to pb model and try to use pb model via openCV dnn model by:

liveness_pb = r'.\pb\liveness_8_batch_1_epoch_test2.pb' modelCV = cv2.dnn.readNetFromTensorflow(liveness_pb)

prepare image and:

modelCV.setInput(face)
out = modelCV.forward()

but then get next error:

OpenCV(4.0.1) C:\projects\opencv-python\opencv\modules\dnn\src\layers\permute_layer.cpp:173: error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

can someone explain what i am doing wrong? and how to fix it?

click to hide/show revision 3
retagged

updated 2019-04-13 03:44:30 -0600

berak gravatar image

error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

Hello, i am train keras model, after that i am convert keras model to pb model and try to use pb model via openCV dnn model by:

liveness_pb = r'.\pb\liveness_8_batch_1_epoch_test2.pb' modelCV = cv2.dnn.readNetFromTensorflow(liveness_pb)

prepare image and:

modelCV.setInput(face)
out = modelCV.forward()

but then get next error:

OpenCV(4.0.1) C:\projects\opencv-python\opencv\modules\dnn\src\layers\permute_layer.cpp:173: error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'

can someone explain what i am doing wrong? and how to fix it?