BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
33.96k stars 18.72k forks source link

The input tensor cannot be reshaped to the requested shape. #7010

Open NewtonLiuD opened 2 years ago

NewtonLiuD commented 2 years ago

Issue summary

WinRT originate error - 0x80004005 : 'Non-zero status code returned while running Reshape node. Name:'conv5-2_Reshape' Status Message: D:\a_work\1\s\onnxruntime\core\providers\cpu\tensor\reshape_helper.h:42 onnxruntime::ReshapeHelper::ReshapeHelper gsl::narrow_cast(input_shape.Size()) == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{128,1,128}, requested shape:{1,128}'。

Steps to reproduce

I used Windows ML to evaluate mtcnn det1.onnx passed, but det2. onnx,det3.onnx did not pass, and some methods found on the Internet did not solve the problem; The problem may occur during caffe's model convert to ONNX. https://github.com/CongWeilin/mtcnn-caffe https://github.com/htshinichi/caffe-onnx

Tried solutions

https://github.com/microsoft/onnxruntime/issues/2779 https://nietras.com/2021/05/24/set-dynamic-batch-size-using-onnx-sharp/ https://github.com/microsoft/onnxruntime/issues/2872

System configuration