module onnxrt.ops_cpu.op_unsqueeze
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_unsqueeze
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Unsqueeze ========= Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input … |
|
Unsqueeze ========= Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input … |
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 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 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.
- mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze#
- class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_1(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRunUnaryNum
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _infer_shapes(x)#
Returns the same shape by default.
- _infer_sizes(*args, **kwargs)#
Should be overwritten.
- _infer_types(x)#
Returns the same type by default.
- _run(data)#
Should be overwritten.
- class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_11(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_1
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_13(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRun
Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input axes - which contains a list of dimension indices and this operator will insert a dimension of value 1 into the corresponding index of the output tensor (expanded).
- For example:
Given an input tensor (data) of shape [3, 4, 5], then Unsqueeze(data, axes=[0, 4]) outputs a tensor (expanded) containing same data as data but with shape [1, 3, 4, 5, 1].
The input axes should not contain any duplicate entries. It is an error if it contains duplicates. The rank of the output tensor (output_rank) is the rank of the input tensor (data) plus the number of values in axes. Each value in axes should be within the (inclusive) range [-output_rank , output_rank - 1]. The order of values in axes does not matter and can come in any order.
Inputs
data (heterogeneous)T: Original tensor
axes (heterogeneous)tensor(int64): List of integers indicating the dimensions to be inserted. Negative value means counting dimensions from the back. Accepted range is [-r, r-1] where r = rank(expanded).
Outputs
expanded (heterogeneous)T: Reshaped tensor with same data as input.
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: Unsqueeze
This version of the operator has been available since version 13.
Runtime implementation:
Unsqueeze
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _infer_shapes(x, axes=None)#
Should be overwritten.
- _infer_sizes(*args, **kwargs)#
Should be overwritten.
- _infer_types(x, axes=None)#
Should be overwritten.
- _run(data, axes=None)#
Should be overwritten.