Dims¶
Volume¶
Dims¶
-
class
tensorrt.
Dims
(*args, **kwargs)¶ Structure to define the dimensions of a tensor.
Dims
and all derived classes behave like Pythontuple
s. Furthermore, the TensorRT API can implicitly convert Python iterables toDims
objects, sotuple
orlist
can be used in place of this class.Overloaded function.
__init__(self: tensorrt.tensorrt.Dims) -> None
__init__(self: tensorrt.tensorrt.Dims, shape: List[int]) -> None
-
get_type
(self: tensorrt.tensorrt.Dims, arg0: int) → tensorrt.tensorrt.DimensionType¶ Queries the type of a dimension.
- Returns
The type of the specified dimension.
Dims2¶
-
class
tensorrt.
Dims2
(*args, **kwargs)¶ Structure to define 2D shape.
Overloaded function.
__init__(self: tensorrt.tensorrt.Dims2) -> None
__init__(self: tensorrt.tensorrt.Dims2, dim0: int, dim1: int) -> None
__init__(self: tensorrt.tensorrt.Dims2, shape: List[int]) -> None
DimsHW¶
-
class
tensorrt.
DimsHW
(*args, **kwargs)¶ Structure to define 2D shape with height and width.
- Variables
h –
int
The first dimension (height).w –
int
The second dimension (width).
Overloaded function.
__init__(self: tensorrt.tensorrt.DimsHW) -> None
__init__(self: tensorrt.tensorrt.DimsHW, h: int, w: int) -> None
__init__(self: tensorrt.tensorrt.DimsHW, shape: List[int]) -> None
Dims3¶
-
class
tensorrt.
Dims3
(*args, **kwargs)¶ Structure to define 3D shape.
Overloaded function.
__init__(self: tensorrt.tensorrt.Dims3) -> None
__init__(self: tensorrt.tensorrt.Dims3, dim0: int, dim1: int, dim2: int) -> None
__init__(self: tensorrt.tensorrt.Dims3, shape: List[int]) -> None
DimsCHW¶
-
class
tensorrt.
DimsCHW
(*args, **kwargs)¶ Structure to define 3D tensor with a channel dimension, height, and width.
- Variables
c –
int
The first dimension (channel).h –
int
The second dimension (height).w –
int
The third dimension (width).
Overloaded function.
__init__(self: tensorrt.tensorrt.DimsCHW) -> None
__init__(self: tensorrt.tensorrt.DimsCHW, c: int, h: int, w: int) -> None
__init__(self: tensorrt.tensorrt.DimsCHW, shape: List[int]) -> None
Dims4¶
-
class
tensorrt.
Dims4
(*args, **kwargs)¶ Structure to define 4D tensor.
Overloaded function.
__init__(self: tensorrt.tensorrt.Dims4) -> None
__init__(self: tensorrt.tensorrt.Dims4, dim0: int, dim1: int, dim2: int, dim3: int) -> None
__init__(self: tensorrt.tensorrt.Dims4, shape: List[int]) -> None
DimsNCHW¶
-
class
tensorrt.
DimsNCHW
(*args, **kwargs)¶ Structure to define 4D tensor with a batch dimension, a channel dimension, height and width.
- Variables
n –
int
The first dimension (batch).c –
int
The second dimension (channel).h –
int
The third dimension (height).w –
int
The fourth dimension (width).
Overloaded function.
__init__(self: tensorrt.tensorrt.DimsNCHW) -> None
__init__(self: tensorrt.tensorrt.DimsNCHW, n: int, c: int, h: int, w: int) -> None
__init__(self: tensorrt.tensorrt.DimsNCHW, shape: List[int]) -> None