module onnxrt.ops_cpu.op_size#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_size

Short summary#

module mlprodict.onnxrt.ops_cpu.op_size

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Size

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

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_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

_infer_shapes

_infer_sizes

_infer_types

_run

Documentation#

Runtime operator.

source on GitHub

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_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

__init__(onnx_node, desc=None, **options)#
Parameters
  • onnx_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

_infer_shapes(x)#

Should be overwritten.

source on GitHub

_infer_sizes(*args, **kwargs)#

Should be overwritten.

source on GitHub

_infer_types(x)#

Should be overwritten.

source on GitHub

_run(data)#

Should be overwritten.

source on GitHub