[ERROR] Network has dynamic or shape inputs, but no optimization profile has been defined

I want to use the tao-converter file (on the jetson nx) to convert the unet model .etlt to int8 engine but get the error:

[INFO] Detected input dimensions from the model: (-1, 1, 320, 320)
[INFO] Model has dynamic shape. Setting up optimization profiles.
[INFO] Using optimization profile min shape: (1, 1, 320, 320) for input: input_1:0
[INFO] Using optimization profile opt shape: (4, 1, 320, 320) for input: input_1:0
[INFO] Using optimization profile max shape: (16, 1, 320, 320) for input: input_1:0
[ERROR] Network has dynamic or shape inputs, but no optimization profile has been defined.
[ERROR] Network validation failed.
[ERROR] Unable to create engine
Segmentation fault (core dumped)

this is my code:
./tao-converter -k nvidia_tlt
-c isbi_cal.bin
-e result.engine
-t int8
-p input_1:0,1x1x320x320,4x1x320x320,16x1x320x320
model_isbi_retrained.etlt

this is my dir:
export labels.txt nvinfer_config.txt tao-converter
isbi_cal.bin model_isbi_retrained.etlt setupmodel.sh
isbi_cal_data_file.txt model_isbi_retrained.tlt status.json

thank you for help!

Please refer to the input name in Unet_isbi notebook fails to export TensorRT model with tao converter

if i change the -p input_1:0 to -p input_1 i will get the error:
[WARNING] Tensor DataType is determined at build time for tensors not marked as input or output.
[ERROR] Wrong input name specified in -p, please double check.
Aborted (core dumped)

and if i change -p input_1, 1x1x320x320, 4x1x320x320, 16x1x320x320 to -p input_1, 1x3x320x320, 4x3x320x320, 16x3x320x320, also get error:
[WARNING] Tensor DataType is determined at build time for tensors not marked as input or output.
[ERROR] Wrong input name specified in -p, please double check.
Aborted (core dumped)

i also changed -p input_1:0,1x1x320x320,4x1x320x320,16x1x320x320
to -p input_1:0,1x3x320x320,4x3x320x320,16x3x320x320 \
get the same error:
[INFO] Detected input dimensions from the model: (-1, 1, 320, 320)
[INFO] Model has dynamic shape. Setting up optimization profiles.
[INFO] Using optimization profile min shape: (1, 3, 320, 320) for input: input_1:0
[INFO] Using optimization profile opt shape: (4, 3, 320, 320) for input: input_1:0
[INFO] Using optimization profile max shape: (16, 3, 320, 320) for input: input_1:0
[ERROR] Network has dynamic or shape inputs, but no optimization profile has been defined.
[ERROR] Network validation failed.
[ERROR] Unable to create engine
Segmentation fault (core dumped)

To narrow down, can you download one unet etlt model for test?

https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/blob/master/download_models.sh#LL27C3-L27C91

$ wget https://nvidia.box.com/shared/static/taqr2y52go17x1ymaekmg6dh8z6d43wr -O models.zip

It is 320x320
https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/blob/master/configs/unet_tao/pgie_unet_tao_config.txt#L35

I download the models, find other errors:

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

Sorry for late reply.
Please change the key to tlt_encode

$ ./tao-converter -k tlt_encode -c unet_cal.bin -e out.engine -i nchw -t int8 -p input_1:0,1x3x320x320,4x3x320x320,16x3x320x320 unet_resnet18.etlt

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.