Shape#

class tensorrt.plugin.Shape(tensor_desc: Union[Tuple[int], tensorrt.tensorrt.DynamicPluginTensorDesc, tensorrt.tensorrt.PluginTensorDesc])#

Numerical representation of a tensor shape

property is_dynamic: bool#

True if this tensor has at least one dynamic dimension, False otherwise.

property max: Tuple[int]#

Upper bounds on tensor’s dimensions.

property min: Tuple[int]#

Lower bounds on tensor’s dimensions.

numel() int#

Number of elements contained

Raises

ValueError – When is_dynamic is True

property opt: Tuple[int]#

Optimum value of dimensions specified for auto-tuning.