module onnxrt.ops_cpu.op_reshape
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_reshape
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Reshape ======= Reshape the input tensor similar to numpy.reshape. First input is the data tensor, second input is a shape … |
|
Reshape ======= Reshape the input tensor similar to numpy.reshape. First input is the data tensor, second input is a shape … |
|
Functions#
function |
truncated documentation |
---|---|
|
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 arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
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 modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
|
|
|
|
|
|
|
|
|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_reshape.CommonReshape(onnx_node, desc=None, expected_attributes=None, **options)#
Bases:
OpRun
- __init__(onnx_node, desc=None, expected_attributes=None, **options)#
- _run(data, shape, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- mlprodict.onnxrt.ops_cpu.op_reshape.Reshape#
alias of
Reshape_14
- class mlprodict.onnxrt.ops_cpu.op_reshape.Reshape_13(onnx_node, desc=None, expected_attributes=None, **options)#
Bases:
Reshape_5
- class mlprodict.onnxrt.ops_cpu.op_reshape.Reshape_14(onnx_node, desc=None, **options)#
Bases:
CommonReshape
Reshape#
Reshape the input tensor similar to numpy.reshape. First input is the data tensor, second input is a shape tensor which specifies the output shape. It outputs the reshaped tensor. At most one dimension of the new shape can be -1. In this case, the value is inferred from the size of the tensor and the remaining dimensions. A dimension could also be 0, in which case the actual dimension value is unchanged (i.e. taken from the input tensor). If ‘allowzero’ is set, and the new shape includes 0, the dimension will be set explicitly to zero (i.e. not taken from input tensor). Shape (second input) could be an empty shape, which means converting to a scalar. The input tensor’s shape and the output tensor’s shape are required to have the same number of elements.
If the attribute ‘allowzero’ is set, it is invalid for the specified shape to contain both a zero value and -1, as the value of the dimension corresponding to -1 cannot be determined uniquely.
Attributes
allowzero: (Optional) By default, when any value in the ‘shape’ input is equal to zero the corresponding dimension value is copied from the input tensor dynamically. allowzero=1 indicates that if any value in the ‘shape’ input is set to zero, the zero value is honored, similar to NumPy. Default value is
nameallowzeroi0typeINT
(INT)
Inputs
data (heterogeneous)T: An input tensor.
shape (heterogeneous)tensor(int64): Specified shape for output.
Outputs
reshaped (heterogeneous)T: Reshaped data.
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: Reshape
This version of the operator has been available since version 14.
Runtime implementation:
Reshape
- __init__(onnx_node, desc=None, **options)#
- class mlprodict.onnxrt.ops_cpu.op_reshape.Reshape_5(onnx_node, desc=None, expected_attributes=None, **options)#
Bases:
CommonReshape
- __init__(onnx_node, desc=None, expected_attributes=None, **options)#