Open Vaishnvi opened 3 months ago
I even tried with max_batch_size = 0, it still gives this error: failed to load 'bhaasha_ocr' version 1: Invalid argument: model 'bhaasha_ocr', tensor 'inp': the model expects 3 dimensions (shape [64,32,246]) but the model configuration specifies 3 dimensions (shape [-1,32,246])
name: "bhaasha_ocr" backend: "onnxruntime" max_batch_size: 0
input [ { name: "input" data_type: TYPE_FP32 dims: [-1, 1, 96, 256] } ]
output [ { name: "onnx::Shape_261" data_type: TYPE_FP32 dims: [-1, 20, 2] }, { name: "input.79" data_type: TYPE_FP32 dims: [-1, 1, 96, 256] }, { name: "inp" data_type: TYPE_FP32 dims: [-1, 32, 246] } ]
Hi @Vaishnvi, thanks for sharing such detailed info. Since this is an ONNX model, and the ORT backend supports full config auto-complete, can you try to load the model without any config.pbtxt
? This should generate the I/O for the config directly from the model metadata and better help us understand what might be going wrong.
I have exported code using following format:
The exported model is working fine using onnxruntime.
I am facing issue while loading the model using TIS (Triton Inference Server).
I get this error:
failed to load 'bhaasha_ocr' version 1: Invalid argument: model 'bhaasha_ocr', tensor 'inp': for the model to support batching the shape should have at least 1 dimension and the first dimension must be -1; but shape expected by the model is [64,32,246]
This is very unusual, cause for other two outputs I am not facing this error, only for the third output I am getting this error. How is this possible?
Config.pbtxt :
name: "bhaasha_ocr" backend: "onnxruntime" max_batch_size: 64
input [ { name: "input" data_type: TYPE_FP32 dims: [1, 96, 256]
} ]
output [ { name: "onnx::Shape_261" data_type: TYPE_FP32 dims: [20, 2]
}, { name: "input.79" data_type: TYPE_FP32 dims: [1, 96, 256]
}, { name: "inp" data_type: TYPE_FP32 dims: [32, 246] } ]
dynamic_batching { preferred_batch_size: [2, 4, 8, 16, 32, 64 ] }
How can I resolve this?