module onnxrt.ops_cpu.op_size
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_size
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Size ==== Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the 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 modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_size.Size(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRun
Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor.
Inputs
data (heterogeneous)T: An input tensor.
Outputs
size (heterogeneous)T1: Total number of elements of the input 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): Input tensor can be of arbitrary type.
T1 tensor(int64): Constrain output to int64 tensor, which should be a scalar though.
Version
Onnx name: Size
This version of the operator has been available since version 13.
Runtime implementation:
Size
- 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)#
Should be overwritten.
- _infer_sizes(*args, **kwargs)#
Should be overwritten.
- _infer_types(x)#
Should be overwritten.
- _run(data)#
Should be overwritten.