server
server copied to clipboard
onnx model dynamic axis not working
Description onnx model dynamic axis is not working i'm sure the onnx output node has the dynamic axis for both dimension
netron info:
export script:
print onnx model output node info:
[name: "output"
type {
tensor_type {
elem_type: 1
shape {
dim {
dim_param: "None"
}
dim {
dim_param: "None"
}
}
}
}
]
Triton Information model_repository_manager.cc:832] failed to load 'Drinks-Sku' version 1: Invalid argument: model 'Drinks-Sku', tensor 'output': the model expects 2 dimensions (shape [-1,16075]) but the model configuration specifies 2 dimensions (an initial batch dimension because max_batch_size > 0 followed by the explicit tensor shape, making complete shape [-1,-1])
Are you using the Triton container or did you build it yourself? Triton container
config.pbtxt
name: "Drinks-Sku"
platform: "onnxruntime_onnx"
max_batch_size: 128
input [
{
name: "img"
data_type: TYPE_FP32
format: FORMAT_NHWC
dims: [3, 224, 224]
}
]
output [
{
name: "output"
data_type: TYPE_FP32
dims: [-1 ]
}
]
instance_group [
{
count: 1
kind: KIND_GPU
gpus: [ 0 ]
}
]
dynamic_batching { }
Hi @wooAo ,
model_repository_manager.cc:832] failed to load 'Drinks-Sku' version 1: Invalid argument: model 'Drinks-Sku', tensor 'output': the model expects 2 dimensions (shape [-1,16075]) but the model configuration specifies 2 dimensions (an initial batch dimension because max_batch_size > 0 followed by the explicit tensor shape, making complete shape [-1,-1])
Is your output tensor supposed to be something like this instead in the config?
output [
{
name: "output"
data_type: TYPE_FP32
dims: [ 16075 ] // implicitly [-1, 16075] because max_batch_size > 0
}
]
Hi, the specified dims work fine, but we have more than 10 models in our production line and they need to share one config.pbtxt (must be)
Are your 10 models different versions of the same one? If this is the case then you can layout your directory structure as follows:
<model-repository-path>/
<model-name>/
config.pbtxt
1/
onnx.model
2/
onnx.model
3/
onnx.model
...
If you want distinct names for your model then you will have to copy your config.pbtxt file (changing the name
parameter appropriately) to each of your directories.
Closing issue due to lack of activity. Please re-open the issue if you would like to follow up with this issue.