Op (Reshape) [ShapeInferenceError] Target shape may not have multiple -1 dimensions. #18969
Labels
ep:CUDA
issues related to the CUDA execution provider
platform:windows
issues related to the Windows platform
Describe the issue
The original onnx model doesn't support dynamic batch, So I just found a way to support dynamic batch. However the converted model occurs the error:
Traceback (most recent call last):
File "c:\Users\Arthu\Codes\AzureDevOps\ModelServing\sources\kserve\face-recognition\face-recognition\test_model.py", line 52, in
test_model()
File "c:\Users\Arthu\Codes\AzureDevOps\ModelServing\sources\kserve\face-recognition\face-recognition\test_model.py", line 32, in test_model
session = ort.InferenceSession(model_files[0], providers=providers)
File "C:\Users\Arthu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Local\pypoetry\Cache\virtualenvs\kserve-46fEio5B-py3.11\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "C:\Users\Arthu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Local\pypoetry\Cache\virtualenvs\kserve-46fEio5B-py3.11\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 472, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from C:\Users\Arthu\Codes\AzureDevOps\ModelServing\sources\models\face-recognition\facenet-casia-webface\facenet_casia-webface_resnet.onnx failed:Node (Reshape_358) Op (Reshape) [ShapeInferenceError] Target shape may not have multiple -1 dimensions.
To reproduce
The original onnx model: https://drive.google.com/file/d/1IcR-_4d21s3gjgd5jmOhwBlK_VimYpdx/view?usp=sharing
Tried way 1:
Tried way 2:
Urgency
No response
Platform
Windows
OS Version
Version 23H2
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.17.0
ONNX Runtime API
Python
Architecture
X64
Execution Provider
CUDA
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: