Why should we set parameter 'shape_dict' when importing models?

If there will be some difference when NOT set ‘shape_dict’? Here is the normal code which set the parameter

relay.frontend.from_onnx(model, shape_dict=shape_dict)

I believe you will need to do this if some inputs in your onnx models don’t have fully defined shapes. E.g. you might have batch norm not defined so in your onnx model it will be something like shape [’?’, 3, 224, 224]. In this case if you have a fixed shape it probably is helpful otherwise you will have some potential dynamism which generally are slower models.

If your onnx model has fully defined shapes then you don’t have to do it.