Shape¶
- class tensorrt.plugin.Shape(tensor_desc: Tuple[int] | DynamicPluginTensorDesc | PluginTensorDesc)¶
张量形状的数值表示
- property is_dynamic: bool¶
如果此张量至少有一个动态维度,则为 True,否则为 False。
- property max: Tuple[int]¶
张量维度的上限。
- property min: Tuple[int]¶
张量维度的下限。
- numel() int ¶
包含的元素数量
- Raises:
ValueError – 当
is_dynamic
为 True 时
- property opt: Tuple[int]¶
为自动调优指定的维度最佳值。