id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16,100 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pad.py | onnx.reference.ops.op_pad.Pad_1 | from onnx.reference.op_run import OpRun
class Pad_1(OpRun):
def _run(self, data, paddings=None, mode=None, value=None):
if value is None:
value = 0
return (_pad_impl(data, paddings, mode=mode, constant_values=value),) |
class Pad_1(OpRun):
def _run(self, data, paddings=None, mode=None, value=None):
pass | 2 | 0 | 4 | 0 | 4 | 1 | 2 | 0.2 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 5 | 0 | 5 | 2 | 3 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,101 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pad.py | onnx.reference.ops.op_pad.Pad_11 | from onnx.reference.op_run import OpRun
class Pad_11(OpRun):
def _run(self, data, pads, constant_value=None, mode=None):
if constant_value is None:
constant_value = 0
return (_pad_impl(data, pads, mode=mode, constant_values=constant_value, axes=None),) |
class Pad_11(OpRun):
def _run(self, data, pads, constant_value=None, mode=None):
pass | 2 | 0 | 6 | 0 | 6 | 1 | 2 | 0.14 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 7 | 0 | 7 | 2 | 5 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,102 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pad.py | onnx.reference.ops.op_pad.Pad_18 | from onnx.reference.op_run import OpRun
class Pad_18(OpRun):
def _run(self, data, pads, constant_value=None, axes=None, mode=None):
if constant_value is None:
constant_value = 0
return (_pad_impl(data, pads, mode=mode, constant_values=constant_value, axes=axes),) |
class Pad_18(OpRun):
def _run(self, data, pads, constant_value=None, axes=None, mode=None):
pass | 2 | 0 | 6 | 0 | 6 | 1 | 2 | 0.14 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 7 | 0 | 7 | 2 | 5 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,103 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pad.py | onnx.reference.ops.op_pad.Pad_2 | from onnx.reference.op_run import OpRun
class Pad_2(OpRun):
def _run(self, data, pads=None, mode=None, value=None):
if value is None:
value = 0
return (_pad_impl(data, pads, mode=mode, constant_values=value),) |
class Pad_2(OpRun):
def _run(self, data, pads=None, mode=None, value=None):
pass | 2 | 0 | 4 | 0 | 4 | 1 | 2 | 0.2 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 5 | 0 | 5 | 2 | 3 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,104 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pool_common.py | onnx.reference.ops.op_pool_common.CommonPool | from onnx.reference.op_run import OpRun
import numpy as np
class CommonPool(OpRun):
def _run(self, pooling_type, count_include_pad, x, auto_pad=None, ceil_mode=None, dilations=None, kernel_shape=None, pads=None, strides=None, p=None):
x_shape = np.shape(x)
pading_value = np.nan if pooling_type == ... |
class CommonPool(OpRun):
def _run(self, pooling_type, count_include_pad, x, auto_pad=None, ceil_mode=None, dilations=None, kernel_shape=None, pads=None, strides=None, p=None):
pass | 2 | 0 | 76 | 1 | 74 | 1 | 3 | 0.01 | 1 | 1 | 0 | 5 | 1 | 0 | 1 | 40 | 77 | 1 | 75 | 23 | 61 | 1 | 20 | 11 | 18 | 3 | 5 | 1 | 3 |
16,105 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_pow.py | onnx.reference.ops.op_pow.Pow | from warnings import catch_warnings, simplefilter
from onnx.reference.op_run import OpRun
import numpy as np
class Pow(OpRun):
def _run(self, a, b):
with catch_warnings():
simplefilter('ignore')
return (np.power(a, b).astype(a.dtype),) |
class Pow(OpRun):
def _run(self, a, b):
pass | 2 | 0 | 4 | 0 | 4 | 1 | 1 | 0.2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 5 | 0 | 5 | 2 | 3 | 1 | 5 | 2 | 3 | 1 | 5 | 1 | 1 |
16,106 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_prelu.py | onnx.reference.ops.op_prelu.PRelu | from onnx.reference.op_run import OpRun
import numpy as np
class PRelu(OpRun):
def _run(self, x, slope):
try:
return (np.where(x > 0, x, x * slope).astype(x.dtype),)
except ValueError:
if len(slope.shape) == 1:
dim = slope.shape[0]
new_shape ... |
class PRelu(OpRun):
def _run(self, x, slope):
pass | 2 | 0 | 23 | 0 | 18 | 6 | 6 | 0.32 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 40 | 24 | 0 | 19 | 7 | 17 | 6 | 18 | 7 | 16 | 6 | 5 | 4 | 6 |
16,107 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_qlinear_conv.py | onnx.reference.ops.op_qlinear_conv.QLinearConv | from onnx.reference.ops.op_conv import _conv_implementation
import numpy as np
from onnx.reference.op_run import OpRun
class QLinearConv(OpRun):
def _run(self, x, x_scale, x_zero_point, w, w_scale, w_zero_point, y_scale, y_zero_point, B=None, auto_pad=None, dilations=None, group=None, kernel_shape=None, pads=None... |
class QLinearConv(OpRun):
def _run(self, x, x_scale, x_zero_point, w, w_scale, w_zero_point, y_scale, y_zero_point, B=None, auto_pad=None, dilations=None, group=None, kernel_shape=None, pads=None, strides=None):
pass | 2 | 0 | 66 | 4 | 60 | 9 | 10 | 0.15 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 67 | 4 | 61 | 24 | 42 | 9 | 35 | 7 | 33 | 10 | 5 | 2 | 10 |
16,108 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_qlinear_matmul.py | onnx.reference.ops.op_qlinear_matmul.QLinearMatMul | from onnx.reference.op_run import OpRun
import numpy as np
class QLinearMatMul(OpRun):
def _run(self, a, a_scale, a_zero_point, b, b_scale, b_zero_point, y_scale, y_zero_point):
A = a.astype(np.int32)
if a_zero_point is not None:
A -= a_zero_point.astype(np.int32)
B = b.astype(... |
class QLinearMatMul(OpRun):
def _run(self, a, a_scale, a_zero_point, b, b_scale, b_zero_point, y_scale, y_zero_point):
pass | 2 | 0 | 15 | 0 | 15 | 1 | 4 | 0.06 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 16 | 0 | 16 | 8 | 12 | 1 | 14 | 6 | 12 | 4 | 5 | 1 | 4 |
16,109 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_quantize_linear.py | onnx.reference.ops.op_quantize_linear.QuantizeLinear_10 | class QuantizeLinear_10(_CommonQuantizeLinear):
def _run(self, x, y_scale, zero_point=None, axis: int=1):
if len(y_scale.shape) > 1:
raise ValueError('Input 2 must be a vector or a number.')
return super()._run(x, y_scale, zero_point, axis=axis) | class QuantizeLinear_10(_CommonQuantizeLinear):
def _run(self, x, y_scale, zero_point=None, axis: int=1):
pass | 2 | 0 | 4 | 0 | 4 | 2 | 2 | 0.4 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 42 | 5 | 0 | 5 | 2 | 3 | 2 | 5 | 2 | 3 | 2 | 6 | 1 | 2 |
16,110 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_quantize_linear.py | onnx.reference.ops.op_quantize_linear.QuantizeLinear_19 | class QuantizeLinear_19(_CommonQuantizeLinear):
def _run(self, x, y_scale, zero_point=None, axis: int=1, saturate: bool=True):
if len(y_scale.shape) > 1:
raise ValueError('Input 2 must be a vector or a number.')
return super()._run(x, y_scale, zero_point, axis=axis, saturate=saturate) | class QuantizeLinear_19(_CommonQuantizeLinear):
def _run(self, x, y_scale, zero_point=None, axis: int=1, saturate: bool=True):
pass | 2 | 0 | 4 | 0 | 4 | 2 | 2 | 0.4 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 42 | 5 | 0 | 5 | 2 | 3 | 2 | 5 | 2 | 3 | 2 | 6 | 1 | 2 |
16,111 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_quantize_linear.py | onnx.reference.ops.op_quantize_linear.QuantizeLinear_21 | class QuantizeLinear_21(_CommonQuantizeLinear):
def _run(self, *args, axis: int=1, saturate: bool=True, block_size: int=0, output_dtype=None):
return super()._run(*args, axis=axis, saturate=saturate, block_size=block_size, output_dtype=output_dtype) | class QuantizeLinear_21(_CommonQuantizeLinear):
def _run(self, *args, axis: int=1, saturate: bool=True, block_size: int=0, output_dtype=None):
pass | 2 | 0 | 9 | 0 | 8 | 3 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 42 | 10 | 0 | 9 | 2 | 7 | 3 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,112 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_quantize_linear.py | onnx.reference.ops.op_quantize_linear.QuantizeLinear_23 | class QuantizeLinear_23(_CommonQuantizeLinear):
def _run(self, *args, axis: int=1, saturate: bool=True, block_size: int=0, output_dtype=None, precision=None):
return super()._run(*args, axis=axis, saturate=saturate, block_size=block_size, output_dtype=output_dtype, precision=precision) | class QuantizeLinear_23(_CommonQuantizeLinear):
def _run(self, *args, axis: int=1, saturate: bool=True, block_size: int=0, output_dtype=None, precision=None):
pass | 2 | 0 | 18 | 0 | 17 | 3 | 1 | 0.17 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 42 | 19 | 0 | 18 | 10 | 8 | 3 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,113 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_quantize_linear.py | onnx.reference.ops.op_quantize_linear._CommonQuantizeLinear | from onnx.reference.op_run import OpRun
import onnx
import numpy as np
from onnx.helper import np_dtype_to_tensor_dtype, tensor_dtype_to_np_dtype
from onnx import TensorProto
class _CommonQuantizeLinear(OpRun):
def _run(self, x: np.ndarray, y_scale: np.ndarray, zero_point: np.ndarray | None=None, axis: int=1, sat... |
class _CommonQuantizeLinear(OpRun):
def _run(self, x: np.ndarray, y_scale: np.ndarray, zero_point: np.ndarray | None=None, axis: int=1, saturate: bool=True, block_size: int | None=None, output_dtype: TensorProto.DataType | None=None, precision: int | None=None) -> tuple[np.ndarray]:
pass | 2 | 0 | 59 | 6 | 52 | 5 | 11 | 0.08 | 1 | 4 | 0 | 4 | 2 | 0 | 2 | 41 | 141 | 13 | 126 | 29 | 113 | 10 | 63 | 19 | 60 | 13 | 5 | 2 | 21 |
16,114 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_random_normal.py | onnx.reference.ops.op_random_normal.RandomNormal | from onnx.reference.ops._op_common_random import _CommonRandom
class RandomNormal(_CommonRandom):
def _run(self, dtype=None, mean=None, scale=None, seed=None, shape=None):
state = self._get_state(seed)
numpy_type = self.numpy_type(dtype)
res = state.randn(*shape).astype(numpy_type)
... |
class RandomNormal(_CommonRandom):
def _run(self, dtype=None, mean=None, scale=None, seed=None, shape=None):
pass | 2 | 0 | 7 | 0 | 7 | 4 | 1 | 0.5 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 8 | 0 | 8 | 5 | 6 | 4 | 8 | 5 | 6 | 1 | 6 | 0 | 1 |
16,115 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_random_normal_like.py | onnx.reference.ops.op_random_normal_like.RandomNormalLike | from onnx.helper import np_dtype_to_tensor_dtype
from onnx.reference.ops._op_common_random import _CommonRandom
class RandomNormalLike(_CommonRandom):
def _run(self, x, dtype=None, mean=None, scale=None, seed=None):
if dtype is None:
dtype = np_dtype_to_tensor_dtype(x.dtype)
dtype = se... |
class RandomNormalLike(_CommonRandom):
def _run(self, x, dtype=None, mean=None, scale=None, seed=None):
pass | 2 | 0 | 9 | 0 | 9 | 3 | 2 | 0.3 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 10 | 0 | 10 | 4 | 8 | 3 | 10 | 4 | 8 | 2 | 6 | 1 | 2 |
16,116 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_random_uniform.py | onnx.reference.ops.op_random_uniform.RandomUniform | from onnx.reference.ops._op_common_random import _CommonRandom
class RandomUniform(_CommonRandom):
def _run(self, dtype=None, high=None, low=None, seed=None, shape=None):
dtype = self._dtype(dtype=dtype)
state = self._get_state(seed)
res = state.rand(*shape).astype(dtype)
res *= hi... |
class RandomUniform(_CommonRandom):
def _run(self, dtype=None, high=None, low=None, seed=None, shape=None):
pass | 2 | 0 | 7 | 0 | 7 | 4 | 1 | 0.5 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 8 | 0 | 8 | 4 | 6 | 4 | 8 | 4 | 6 | 1 | 6 | 0 | 1 |
16,117 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_random_uniform_like.py | onnx.reference.ops.op_random_uniform_like.RandomUniformLike | from onnx.reference.ops._op_common_random import _CommonRandom
from onnx.helper import np_dtype_to_tensor_dtype
class RandomUniformLike(_CommonRandom):
def _run(self, x, dtype=None, high=None, low=None, seed=None):
if dtype is None:
dtype = np_dtype_to_tensor_dtype(x.dtype)
dtype = sel... |
class RandomUniformLike(_CommonRandom):
def _run(self, x, dtype=None, high=None, low=None, seed=None):
pass | 2 | 0 | 9 | 0 | 9 | 3 | 2 | 0.3 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 10 | 0 | 10 | 4 | 8 | 3 | 10 | 4 | 8 | 2 | 6 | 1 | 2 |
16,118 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_range.py | onnx.reference.ops.op_range.Range | import numpy as np
from onnx.reference.op_run import OpRun
class Range(OpRun):
def _run(self, starts, ends, steps):
return (np.arange(starts, ends, steps).astype(starts.dtype),) |
class Range(OpRun):
def _run(self, starts, ends, steps):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,119 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reciprocal.py | onnx.reference.ops.op_reciprocal.Reciprocal | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Reciprocal(OpRunUnaryNum):
def _run(self, x):
with np.errstate(divide='ignore'):
return (np.reciprocal(x).astype(x.dtype),) |
class Reciprocal(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 3 | 0 | 3 | 1 | 1 | 0.25 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 4 | 0 | 4 | 2 | 2 | 1 | 4 | 2 | 2 | 1 | 7 | 1 | 1 |
16,120 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_l1.py | onnx.reference.ops.op_reduce_l1.ReduceL1_1 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceL1_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.sum(np.abs(data), axis=axes, keepdims=keepdims).astype(dtype=data.dtype)
if k... |
class ReduceL1_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 9 | 0 | 8 | 2 | 3 | 0.22 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 10 | 0 | 9 | 3 | 7 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,121 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_l1.py | onnx.reference.ops.op_reduce_l1.ReduceL1_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceL1_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
ke... |
class ReduceL1_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 13 | 1 | 11 | 4 | 3 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 14 | 1 | 12 | 3 | 10 | 4 | 10 | 3 | 8 | 3 | 6 | 1 | 3 |
16,122 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_l2.py | onnx.reference.ops.op_reduce_l2.ReduceL2_1 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceL2_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.sqrt(np.sum(np.square(data), axis=axes, keepdims=keepdims)).astype(dtype=data.dtype)
... |
class ReduceL2_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 9 | 0 | 8 | 2 | 3 | 0.22 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 10 | 0 | 9 | 3 | 7 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,123 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_l2.py | onnx.reference.ops.op_reduce_l2.ReduceL2_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceL2_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
ke... |
class ReduceL2_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 13 | 1 | 11 | 4 | 3 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 14 | 1 | 12 | 3 | 10 | 4 | 10 | 3 | 8 | 3 | 6 | 1 | 3 |
16,124 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_log_sum.py | onnx.reference.ops.op_reduce_log_sum.ReduceLogSum_1 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceLogSum_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=True):
tax = tuple(axes) if axes is not None else None
if data.size == 0:
return self.reduce_constant(data, -np.inf, tax, keepdims)
... |
class ReduceLogSum_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=True):
pass | 2 | 0 | 8 | 0 | 8 | 2 | 4 | 0.22 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 9 | 0 | 9 | 4 | 7 | 2 | 9 | 4 | 7 | 4 | 6 | 1 | 4 |
16,125 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_log_sum.py | onnx.reference.ops.op_reduce_log_sum.ReduceLogSum_18 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceLogSum_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
... |
class ReduceLogSum_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 14 | 3 | 11 | 3 | 4 | 0.25 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 15 | 3 | 12 | 3 | 10 | 3 | 12 | 3 | 10 | 4 | 6 | 1 | 4 |
16,126 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_log_sum_exp.py | onnx.reference.ops.op_reduce_log_sum_exp.ReduceLogSumExp_1 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceLogSumExp_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
tax = tuple(axes) if axes is not None else None
if data.size == 0:
return self.reduce_constant(data, -np.inf, tax, keepdims)... |
class ReduceLogSumExp_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 6 | 1 | 5 | 1 | 3 | 0.17 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 7 | 1 | 6 | 3 | 4 | 1 | 6 | 3 | 4 | 3 | 6 | 1 | 3 |
16,127 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_log_sum_exp.py | onnx.reference.ops.op_reduce_log_sum_exp.ReduceLogSumExp_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceLogSumExp_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
... |
class ReduceLogSumExp_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 11 | 3 | 8 | 3 | 3 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 12 | 3 | 9 | 2 | 7 | 3 | 9 | 2 | 7 | 3 | 6 | 1 | 3 |
16,128 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_max.py | onnx.reference.ops.op_reduce_max.ReduceMax_1 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceMax_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
if data.size == 0:
minvalue = np.iinfo(data.dtype).min if np.issubdtype(data.dtyp... |
class ReduceMax_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 15 | 1 | 13 | 2 | 5 | 0.14 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 16 | 1 | 14 | 4 | 12 | 2 | 10 | 4 | 8 | 5 | 6 | 1 | 5 |
16,129 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_max.py | onnx.reference.ops.op_reduce_max.ReduceMax_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceMax_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims: int=1, noop_with_empty_axes: int=0):
if self.is_axes_empty(axes) and noop_with_empty_axes != 0:
return (data,)
axes = self.handle_axes(... |
class ReduceMax_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims: int=1, noop_with_empty_axes: int=0):
pass | 2 | 0 | 19 | 2 | 16 | 4 | 5 | 0.24 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 20 | 2 | 17 | 4 | 15 | 4 | 13 | 4 | 11 | 5 | 6 | 1 | 5 |
16,130 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_mean.py | onnx.reference.ops.op_reduce_mean.ReduceMean_1 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceMean_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.mean(data, axis=axes, keepdims=keepdims, dtype=data.dtype)
if keepdims == 0... |
class ReduceMean_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 7 | 0 | 6 | 2 | 3 | 0.29 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 8 | 0 | 7 | 3 | 5 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,131 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_mean.py | onnx.reference.ops.op_reduce_mean.ReduceMean_18 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceMean_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
... |
class ReduceMean_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 16 | 1 | 14 | 6 | 4 | 0.4 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 17 | 1 | 15 | 4 | 13 | 6 | 13 | 3 | 11 | 4 | 6 | 2 | 4 |
16,132 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_min.py | onnx.reference.ops.op_reduce_min.ReduceMin_1 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceMin_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
if data.size == 0:
maxvalue = np.iinfo(data.dtype).max if np.issubdtype(data.dtyp... |
class ReduceMin_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 15 | 1 | 13 | 2 | 5 | 0.14 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 45 | 16 | 1 | 14 | 4 | 12 | 2 | 10 | 4 | 8 | 5 | 6 | 1 | 5 |
16,133 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_min.py | onnx.reference.ops.op_reduce_min.ReduceMin_11 | class ReduceMin_11(ReduceMin_1):
pass | class ReduceMin_11(ReduceMin_1):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 7 | 0 | 0 |
16,134 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_min.py | onnx.reference.ops.op_reduce_min.ReduceMin_18 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceMin_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims: int=1, noop_with_empty_axes: int=0):
if self.is_axes_empty(axes) and noop_with_empty_axes != 0:
return (data,)
axes = self.handle_axes(... |
class ReduceMin_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims: int=1, noop_with_empty_axes: int=0):
pass | 2 | 0 | 19 | 2 | 16 | 4 | 5 | 0.24 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 20 | 2 | 17 | 4 | 15 | 4 | 13 | 4 | 11 | 5 | 6 | 1 | 5 |
16,135 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_prod.py | onnx.reference.ops.op_reduce_prod.ReduceProd_1 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceProd_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.prod(data, axis=axes, keepdims=keepdims, dtype=data.dtype)
if keepdims == 0... |
class ReduceProd_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 7 | 0 | 6 | 2 | 3 | 0.29 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 8 | 0 | 7 | 3 | 5 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,136 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_prod.py | onnx.reference.ops.op_reduce_prod.ReduceProd_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceProd_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (data,)
axes = self.handle_axes(axes)
... |
class ReduceProd_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 11 | 1 | 9 | 4 | 3 | 0.4 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 12 | 1 | 10 | 3 | 8 | 4 | 10 | 3 | 8 | 3 | 6 | 1 | 3 |
16,137 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_sum.py | onnx.reference.ops.op_reduce_sum.ReduceSum_1 | import numpy as np
from onnx.reference.ops._op import OpRunReduceNumpy
class ReduceSum_1(OpRunReduceNumpy):
def _run(self, x, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.sum(x, axis=axes, keepdims=keepdims, dtype=x.dtype)
if keepdims == 0 and (not i... |
class ReduceSum_1(OpRunReduceNumpy):
def _run(self, x, axes=None, keepdims=None):
pass | 2 | 0 | 7 | 0 | 6 | 2 | 3 | 0.29 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 8 | 0 | 7 | 3 | 5 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,138 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_sum.py | onnx.reference.ops.op_reduce_sum.ReduceSum_13 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceSum_13(OpRunReduceNumpy):
def _run(self, x, axes=None, keepdims=None, noop_with_empty_axes=None):
if self.is_axes_empty(axes) and noop_with_empty_axes:
return (x,)
axes = self.handle_axes(axes)
t... |
class ReduceSum_13(OpRunReduceNumpy):
def _run(self, x, axes=None, keepdims=None, noop_with_empty_axes=None):
pass | 2 | 0 | 14 | 0 | 13 | 3 | 4 | 0.21 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 15 | 0 | 14 | 4 | 12 | 3 | 12 | 3 | 10 | 4 | 6 | 2 | 4 |
16,139 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_sum_square.py | onnx.reference.ops.op_reduce_sum_square.ReduceSumSquare_1 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceSumSquare_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
axes = tuple(axes) if axes is not None else None
res = np.sum(np.square(data), axis=axes, keepdims=keepdims)
if keepdims == 0 an... |
class ReduceSumSquare_1(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=None):
pass | 2 | 0 | 7 | 0 | 6 | 2 | 3 | 0.29 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 45 | 8 | 0 | 7 | 3 | 5 | 2 | 7 | 3 | 5 | 3 | 6 | 1 | 3 |
16,140 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reduce_sum_square.py | onnx.reference.ops.op_reduce_sum_square.ReduceSumSquare_18 | from onnx.reference.ops._op import OpRunReduceNumpy
import numpy as np
class ReduceSumSquare_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
if self.is_axes_empty(axes) and noop_with_empty_axes != 0:
return (np.square(data),)
axes = self.handl... |
class ReduceSumSquare_18(OpRunReduceNumpy):
def _run(self, data, axes=None, keepdims=1, noop_with_empty_axes=0):
pass | 2 | 0 | 11 | 1 | 9 | 4 | 3 | 0.4 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 45 | 12 | 1 | 10 | 3 | 8 | 4 | 10 | 3 | 8 | 3 | 6 | 1 | 3 |
16,141 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_regex_full_match.py | onnx.reference.ops.op_regex_full_match.RegexFullMatch | import re
import numpy as np
from onnx.reference.op_run import OpRun
class RegexFullMatch(OpRun):
def _run(self, x, pattern=None):
if x.dtype.kind not in _acceptable_str_dtypes:
raise TypeError(f'Input must be string tensor, received dtype {x.dtype}')
try:
regex = re.compil... |
class RegexFullMatch(OpRun):
def _run(self, x, pattern=None):
pass | 2 | 0 | 20 | 2 | 17 | 1 | 4 | 0.06 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 40 | 21 | 2 | 18 | 6 | 15 | 1 | 14 | 5 | 11 | 4 | 5 | 1 | 4 |
16,142 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_relu.py | onnx.reference.ops.op_relu.Relu | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Relu(OpRunUnaryNum):
def _run(self, x):
return (np.maximum(x, 0).astype(x.dtype),) |
class Relu(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,143 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reshape.py | onnx.reference.ops.op_reshape.CommonReshape | from onnx.reference.op_run import OpRun
class CommonReshape(OpRun):
def _run(self, data, shape):
return (reshape_reference_implementation(data, shape, 0),) |
class CommonReshape(OpRun):
def _run(self, data, shape):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,144 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reshape.py | onnx.reference.ops.op_reshape.Reshape_14 | class Reshape_14(CommonReshape):
def _run(self, data, shape, allowzero=None):
if allowzero is None:
allowzero = getattr(self, 'allowzero', 0) == 1
else:
allowzero = allowzero == 1
return (reshape_reference_implementation(data, shape, allowzero),) | class Reshape_14(CommonReshape):
def _run(self, data, shape, allowzero=None):
pass | 2 | 0 | 6 | 0 | 6 | 1 | 2 | 0.14 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 7 | 0 | 7 | 2 | 5 | 1 | 6 | 2 | 4 | 2 | 6 | 1 | 2 |
16,145 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reshape.py | onnx.reference.ops.op_reshape.Reshape_5 | class Reshape_5(CommonReshape):
pass | class Reshape_5(CommonReshape):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
16,146 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_resize.py | onnx.reference.ops.op_resize.Resize | import onnx
import numpy as np
from onnx.reference.op_run import OpRun
class Resize(OpRun):
def _run(self, X, roi, scales=None, sizes=None, antialias=None, axes=None, coordinate_transformation_mode=None, cubic_coeff_a=None, exclude_outside=None, extrapolation_value=None, keep_aspect_ratio_policy=None, mode: str |... |
class Resize(OpRun):
def _run(self, X, roi, scales=None, sizes=None, antialias=None, axes=None, coordinate_transformation_mode=None, cubic_coeff_a=None, exclude_outside=None, extrapolation_value=None, keep_aspect_ratio_policy=None, mode: str | None=None, nearest_mode=None):
pass
def fct(x... | 4 | 0 | 29 | 2 | 27 | 3 | 5 | 0.11 | 1 | 7 | 0 | 0 | 1 | 0 | 1 | 40 | 84 | 7 | 76 | 31 | 57 | 8 | 35 | 16 | 31 | 12 | 5 | 2 | 14 |
16,147 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_reverse_sequence.py | onnx.reference.ops.op_reverse_sequence.ReverseSequence | from onnx.reference.op_run import OpRun
class ReverseSequence(OpRun):
def _run(self, data, sequence_lens, batch_axis=None, time_axis=None):
index = [slice(0, s) for s in data.shape]
index_data = [slice(0, s) for s in data.shape]
result = data.copy()
for i, sl in enumerate(sequence_... |
class ReverseSequence(OpRun):
def _run(self, data, sequence_lens, batch_axis=None, time_axis=None):
pass | 2 | 0 | 11 | 0 | 11 | 4 | 2 | 0.33 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 40 | 12 | 0 | 12 | 6 | 10 | 4 | 12 | 6 | 10 | 2 | 5 | 1 | 2 |
16,148 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_rnn.py | onnx.reference.ops.op_rnn.CommonRNN | import numpy as np
from onnx.reference.op_run import OpRun
class CommonRNN(OpRun):
def __init__(self, onnx_node, run_params):
OpRun.__init__(self, onnx_node, run_params)
if self.direction in ('forward', 'reverse'):
self.num_directions = 1
elif self.direction == 'bidirectional':... |
class CommonRNN(OpRun):
def __init__(self, onnx_node, run_params):
pass
def choose_act(self, name, alpha, beta):
pass
def _f_tanh(self, x):
pass
def _step(self, X, R, B, W, H_0):
pass
def _run(self, X, W, R, B=None, sequence_lens=None, initial_h=None, activation... | 6 | 0 | 26 | 2 | 24 | 7 | 5 | 0.27 | 1 | 2 | 0 | 2 | 5 | 5 | 5 | 44 | 137 | 13 | 123 | 37 | 102 | 33 | 59 | 21 | 53 | 10 | 5 | 2 | 27 |
16,149 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_rnn.py | onnx.reference.ops.op_rnn.RNN_14 | class RNN_14(CommonRNN):
pass | class RNN_14(CommonRNN):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
16,150 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_rnn.py | onnx.reference.ops.op_rnn.RNN_7 | class RNN_7(CommonRNN):
pass | class RNN_7(CommonRNN):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
16,151 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_roi_align.py | onnx.reference.ops.op_roi_align.PreCalc | class PreCalc:
def __init__(self, pos1=0, pos2=0, pos3=0, pos4=0, w1=0, w2=0, w3=0, w4=0):
self.pos1 = pos1
self.pos2 = pos2
self.pos3 = pos3
self.pos4 = pos4
self.w1 = w1
self.w2 = w2
self.w3 = w3
self.w4 = w4
def __repr__(self) -> str:
... | class PreCalc:
def __init__(self, pos1=0, pos2=0, pos3=0, pos4=0, w1=0, w2=0, w3=0, w4=0):
pass
def __repr__(self) -> str:
pass | 3 | 0 | 6 | 0 | 6 | 1 | 1 | 0.08 | 0 | 1 | 0 | 0 | 2 | 8 | 2 | 2 | 13 | 1 | 12 | 11 | 9 | 1 | 12 | 11 | 9 | 1 | 0 | 0 | 2 |
16,152 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_roi_align.py | onnx.reference.ops.op_roi_align.RoiAlign | from onnx.reference.op_run import OpRun
import numpy as np
class RoiAlign(OpRun):
@staticmethod
def pre_calc_for_bilinear_interpolate(height: int, width: int, pooled_height: int, pooled_width: int, iy_upper: int, ix_upper: int, roi_start_h, roi_start_w, bin_size_h, bin_size_w, roi_bin_grid_h: int, roi_bin_gri... |
class RoiAlign(OpRun):
@staticmethod
def pre_calc_for_bilinear_interpolate(height: int, width: int, pooled_height: int, pooled_width: int, iy_upper: int, ix_upper: int, roi_start_h, roi_start_w, bin_size_h, bin_size_w, roi_bin_grid_h: int, roi_bin_grid_w: int, pre_calc):
pass
@staticmethod
def... | 6 | 0 | 89 | 8 | 77 | 8 | 8 | 0.1 | 1 | 5 | 1 | 0 | 1 | 0 | 3 | 42 | 271 | 26 | 234 | 106 | 190 | 24 | 120 | 65 | 116 | 15 | 5 | 8 | 24 |
16,153 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_round.py | onnx.reference.ops.op_round.Round | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Round(OpRunUnaryNum):
def _run(self, x):
return (np.round(x).astype(x.dtype),) |
class Round(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,154 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_scan.py | onnx.reference.ops.op_scan.Scan | import numpy as np
from onnx.reference.op_run import OpRun
class Scan(OpRun):
def __init__(self, onnx_node, run_params):
OpRun.__init__(self, onnx_node, run_params)
if not hasattr(self.body, 'run'):
raise RuntimeError(f"Parameter 'body' must have a method 'run', type {type(self.body)}.... |
class Scan(OpRun):
def __init__(self, onnx_node, run_params):
pass
def _common_run_shape(self, *args):
pass
def _run(self, *args, body=None, num_scan_inputs=None, scan_input_axes=None, scan_input_directions=None, scan_output_axes=None, scan_output_directions=None, attributes=None):
... | 4 | 0 | 46 | 3 | 42 | 11 | 5 | 0.25 | 1 | 7 | 0 | 0 | 3 | 4 | 3 | 42 | 140 | 11 | 128 | 54 | 114 | 32 | 52 | 32 | 48 | 6 | 5 | 2 | 16 |
16,155 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_scatter_elements.py | onnx.reference.ops.op_scatter_elements.ScatterElements | from onnx.reference.op_run import OpRun
class ScatterElements(OpRun):
def _run(self, data, indices, updates, axis=None, reduction=None):
res = scatter_elements(data, indices, updates, axis=axis, reduction=reduction)
return (res,) |
class ScatterElements(OpRun):
def _run(self, data, indices, updates, axis=None, reduction=None):
pass | 2 | 0 | 3 | 0 | 3 | 1 | 1 | 0.25 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
16,156 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_scatternd.py | onnx.reference.ops.op_scatternd.ScatterND | from onnx.reference.op_run import OpRun
class ScatterND(OpRun):
def _run(self, data, indices, updates, reduction=None):
y = _scatter_nd_impl(data, indices, updates, reduction=reduction)
return (y,) |
class ScatterND(OpRun):
def _run(self, data, indices, updates, reduction=None):
pass | 2 | 0 | 3 | 0 | 3 | 1 | 1 | 0.25 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
16,157 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_selu.py | onnx.reference.ops.op_selu.Selu | import numpy as np
from onnx.reference.op_run import OpRun
class Selu(OpRun):
def _run(self, x, alpha=None, gamma=None):
return ((np.where(x > 0, x, np.exp(x) * alpha - alpha) * gamma).astype(x.dtype),) |
class Selu(OpRun):
def _run(self, x, alpha=None, gamma=None):
pass | 2 | 0 | 4 | 0 | 4 | 1 | 1 | 0.2 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 5 | 0 | 5 | 2 | 3 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,158 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_at.py | onnx.reference.ops.op_sequence_at.SequenceAt | from onnx.reference.op_run import OpRun
class SequenceAt(OpRun):
def _run(self, seq, index):
return (seq[index],) |
class SequenceAt(OpRun):
def _run(self, seq, index):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,159 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_construct.py | onnx.reference.ops.op_sequence_construct.SequenceConstruct | from onnx.reference.op_run import OpRun
class SequenceConstruct(OpRun):
def _run(self, *data):
return (list(data),) |
class SequenceConstruct(OpRun):
def _run(self, *data):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,160 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_empty.py | onnx.reference.ops.op_sequence_empty.SequenceEmpty | from onnx.reference.op_run import OpRun
class SequenceEmpty(OpRun):
def _run(self, dtype=None):
return ([],) |
class SequenceEmpty(OpRun):
def _run(self, dtype=None):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,161 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_erase.py | onnx.reference.ops.op_sequence_erase.SequenceErase | from onnx.reference.op_run import OpRun
class SequenceErase(OpRun):
def _run(self, S, ind=None):
if ind is None:
ind = -1
else:
ind = int(ind)
S2 = S.copy()
del S2[ind]
return (S2,) |
class SequenceErase(OpRun):
def _run(self, S, ind=None):
pass | 2 | 0 | 8 | 0 | 8 | 1 | 2 | 0.11 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 9 | 0 | 9 | 3 | 7 | 1 | 8 | 3 | 6 | 2 | 5 | 1 | 2 |
16,162 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_insert.py | onnx.reference.ops.op_sequence_insert.SequenceInsert | from onnx.reference.op_run import OpRun
class SequenceInsert(OpRun):
def _run(self, S, T, ind=None):
if ind is None:
res = sequence_insert_reference_implementation(S, T)
elif isinstance(ind, int):
res = sequence_insert_reference_implementation(S, T, [ind])
elif len(... |
class SequenceInsert(OpRun):
def _run(self, S, T, ind=None):
pass | 2 | 0 | 12 | 0 | 12 | 3 | 5 | 0.23 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 13 | 0 | 13 | 3 | 11 | 3 | 9 | 3 | 7 | 5 | 5 | 1 | 5 |
16,163 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_length.py | onnx.reference.ops.op_sequence_length.SequenceLength | from onnx.reference.op_run import OpRun
import numpy as np
class SequenceLength(OpRun):
def _run(self, input_sequence):
if not isinstance(input_sequence, list):
raise TypeError(f'input_sequence must be a list not {type(input_sequence)}.')
return (np.array(len(input_sequence), dtype=np.... |
class SequenceLength(OpRun):
def _run(self, input_sequence):
pass | 2 | 0 | 6 | 0 | 6 | 1 | 2 | 0.14 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 40 | 7 | 0 | 7 | 2 | 5 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,164 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sequence_map.py | onnx.reference.ops.op_sequence_map.SequenceMap | from onnx.reference.op_run import OpRun
class SequenceMap(OpRun):
def _run(self, input_sequence, *additional_inputs, body=None, attributes=None):
if len(additional_inputs) == 1 and isinstance(additional_inputs[0], list):
res = None
for obj1, obj2 in zip(input_sequence, additional_i... |
class SequenceMap(OpRun):
def _run(self, input_sequence, *additional_inputs, body=None, attributes=None):
pass | 2 | 0 | 24 | 1 | 23 | 3 | 8 | 0.13 | 1 | 4 | 0 | 0 | 1 | 0 | 1 | 40 | 25 | 1 | 24 | 8 | 22 | 3 | 22 | 8 | 20 | 8 | 5 | 4 | 8 |
16,165 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_shape.py | onnx.reference.ops.op_shape.Shape_1 | from onnx.reference.op_run import OpRun
import numpy as np
class Shape_1(OpRun):
def _run(self, data):
return (np.array(data.shape, dtype=np.int64),) |
class Shape_1(OpRun):
def _run(self, data):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,166 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_shape.py | onnx.reference.ops.op_shape.Shape_15 | import numpy as np
class Shape_15(Shape_1):
@staticmethod
def _interval(n: int, start: int | None, end: int | None) -> tuple[int, int] | None:
if start == 0:
if end is None or np.isnan(end):
return None
if end < 0:
return (0, n + end)
... |
class Shape_15(Shape_1):
@staticmethod
def _interval(n: int, start: int | None, end: int | None) -> tuple[int, int] | None:
pass
def _run(self, data, end=None, start=None):
pass | 4 | 0 | 9 | 0 | 9 | 2 | 4 | 0.21 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 42 | 20 | 1 | 19 | 5 | 15 | 4 | 18 | 4 | 15 | 6 | 6 | 2 | 8 |
16,167 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_shrink.py | onnx.reference.ops.op_shrink.Shrink | import numpy as np
from onnx.reference.op_run import OpRun
class Shrink(OpRun):
def _run(self, x, bias=None, lambd=None):
return (np.where(x < -lambd, x + bias, np.where(x > lambd, x - bias, 0)).astype(x.dtype),) |
class Shrink(OpRun):
def _run(self, x, bias=None, lambd=None):
pass | 2 | 0 | 8 | 0 | 8 | 1 | 1 | 0.11 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 9 | 0 | 9 | 2 | 7 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,168 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sigmoid.py | onnx.reference.ops.op_sigmoid.Sigmoid | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Sigmoid(OpRunUnaryNum):
def __init__(self, onnx_node, run_params):
OpRunUnaryNum.__init__(self, onnx_node, run_params)
self.vf = np.vectorize(sigmoid)
def _run(self, X):
if len(X.shape) == 0:
return ... |
class Sigmoid(OpRunUnaryNum):
def __init__(self, onnx_node, run_params):
pass
def _run(self, X):
pass | 3 | 0 | 5 | 0 | 5 | 1 | 2 | 0.2 | 1 | 0 | 0 | 0 | 2 | 1 | 2 | 43 | 11 | 1 | 10 | 4 | 7 | 2 | 10 | 4 | 7 | 3 | 7 | 1 | 4 |
16,169 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sign.py | onnx.reference.ops.op_sign.Sign | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Sign(OpRunUnaryNum):
def _run(self, x):
return (np.sign(x),) |
class Sign(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,170 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sin.py | onnx.reference.ops.op_sin.Sin | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Sin(OpRunUnaryNum):
def _run(self, x):
return (np.sin(x),) |
class Sin(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,171 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sinh.py | onnx.reference.ops.op_sinh.Sinh | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Sinh(OpRunUnaryNum):
def _run(self, x):
return (np.sinh(x),) |
class Sinh(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,172 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_size.py | onnx.reference.ops.op_size.Size | import numpy as np
from onnx.reference.op_run import OpRun
class Size(OpRun):
def _run(self, data):
return (np.array(data.size, dtype=np.int64),) |
class Size(OpRun):
def _run(self, data):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,173 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_slice.py | onnx.reference.ops.op_slice.SliceCommon | from onnx.reference.ops._op import OpRun
class SliceCommon(OpRun):
def _run(self, data, starts, ends, axes=None, steps=None):
res = _slice(data, starts, ends, axes, steps)
return (res,) |
class SliceCommon(OpRun):
def _run(self, data, starts, ends, axes=None, steps=None):
pass | 2 | 0 | 3 | 0 | 3 | 1 | 1 | 0.25 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 40 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
16,174 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_slice.py | onnx.reference.ops.op_slice.Slice_1 | class Slice_1(SliceCommon):
def __init__(self, onnx_node, run_params):
SliceCommon.__init__(self, onnx_node, run_params)
for f in ['starts', 'ends', 'steps', 'axes']:
if not hasattr(self, f):
continue
if getattr(self, f) is not None and len(getattr(self, f)) ... | class Slice_1(SliceCommon):
def __init__(self, onnx_node, run_params):
pass
def _run(self, data, axes=None, ends=None, starts=None):
pass | 3 | 0 | 5 | 0 | 5 | 1 | 3 | 0.2 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 42 | 11 | 1 | 10 | 4 | 7 | 2 | 10 | 4 | 7 | 4 | 6 | 2 | 5 |
16,175 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_slice.py | onnx.reference.ops.op_slice.Slice_10 | class Slice_10(SliceCommon):
def __init__(self, onnx_node, run_params):
SliceCommon.__init__(self, onnx_node, run_params) | class Slice_10(SliceCommon):
def __init__(self, onnx_node, run_params):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,176 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_softmax.py | onnx.reference.ops.op_softmax.Softmax | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Softmax(OpRunUnaryNum):
def _run(self, X, axis=None):
if X.size == 0:
return (X,)
axis = axis or self.axis
tmp = X - X.max(axis=axis, keepdims=1)
Y = np.exp(tmp)
Y /= Y.sum(axis=axis, keep... |
class Softmax(OpRunUnaryNum):
def _run(self, X, axis=None):
pass | 2 | 0 | 6 | 0 | 6 | 4 | 1 | 0.57 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 42 | 7 | 0 | 7 | 4 | 5 | 4 | 7 | 4 | 5 | 1 | 7 | 0 | 1 |
16,177 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_softmax_cross_entropy_loss.py | onnx.reference.ops.op_softmax_cross_entropy_loss.SoftmaxCrossEntropyLoss | from onnx.reference.op_run import OpRun
class SoftmaxCrossEntropyLoss(OpRun):
def _run(self, x, target, weight=None, ignore_index=None, reduction=None):
n_outputs = len(self.onnx_node.output)
return softmaxcrossentropy(x, target, weight=weight, reduction=reduction, ignore_index=ignore_index, get_l... |
class SoftmaxCrossEntropyLoss(OpRun):
def _run(self, x, target, weight=None, ignore_index=None, reduction=None):
pass | 2 | 0 | 10 | 0 | 10 | 2 | 1 | 0.18 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 11 | 0 | 11 | 3 | 9 | 2 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
16,178 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_softplus.py | onnx.reference.ops.op_softplus.Softplus | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Softplus(OpRunUnaryNum):
def _run(self, X):
tmp = np.asarray(np.exp(X), dtype=X.dtype)
tmp += 1
np.log(tmp, out=tmp)
return (tmp,) |
class Softplus(OpRunUnaryNum):
def _run(self, X):
pass | 2 | 0 | 5 | 0 | 5 | 1 | 1 | 0.17 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 6 | 0 | 6 | 3 | 4 | 1 | 6 | 3 | 4 | 1 | 7 | 0 | 1 |
16,179 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_softsign.py | onnx.reference.ops.op_softsign.Softsign | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Softsign(OpRunUnaryNum):
def _run(self, X):
tmp = np.abs(X)
tmp += 1
np.divide(X, tmp, out=tmp)
return (tmp,) |
class Softsign(OpRunUnaryNum):
def _run(self, X):
pass | 2 | 0 | 5 | 0 | 5 | 1 | 1 | 0.17 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 6 | 0 | 6 | 3 | 4 | 1 | 6 | 3 | 4 | 1 | 7 | 0 | 1 |
16,180 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_space_to_depth.py | onnx.reference.ops.op_space_to_depth.SpaceToDepth | import numpy as np
from onnx.reference.op_run import OpRun
class SpaceToDepth(OpRun):
def _run(self, data, blocksize=None):
if len(data.shape) != 4:
raise RuntimeError(f'Unexpected shape {data.shape!r}.')
b, C, H, W = data.shape
tmpshape = (b, C, H // blocksize, blocksize, W //... |
class SpaceToDepth(OpRun):
def _run(self, data, blocksize=None):
pass | 2 | 0 | 22 | 0 | 22 | 1 | 2 | 0.04 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 23 | 0 | 23 | 8 | 21 | 1 | 11 | 8 | 9 | 2 | 5 | 1 | 2 |
16,181 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split.py | onnx.reference.ops.op_split.CommonSplit | from onnx.reference.op_run import OpRun
class CommonSplit(OpRun):
def __init__(self, onnx_node, run_params):
OpRun.__init__(self, onnx_node, run_params)
self.n_outputs = len(onnx_node.output)
def common_run(self, mat, split, axis, num_outputs):
n_outputs = num_outputs or self.n_output... |
class CommonSplit(OpRun):
def __init__(self, onnx_node, run_params):
pass
def common_run(self, mat, split, axis, num_outputs):
pass | 3 | 0 | 11 | 1 | 11 | 2 | 3 | 0.18 | 1 | 2 | 0 | 3 | 2 | 1 | 2 | 41 | 24 | 2 | 22 | 10 | 19 | 4 | 21 | 10 | 18 | 4 | 5 | 2 | 5 |
16,182 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split.py | onnx.reference.ops.op_split.Split_11 | class Split_11(Split_2):
pass | class Split_11(Split_2):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 7 | 0 | 0 |
16,183 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split.py | onnx.reference.ops.op_split.Split_13 | class Split_13(CommonSplit):
def _run(self, mat, split=None, axis=None):
return self.common_run(mat, split, axis=axis, num_outputs=None) | class Split_13(CommonSplit):
def _run(self, mat, split=None, axis=None):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,184 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split.py | onnx.reference.ops.op_split.Split_18 | class Split_18(CommonSplit):
def _run(self, mat, split=None, axis=None, num_outputs=None):
return self.common_run(mat, split, axis=axis, num_outputs=num_outputs) | class Split_18(CommonSplit):
def _run(self, mat, split=None, axis=None, num_outputs=None):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,185 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split.py | onnx.reference.ops.op_split.Split_2 | class Split_2(CommonSplit):
def _run(self, mat, axis=None, split=None):
return self.common_run(mat, split, axis=axis, num_outputs=None) | class Split_2(CommonSplit):
def _run(self, mat, axis=None, split=None):
pass | 2 | 0 | 2 | 0 | 2 | 2 | 1 | 0.67 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 2 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
16,186 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_split_to_sequence.py | onnx.reference.ops.op_split_to_sequence.SplitToSequence | from onnx.reference.op_run import OpRun
class SplitToSequence(OpRun):
def common_run(self, mat: np.ndarray, split: np.ndarray | None, axis: int) -> list[np.ndarray]:
if split is None:
split_length = [1 for _ in range(mat.shape[axis])]
elif len(split.shape) == 0:
dim = mat.s... |
class SplitToSequence(OpRun):
def common_run(self, mat: np.ndarray, split: np.ndarray | None, axis: int) -> list[np.ndarray]:
pass
def _run(self, mat: np.ndarray, split: np.ndarray | None=None, axis: int=0, keepdims: int=1) -> tuple[np.ndarray]:
pass | 3 | 0 | 20 | 1 | 19 | 1 | 4 | 0.05 | 1 | 5 | 0 | 0 | 2 | 0 | 2 | 41 | 41 | 2 | 38 | 23 | 27 | 2 | 28 | 15 | 25 | 5 | 5 | 2 | 8 |
16,187 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sqrt.py | onnx.reference.ops.op_sqrt.Sqrt | from onnx.reference.ops._op import OpRunUnaryNum
from warnings import catch_warnings, simplefilter
import numpy as np
class Sqrt(OpRunUnaryNum):
def _run(self, x):
with catch_warnings():
simplefilter('ignore')
return (np.sqrt(x).astype(x.dtype),) |
class Sqrt(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 4 | 0 | 4 | 1 | 1 | 0.2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 42 | 5 | 0 | 5 | 2 | 3 | 1 | 5 | 2 | 3 | 1 | 7 | 1 | 1 |
16,188 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_squeeze.py | onnx.reference.ops.op_squeeze.Squeeze_1 | import numpy as np
from onnx.reference.op_run import OpRun
class Squeeze_1(OpRun):
def _run(self, data, axes=None):
if isinstance(axes, np.ndarray):
axes = tuple(axes)
elif axes in [[], ()]:
axes = None
elif isinstance(axes, list):
axes = tuple(axes)
... |
class Squeeze_1(OpRun):
def _run(self, data, axes=None):
pass | 2 | 0 | 14 | 0 | 14 | 1 | 6 | 0.07 | 1 | 3 | 0 | 1 | 1 | 0 | 1 | 40 | 15 | 0 | 15 | 4 | 13 | 1 | 12 | 4 | 10 | 6 | 5 | 2 | 6 |
16,189 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_squeeze.py | onnx.reference.ops.op_squeeze.Squeeze_11 | class Squeeze_11(Squeeze_1):
pass | class Squeeze_11(Squeeze_1):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
16,190 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_squeeze.py | onnx.reference.ops.op_squeeze.Squeeze_13 | from onnx.reference.op_run import OpRun
import numpy as np
class Squeeze_13(OpRun):
def __init__(self, onnx_node, run_params):
OpRun.__init__(self, onnx_node, run_params)
self.axes = None
def _run(self, data, axes=None):
if axes is not None:
if hasattr(axes, '__iter__'):
... |
class Squeeze_13(OpRun):
def __init__(self, onnx_node, run_params):
pass
def _run(self, data, axes=None):
pass | 3 | 0 | 6 | 0 | 6 | 1 | 2 | 0.15 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 41 | 14 | 1 | 13 | 5 | 10 | 2 | 11 | 5 | 8 | 3 | 5 | 2 | 4 |
16,191 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_stft.py | onnx.reference.ops.op_stft.STFT | from onnx.reference.op_run import OpRun
import numpy as np
class STFT(OpRun):
def _run(self, x, frame_step, window=None, frame_length=None, onesided=None):
if frame_length is None:
if window is None:
frame_length = x.shape[-2]
else:
frame_length = wi... |
class STFT(OpRun):
def _run(self, x, frame_step, window=None, frame_length=None, onesided=None):
pass | 2 | 0 | 12 | 0 | 12 | 1 | 4 | 0.08 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 13 | 0 | 13 | 5 | 11 | 1 | 12 | 5 | 10 | 4 | 5 | 2 | 4 |
16,192 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_string_concat.py | onnx.reference.ops.op_string_concat.StringConcat | from onnx.reference.op_run import OpRun
import numpy as np
class StringConcat(OpRun):
def _run(self, x, y):
if x.dtype.kind not in _acceptable_str_dtypes or y.dtype.kind not in _acceptable_str_dtypes:
raise TypeError(f'Inputs must be string tensors, received dtype {x.dtype} and {y.dtype}')
... |
class StringConcat(OpRun):
def _run(self, x, y):
pass | 2 | 0 | 10 | 0 | 9 | 1 | 2 | 0.1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 11 | 0 | 10 | 2 | 8 | 1 | 5 | 2 | 3 | 2 | 5 | 1 | 2 |
16,193 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_string_normalizer.py | onnx.reference.ops.op_string_normalizer.StringNormalizer | import locale as pylocale
import numpy as np
import unicodedata
from onnx.reference.op_run import OpRun, RuntimeTypeError
import warnings
class StringNormalizer(OpRun):
"""The operator is not really threadsafe as python cannot
play with two locales at the same time. stop words
should not be implemented her... |
class StringNormalizer(OpRun):
'''The operator is not really threadsafe as python cannot
play with two locales at the same time. stop words
should not be implemented here as the tokenization
usually happens after this steps.
'''
def _run(self, x, case_change_action=None, is_case_sensitive=None... | 8 | 2 | 31 | 2 | 26 | 4 | 7 | 0.2 | 1 | 7 | 1 | 0 | 1 | 0 | 4 | 43 | 136 | 11 | 108 | 32 | 85 | 22 | 60 | 13 | 55 | 14 | 5 | 2 | 28 |
16,194 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_string_split.py | onnx.reference.ops.op_string_split.StringSplit | from onnx.reference.op_run import OpRun
class StringSplit(OpRun):
def _run(self, x, delimiter=None, maxsplit=None):
if delimiter == '':
delimiter = None
if x.dtype.kind not in _acceptable_str_dtypes:
raise TypeError(f'Inputs must be string tensors, received dtype {x.dtype}'... |
class StringSplit(OpRun):
def _run(self, x, delimiter=None, maxsplit=None):
pass | 2 | 0 | 7 | 1 | 6 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 8 | 1 | 7 | 2 | 5 | 0 | 7 | 2 | 5 | 3 | 5 | 1 | 3 |
16,195 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sub.py | onnx.reference.ops.op_sub.Sub | from onnx.reference.ops._op import OpRunBinaryNumpy
import numpy as np
class Sub(OpRunBinaryNumpy):
def __init__(self, onnx_node, run_params):
OpRunBinaryNumpy.__init__(self, np.subtract, onnx_node, run_params) |
class Sub(OpRunBinaryNumpy):
def __init__(self, onnx_node, run_params):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 8 | 0 | 1 |
16,196 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_sum.py | onnx.reference.ops.op_sum.Sum | from onnx.reference.op_run import OpRun
class Sum(OpRun):
def _run(self, *args):
return (sum(args).astype(args[0].dtype),) |
class Sum(OpRun):
def _run(self, *args):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
16,197 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_tan.py | onnx.reference.ops.op_tan.Tan | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Tan(OpRunUnaryNum):
def _run(self, x):
return (np.tan(x),) |
class Tan(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,198 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_tanh.py | onnx.reference.ops.op_tanh.Tanh | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Tanh(OpRunUnaryNum):
def _run(self, x):
return (np.tanh(x),) |
class Tanh(OpRunUnaryNum):
def _run(self, x):
pass | 2 | 0 | 2 | 0 | 2 | 1 | 1 | 0.33 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 7 | 0 | 1 |
16,199 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_tfidf_vectorizer.py | onnx.reference.ops.op_tfidf_vectorizer.IntMap | import collections
class IntMap(collections.UserDict):
def __init__(self):
super().__init__()
self.added_keys = []
def emplace(self, key, value):
if not isinstance(key, (int, str)):
raise TypeError(f'key must be a int or str not {type(key)}.')
if not isinstance(val... |
class IntMap(collections.UserDict):
def __init__(self):
pass
def emplace(self, key, value):
pass
def __repr__(self):
pass
@property
def first_key(self):
pass | 6 | 0 | 9 | 0 | 9 | 0 | 4 | 0.03 | 1 | 7 | 1 | 0 | 4 | 1 | 4 | 31 | 41 | 3 | 38 | 11 | 32 | 1 | 33 | 10 | 28 | 7 | 2 | 5 | 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.