module onnxrt.ops_cpu.op_unsqueeze#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_unsqueeze

Short summary#

module mlprodict.onnxrt.ops_cpu.op_unsqueeze

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Unsqueeze_1

Unsqueeze_11

Unsqueeze_13

Unsqueeze ========= Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input …

Unsqueeze_13

Unsqueeze ========= Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input …

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

__init__

__init__

__init__

_run

_run

_run

_run

Documentation#

Runtime operator.

source on GitHub

mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze#

alias of Unsqueeze_13

class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_1(onnx_node, desc=None, **options)#

Bases: OpRunUnaryNum

__init__(onnx_node, desc=None, **options)#
_run(data, attributes=None, verbose=0, fLOG=None)#

Should be overwritten.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_11(onnx_node, desc=None, **options)#

Bases: Unsqueeze_1

class mlprodict.onnxrt.ops_cpu.op_unsqueeze.Unsqueeze_13(onnx_node, desc=None, **options)#

Bases: OpRun

Unsqueeze#

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

__init__(onnx_node, desc=None, **options)#
_run(data, axes=None, attributes=None, verbose=0, fLOG=None)#

Should be overwritten.

source on GitHub