module onnxrt.ops_cpu.op_expand
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_expand
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Expand ====== Broadcast the input tensor following the given shape and the broadcast rule. The broadcast rule is similar … |
|
Expand ====== Broadcast the input tensor following the given shape and the broadcast rule. The broadcast rule is similar … |
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 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 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_expand.CommonExpand(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.
- class mlprodict.onnxrt.ops_cpu.op_expand.Expand_13(onnx_node, desc=None, **options)#
Bases:
CommonExpand
Expand#
Broadcast the input tensor following the given shape and the broadcast rule. The broadcast rule is similar to numpy.array(input) * numpy.ones(shape): Dimensions are right alignment; Two corresponding dimensions must have the same value, or one of them is equal to 1. Also, this operator is similar to numpy.broadcast_to(input, shape), but the major difference is numpy.broadcast_to() does not allow shape to be smaller than input.size(). It is possible that the output.shape is not equal to shape, when some dimensions in shape is equal to 1, or the shape.ndim < input.shape.ndim.
Inputs
input (heterogeneous)T: Input tensor
shape (heterogeneous)tensor(int64): A 1-D tensor indicates the shape you want to expand to, following the broadcast rule
Outputs
output (heterogeneous)T: Output tensor
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 tensors.
Version
Onnx name: Expand
This version of the operator has been available since version 13.
Runtime implementation:
Expand
- __init__(onnx_node, desc=None, **options)#