Network has dynamic or shape inputs but no optimization profile has been defined

How can I define multi inputs and outputs for dynamic shape.

According to the sampleDynamicReshape.cpp, it only has one input.

I tried many ways, but got no right one.

So, how could I handle two or three more input images?

Any reference?



Please submit the inference task separately.
So you can specify the input shape when pre-processing stage:

// Run the preprocessor to resize the input to the correct shape
std::vector<void*> preprocessorBindings = {,};
// For engines using full dims, we can use executeV2, which does not include a separate batch size parameter.
bool status = mPreprocessorContext->executeV2(;

// Next, run the model to generate a prediction.
std::vector<void*> predicitonBindings = {,};
status = mPredictionContext->executeV2(;

For more detail, please check our document below: