module onnxrt.ops_cpu.op_range#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_range

Short summary#

module mlprodict.onnxrt.ops_cpu.op_range

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Range

Range ===== Generate a tensor containing a sequence of numbers that begin at start and extends by increments of delta

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__

_run

Documentation#

Runtime operator.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_range.Range(onnx_node, desc=None, **options)#

Bases: OpRun


Generate a tensor containing a sequence of numbers that begin at start and extends by increments of delta up to limit (exclusive).

The number of elements in the output of range is computed as below-

number_of_elements = max( ceil( (limit - start) / delta ) , 0 )

The pseudocode determining the contents of the output is shown below-

for(int i=0; i<number_of_elements; ++i)

{

` output[i] = start + (i * delta); `

}

Example 1 Inputs: start = 3, limit = 9, delta = 3 Output: [3, 6]

Example 2 Inputs: start = 10, limit = 4, delta = -2 Output: [10, 8, 6]

Inputs

  • start (heterogeneous)T: Scalar. First entry for the range of output values.

  • limit (heterogeneous)T: Scalar. Exclusive upper limit for the range of output values.

  • delta (heterogeneous)T: Scalar. Value to step by.

Outputs

  • output (heterogeneous)T: A 1-D tensor with same type as the inputs containing generated range of values.

Type Constraints

  • T tensor(float), tensor(double), tensor(int16), tensor(int32), tensor(int64): Constrain input types to common numeric type tensors.

Version

Onnx name: Range

This version of the operator has been available since version 11.

Runtime implementation: Range

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

Should be overwritten.

source on GitHub