Transposes the tensors by reordering the dimensions based on the perm
parameter.
Destination dimension i
is obtained from source dimension perm[i]
.
For example, for a source image with HWC
layout, shape = (100, 200, 3)
, and perm = [2, 0, 1]
, it will produce a destination image with CHW
layout and shape = (3, 100, 200)
, holding the equality:
\[dst(x_2, x_0, x_1) = src(x_0, x_1, x_2)\]
which is equivalent to:
\[dst(x_{perm[0]}, x_{perm[1]}, x_{perm[2]}) = src(x_0, x_1, x_2)\]
for all valid coordinates.
This operator allows sequence inputs and supports volumetric data.
âcpuâ
âgpuâ
__input¶ (TensorList) â Input to the operator.
bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) â
Output size hint, in bytes per sample.
If specified, the operatorâs outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.
output_layout¶ (layout str, optional, default = ââ) â
Explicitly sets the output data layout.
If this argument is specified, transpose_layout
is ignored.
perm¶ (int or list of int, optional) â
Permutation of the dimensions of the input, for example, [2, 0, 1].
If not given, the dimensions are reversed.
preserve¶ (bool, optional, default = False) â Prevents the operator from being removed from the graph even if its outputs are not used.
transpose_layout¶ (bool, optional, default = True) â
When set to True, the axis names in the output data layout are permuted according to perm
, Otherwise, the input layout is copied to the output.
If output_layout
is set, this argument is ignored.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4