What does the function of ITensor::setDimensions()?

What does the function of ITensor::setDimensions()? I have an onnx model that has 2 dynamic inputs(the dimension reported by Netron is [batch,3,height,width]), so can I set the input shape by calling this function just like below:

network->getInput(0)->setDimensions(nvinfer1::Dims4(1, 3, 1080, 1920));
network->getInput(1)->setDimensions(nvinfer1::Dims4(1, 3, 1080, 1920));

Hi,

Yes, you can use setDimensions(). Please refer to the following doc and sample for your reference.

Thank you.