module onnxrt.ops_cpu.op_non_zero
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_non_zero
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
NonZero ======= Returns the indices of the elements that are non-zero (in row-major order - by dimension). NonZero behaves … |
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_non_zero.NonZero(onnx_node, desc=None, **options)#
Bases:
OpRun
Returns the indices of the elements that are non-zero (in row-major order - by dimension). NonZero behaves similar to numpy.nonzero: https://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html, but for scalar input, NonZero produces output shape (0, N) instead of (1, N), which is different from Numpy’s behavior.
Inputs
X (heterogeneous)T: input
Outputs
Y (heterogeneous)tensor(int64): output
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 to all tensor types.
Version
Onnx name: NonZero
This version of the operator has been available since version 13.
Runtime implementation:
NonZero
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.