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?

Thanks.

Hi,

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 = {mInput.deviceBuffer.data(), mPredictionInput.data()};
// For engines using full dims, we can use executeV2, which does not include a separate batch size parameter.
bool status = mPreprocessorContext->executeV2(preprocessorBindings.data());

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

For more detail, please check our document below:

Thanks.