module onnxrt.ops_cpu.op_transpose
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_transpose
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Transpose ========= Transpose the input tensor similar to numpy.transpose. For example, when perm=(1, 0, 2), given an … |
Properties#
property |
truncated documentation |
---|---|
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Returns a python code equivalent to this operator. |
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_transpose.Transpose(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
Transpose the input tensor similar to numpy.transpose. For example, when perm=(1, 0, 2), given an input tensor of shape (1, 2, 3), the output shape will be (2, 1, 3).
Attributes
perm: A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given. default value cannot be automatically retrieved (INTS)
Inputs
data (heterogeneous)T: An input tensor.
Outputs
transposed (heterogeneous)T: Transposed output.
Type Constraints
T tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(bfloat16), tensor(float16), tensor(float), tensor(double), tensor(string), tensor(bool), tensor(complex64), tensor(complex128): Constrain input and output types to all tensor types.
Version
Onnx name: Transpose
This version of the operator has been available since version 13.
Runtime implementation:
Transpose
- __init__(onnx_node, desc=None, **options)#
- _run(data, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings