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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15,900 | chriskiehl/Gooey | chriskiehl_Gooey/gooey/python_bindings/types.py | gooey.python_bindings.types.TimingOptions | from typing_extensions import TypedDict
class TimingOptions(TypedDict):
show_time_remaining: bool
hide_time_remaining_on_complete: bool |
class TimingOptions(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
15,901 | chriskiehl/Gooey | chriskiehl_Gooey/gooey/python_bindings/types.py | gooey.python_bindings.types.TopLevelParser | from typing_extensions import TypedDict
from typing import Optional, Tuple, List, Union, Mapping, Any, TypeVar, Generic, Dict
class TopLevelParser(TypedDict):
command: str
name: str
help: Optional[str]
description: str
contents: List[Group] |
class TopLevelParser(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
15,902 | onnx/onnx | onnx_onnx/onnx/backend/base.py | onnx.backend.base.Backend | import onnx.checker
import onnx.onnx_cpp2py_export.checker as c_checker
from typing import TYPE_CHECKING, Any, NewType
from onnx import IR_VERSION, ModelProto, NodeProto
class Backend:
"""Backend is the entity that will take an ONNX model with inputs,
perform a computation, and then return the output.
For... |
class Backend:
'''Backend is the entity that will take an ONNX model with inputs,
perform a computation, and then return the output.
For one-off execution, users can use run_node and run_model to obtain results quickly.
For repeated execution, users should use prepare, in which the Backend
does all... | 11 | 3 | 12 | 0 | 8 | 5 | 1 | 0.72 | 0 | 8 | 1 | 3 | 0 | 0 | 5 | 5 | 80 | 9 | 47 | 34 | 15 | 34 | 20 | 8 | 14 | 2 | 0 | 1 | 6 |
15,903 | onnx/onnx | onnx_onnx/onnx/backend/base.py | onnx.backend.base.BackendRep | from typing import TYPE_CHECKING, Any, NewType
class BackendRep:
"""BackendRep is the handle that a Backend returns after preparing to execute
a model repeatedly. Users will then pass inputs to the run function of
BackendRep to retrieve the corresponding results.
"""
def run(self, inputs: Any, **k... |
class BackendRep:
'''BackendRep is the handle that a Backend returns after preparing to execute
a model repeatedly. Users will then pass inputs to the run function of
BackendRep to retrieve the corresponding results.
'''
def run(self, inputs: Any, **kwargs: Any) -> tuple[Any, ...]:
'''Abst... | 2 | 2 | 3 | 0 | 2 | 2 | 1 | 2 | 0 | 2 | 0 | 2 | 1 | 0 | 1 | 1 | 9 | 1 | 3 | 2 | 1 | 6 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
15,904 | onnx/onnx | onnx_onnx/onnx/backend/base.py | onnx.backend.base.Device | class Device:
"""Describes device type and device id
syntax: device_type:device_id(optional)
example: 'CPU', 'CUDA', 'CUDA:1'
"""
def __init__(self, device: str) -> None:
options = device.split(':')
self.type = getattr(DeviceType, options[0])
self.device_id = 0
if le... | class Device:
'''Describes device type and device id
syntax: device_type:device_id(optional)
example: 'CPU', 'CUDA', 'CUDA:1'
'''
def __init__(self, device: str) -> None:
pass | 2 | 1 | 6 | 0 | 6 | 0 | 2 | 0.57 | 0 | 3 | 1 | 0 | 1 | 2 | 1 | 1 | 12 | 1 | 7 | 5 | 5 | 4 | 7 | 5 | 5 | 2 | 0 | 1 | 2 |
15,905 | onnx/onnx | onnx_onnx/onnx/backend/base.py | onnx.backend.base.DeviceType | from typing import TYPE_CHECKING, Any, NewType
class DeviceType:
"""Describes device type."""
_Type = NewType('_Type', int)
CPU: _Type = _Type(0)
CUDA: _Type = _Type(1) |
class DeviceType:
'''Describes device type.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 0 | 0 | 0 |
15,906 | onnx/onnx | onnx_onnx/onnx/defs/gen_doc.py | onnx.defs.gen_doc.Args | from typing import TYPE_CHECKING, Any, NamedTuple
class Args(NamedTuple):
output: str
changelog: str |
class Args(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
15,907 | onnx/onnx | onnx_onnx/onnx/external_data_helper.py | onnx.external_data_helper.ExternalDataInfo | from onnx.onnx_pb import AttributeProto, FunctionProto, GraphProto, ModelProto, TensorProto
class ExternalDataInfo:
def __init__(self, tensor: TensorProto) -> None:
self.location = ''
self.offset = None
self.length = None
self.checksum = None
self.basepath = ''
for ... |
class ExternalDataInfo:
def __init__(self, tensor: TensorProto) -> None:
pass | 2 | 0 | 15 | 3 | 12 | 0 | 4 | 0 | 0 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 16 | 3 | 13 | 8 | 11 | 0 | 13 | 8 | 11 | 4 | 0 | 1 | 4 |
15,908 | onnx/onnx | onnx_onnx/onnx/hub.py | onnx.hub.ModelInfo | from typing import IO, Any, cast
class ModelInfo:
"""A class to represent a model's property and metadata in the ONNX Hub.
It extracts model name, path, sha, tags, etc. from the passed in raw_model_info dict.
Attributes:
model: The name of the model.
model_path: The path to the model, rela... |
class ModelInfo:
'''A class to represent a model's property and metadata in the ONNX Hub.
It extracts model name, path, sha, tags, etc. from the passed in raw_model_info dict.
Attributes:
model: The name of the model.
model_path: The path to the model, relative to the model zoo (https://git... | 4 | 2 | 8 | 1 | 5 | 1 | 2 | 0.82 | 0 | 6 | 0 | 0 | 3 | 7 | 3 | 3 | 39 | 8 | 17 | 11 | 13 | 14 | 17 | 11 | 13 | 3 | 0 | 1 | 5 |
15,909 | onnx/onnx | onnx_onnx/onnx/model_container.py | onnx.model_container.ModelContainer | import numpy as np
import os
import onnx.helper
import sys
import onnx.external_data_helper as ext_data
import onnx
import onnx.onnx_cpp2py_export.checker as c_checker
class ModelContainer:
"""Implements an API to store large tensors outside the main ModelProto,
it avoids copying large initializers when defini... |
class ModelContainer:
'''Implements an API to store large tensors outside the main ModelProto,
it avoids copying large initializers when defining the model and these initializers
are never serialized through protobuf.
No tensor is stored on disk until the user explicitly saves the model.
'''
d... | 17 | 9 | 17 | 1 | 12 | 3 | 3 | 0.31 | 0 | 12 | 1 | 0 | 13 | 3 | 13 | 13 | 242 | 31 | 164 | 59 | 141 | 51 | 124 | 49 | 109 | 11 | 0 | 3 | 45 |
15,910 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.DefaultNone | class DefaultNone:
"""Default value for parameters when the parameter is not set but the operator has a default behavior for it.""" | class DefaultNone:
'''Default value for parameters when the parameter is not set but the operator has a default behavior for it.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
15,911 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.Graph | import onnx
class Graph:
__slots__ = ('g',)
def __init__(self, g: onnx.GraphProto) -> None:
self.g = g |
class Graph:
def __init__(self, g: onnx.GraphProto) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 5 | 1 | 4 | 4 | 2 | 0 | 4 | 4 | 2 | 1 | 0 | 0 | 1 |
15,912 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.OnnxType | import onnx
class OnnxType:
def __init__(self, type_proto: onnx.TypeProto):
if not isinstance(type_proto, onnx.TypeProto):
raise TypeError(f'type_proto {type(type_proto)} must be of type onnx.TypeProto.')
self.type_proto = type_proto
def __repr__(self) -> str:
return f'Onn... |
class OnnxType:
def __init__(self, type_proto: onnx.TypeProto):
pass
def __repr__(self) -> str:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 0 | 3 | 0 | 0 | 2 | 1 | 2 | 2 | 8 | 1 | 7 | 4 | 4 | 0 | 7 | 4 | 4 | 2 | 0 | 1 | 3 |
15,913 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.OpFunction | from typing import TYPE_CHECKING, Any
import onnx
class OpFunction(OpRun):
"""Runs a custom function."""
def __init__(self, onnx_node: onnx.NodeProto, run_params: dict[str, Any] | None, impl: Any=None, attributes: dict[str, Any] | None=None) -> None:
if impl is None:
raise RuntimeError(f'i... |
class OpFunction(OpRun):
'''Runs a custom function.'''
def __init__(self, onnx_node: onnx.NodeProto, run_params: dict[str, Any] | None, impl: Any=None, attributes: dict[str, Any] | None=None) -> None:
pass
def _run(self, *inputs, **kwargs):
pass
def _run_impl(self, impl, *inputs, **k... | 4 | 1 | 13 | 0 | 13 | 2 | 2 | 0.18 | 1 | 6 | 0 | 1 | 3 | 2 | 3 | 42 | 45 | 3 | 39 | 15 | 29 | 7 | 19 | 9 | 15 | 3 | 5 | 1 | 6 |
15,914 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.OpFunctionContextDependant | from typing import TYPE_CHECKING, Any
import onnx
class OpFunctionContextDependant(OpFunction):
"""The function can be instantiated but only at execution time.
An instance of OpFunction is created everytime to node is executed.
This is needed when the schema of an operator defines a context dependent funct... |
class OpFunctionContextDependant(OpFunction):
'''The function can be instantiated but only at execution time.
An instance of OpFunction is created everytime to node is executed.
This is needed when the schema of an operator defines a context dependent function.
'''
def __init__(self, onnx_node... | 3 | 1 | 20 | 0 | 19 | 5 | 6 | 0.36 | 1 | 4 | 0 | 0 | 2 | 2 | 2 | 44 | 47 | 2 | 39 | 16 | 31 | 14 | 26 | 11 | 23 | 11 | 6 | 3 | 12 |
15,915 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.OpRun | import onnx
import abc
import numpy as np
from typing import TYPE_CHECKING, Any
class OpRun(abc.ABC):
"""Ancestor to all operators in this subfolder.
Args:
onnx_node: `onnx` node
run_params: additional parameters such as `verbose`, `opsets`
(it can be more than one if the operator ... |
class OpRun(abc.ABC):
'''Ancestor to all operators in this subfolder.
Args:
onnx_node: `onnx` node
run_params: additional parameters such as `verbose`, `opsets`
(it can be more than one if the operator has a subgraph),
`log` for a logging function
schema: operato... | 32 | 15 | 21 | 1 | 16 | 5 | 4 | 0.3 | 1 | 20 | 3 | 137 | 13 | 6 | 19 | 39 | 468 | 41 | 342 | 101 | 289 | 102 | 200 | 68 | 179 | 20 | 4 | 5 | 85 |
15,916 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.OpRunExpand | class OpRunExpand(OpRun):
"""Class any operator to avoid must inherit from."""
def __init__(self, *args, **kwargs):
raise RuntimeError(f'The reference implementation must not use this node ({type(self)}).')
def _run(self, *inputs, **kwargs):
raise RuntimeError(f'The reference implementatio... | class OpRunExpand(OpRun):
'''Class any operator to avoid must inherit from.'''
def __init__(self, *args, **kwargs):
pass
def _run(self, *inputs, **kwargs):
pass | 3 | 1 | 4 | 0 | 4 | 1 | 1 | 0.33 | 1 | 1 | 0 | 1 | 2 | 0 | 2 | 41 | 12 | 2 | 9 | 3 | 6 | 3 | 5 | 3 | 2 | 1 | 5 | 0 | 2 |
15,917 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.RefAttrName | class RefAttrName:
"""Implements a link between a parameter of a function and an attribute in node.
Args:
name: name of the input
"""
def __init__(self, name: str):
self.name = name
def __repr__(self) -> str:
return f'{self.__class__.__name__}({self.name!r})' | class RefAttrName:
'''Implements a link between a parameter of a function and an attribute in node.
Args:
name: name of the input
'''
def __init__(self, name: str):
pass
def __repr__(self) -> str:
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.8 | 0 | 1 | 0 | 0 | 2 | 1 | 2 | 2 | 12 | 3 | 5 | 4 | 2 | 4 | 5 | 4 | 2 | 1 | 0 | 0 | 2 |
15,918 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.RuntimeContextError | class RuntimeContextError(RuntimeError):
"""Raised when the context is missing but an context dependent implementation is defined for an operator.""" | class RuntimeContextError(RuntimeError):
'''Raised when the context is missing but an context dependent implementation is defined for an operator.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,919 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.RuntimeImplementationError | class RuntimeImplementationError(NotImplementedError):
"""Raised when no implementation was found for an operator.""" | class RuntimeImplementationError(NotImplementedError):
'''Raised when no implementation was found for an operator.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 5 | 0 | 0 |
15,920 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.RuntimeTypeError | class RuntimeTypeError(RuntimeError):
"""Raised when a type of a variable is unexpected.""" | class RuntimeTypeError(RuntimeError):
'''Raised when a type of a variable is unexpected.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,921 | onnx/onnx | onnx_onnx/onnx/reference/op_run.py | onnx.reference.op_run.SparseTensor | import numpy as np
from typing import TYPE_CHECKING, Any
class SparseTensor:
"""Simple representation of a sparse tensor.
It is based on numpy but does not require scipy.
"""
def __init__(self, values: np.ndarray, indices: np.ndarray, shape: tuple[int]) -> None:
self.values = values
se... |
class SparseTensor:
'''Simple representation of a sparse tensor.
It is based on numpy but does not require scipy.
'''
def __init__(self, values: np.ndarray, indices: np.ndarray, shape: tuple[int]) -> None:
pass
@property
def dtype(self) -> Any:
pass | 4 | 1 | 4 | 0 | 4 | 0 | 1 | 0.3 | 0 | 3 | 0 | 0 | 2 | 3 | 2 | 2 | 15 | 2 | 10 | 9 | 4 | 3 | 7 | 6 | 4 | 1 | 0 | 0 | 2 |
15,922 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunBinary | from onnx.reference.op_run import OpRun, RuntimeTypeError
class OpRunBinary(OpRun):
"""Ancestor to all binary operators in this subfolder.
Checks that input and output types are the same.
"""
def run(self, x, y):
"""Calls method ``_run``, catches exceptions, displays a longer error message.
... |
class OpRunBinary(OpRun):
'''Ancestor to all binary operators in this subfolder.
Checks that input and output types are the same.
'''
def run(self, x, y):
'''Calls method ``_run``, catches exceptions, displays a longer error message.
Supports only binary operators.
'''
... | 2 | 2 | 28 | 1 | 24 | 4 | 4 | 0.28 | 1 | 5 | 1 | 8 | 1 | 0 | 1 | 40 | 34 | 3 | 25 | 4 | 23 | 7 | 16 | 3 | 14 | 4 | 5 | 1 | 4 |
15,923 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunBinaryComparison | class OpRunBinaryComparison(OpRunBinary):
"""Ancestor to all binary operators in this subfolder comparing tensors.""" | class OpRunBinaryComparison(OpRunBinary):
'''Ancestor to all binary operators in this subfolder comparing tensors.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 | 0 | 0 | 0 | 40 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 6 | 0 | 0 |
15,924 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunBinaryNum | from onnx.reference.op_run import OpRun, RuntimeTypeError
class OpRunBinaryNum(OpRunBinary):
"""Ancestor to all binary operators in this subfolder.
Checks that input oud output types are the same.
"""
def run(self, x, y):
"""Calls method ``OpRunBinary.run``, catches exceptions, displays a lon... |
class OpRunBinaryNum(OpRunBinary):
'''Ancestor to all binary operators in this subfolder.
Checks that input oud output types are the same.
'''
def run(self, x, y):
'''Calls method ``OpRunBinary.run``, catches exceptions, displays a longer error message.'''
pass | 2 | 2 | 10 | 0 | 9 | 2 | 2 | 0.5 | 1 | 1 | 1 | 2 | 1 | 0 | 1 | 41 | 16 | 2 | 10 | 3 | 8 | 5 | 6 | 3 | 4 | 2 | 6 | 1 | 2 |
15,925 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunBinaryNumpy | from typing import TYPE_CHECKING, Any
class OpRunBinaryNumpy(OpRunBinaryNum):
"""*numpy_fct* is a binary numpy function which
takes two matrices.
"""
def __init__(self, numpy_fct: Any, onnx_node: NodeProto, run_params: dict[str, Any]):
OpRunBinaryNum.__init__(self, onnx_node, run_params)
... |
class OpRunBinaryNumpy(OpRunBinaryNum):
'''*numpy_fct* is a binary numpy function which
takes two matrices.
'''
def __init__(self, numpy_fct: Any, onnx_node: NodeProto, run_params: dict[str, Any]):
pass
def _run(self, a, b):
pass | 3 | 1 | 6 | 0 | 6 | 1 | 1 | 0.33 | 1 | 3 | 0 | 7 | 2 | 1 | 2 | 43 | 17 | 2 | 12 | 7 | 7 | 4 | 10 | 5 | 7 | 1 | 7 | 0 | 2 |
15,926 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunReduceNumpy | from onnx.reference.op_run import OpRun, RuntimeTypeError
import numpy as np
from typing import TYPE_CHECKING, Any
class OpRunReduceNumpy(OpRun):
"""Implements the reduce logic.
It must have a parameter *axes*.
"""
def __init__(self, onnx_node: NodeProto, run_params: dict[str, Any]):
OpRun.__i... |
class OpRunReduceNumpy(OpRun):
'''Implements the reduce logic.
It must have a parameter *axes*.
'''
def __init__(self, onnx_node: NodeProto, run_params: dict[str, Any]):
pass
def is_axes_empty(self, axes):
pass
def handle_axes(self, axes):
pass
def output_shape(s... | 6 | 2 | 7 | 0 | 7 | 1 | 3 | 0.22 | 1 | 7 | 0 | 20 | 5 | 1 | 5 | 44 | 45 | 5 | 36 | 8 | 30 | 8 | 33 | 8 | 27 | 8 | 5 | 3 | 17 |
15,927 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunUnary | from onnx.reference.op_run import OpRun, RuntimeTypeError
class OpRunUnary(OpRun):
"""Ancestor to all unary operators in this subfolder.
Checks that input and output types are the same.
"""
def run(self, x):
"""Calls method ``_run``, catches exceptions, displays a longer error message.
... |
class OpRunUnary(OpRun):
'''Ancestor to all unary operators in this subfolder.
Checks that input and output types are the same.
'''
def run(self, x):
'''Calls method ``_run``, catches exceptions, displays a longer error message.
Supports only unary operators.
'''
pass | 2 | 2 | 17 | 1 | 13 | 4 | 2 | 0.5 | 1 | 2 | 0 | 5 | 1 | 0 | 1 | 40 | 23 | 3 | 14 | 4 | 12 | 7 | 11 | 3 | 9 | 2 | 5 | 1 | 2 |
15,928 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op.py | onnx.reference.ops._op.OpRunUnaryNum | from onnx.reference.op_run import OpRun, RuntimeTypeError
class OpRunUnaryNum(OpRunUnary):
"""Ancestor to all unary and numerical operators in this subfolder.
Checks that input and output types are the same.
"""
def run(self, x):
"""Calls method ``OpRunUnary.run``.
Catches exceptions... |
class OpRunUnaryNum(OpRunUnary):
'''Ancestor to all unary and numerical operators in this subfolder.
Checks that input and output types are the same.
'''
def run(self, x):
'''Calls method ``OpRunUnary.run``.
Catches exceptions, displays a longer error message.
Checks that the r... | 2 | 2 | 15 | 1 | 10 | 5 | 3 | 0.73 | 1 | 2 | 1 | 34 | 1 | 0 | 1 | 41 | 21 | 3 | 11 | 3 | 9 | 8 | 8 | 3 | 6 | 3 | 6 | 1 | 3 |
15,929 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op_common_pool.py | onnx.reference.ops._op_common_pool.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, storage_order=None, strides=None):
if pooling_type == 'MAX' and dilations is None:
... |
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, storage_order=None, strides=None):
pass | 2 | 0 | 100 | 4 | 96 | 7 | 12 | 0.07 | 1 | 3 | 0 | 1 | 1 | 1 | 1 | 40 | 101 | 4 | 97 | 25 | 83 | 7 | 43 | 11 | 41 | 12 | 5 | 2 | 12 |
15,930 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op_common_random.py | onnx.reference.ops._op_common_random._CommonRandom | import numpy as np
from onnx.helper import tensor_dtype_to_np_dtype
from onnx.reference.op_run import OpRun
class _CommonRandom(OpRun):
def __init__(self, onnx_node, run_params):
OpRun.__init__(self, onnx_node, run_params)
if hasattr(self, 'shape') and len(self.shape) == 0:
raise Value... |
class _CommonRandom(OpRun):
def __init__(self, onnx_node, run_params):
pass
@staticmethod
def numpy_type(dtype):
pass
@staticmethod
def _dtype(*data, dtype=None, dtype_first=False):
pass
@staticmethod
def _get_state(seed):
pass | 8 | 0 | 9 | 0 | 9 | 2 | 3 | 0.22 | 1 | 3 | 0 | 5 | 1 | 0 | 4 | 43 | 44 | 3 | 41 | 11 | 33 | 9 | 28 | 8 | 23 | 8 | 5 | 2 | 13 |
15,931 | onnx/onnx | onnx_onnx/onnx/reference/ops/_op_common_window.py | onnx.reference.ops._op_common_window._CommonWindow | import numpy as np
from onnx.helper import tensor_dtype_to_np_dtype
from onnx.reference.op_run import OpRun
class _CommonWindow(OpRun):
@staticmethod
def _begin(size, periodic, output_datatype):
dtype = tensor_dtype_to_np_dtype(output_datatype)
if periodic == 1:
N_1 = size
... |
class _CommonWindow(OpRun):
@staticmethod
def _begin(size, periodic, output_datatype):
pass
@staticmethod
def _end(size, res, output_datatype):
pass | 5 | 0 | 6 | 0 | 6 | 1 | 2 | 0.14 | 1 | 0 | 0 | 3 | 0 | 0 | 2 | 41 | 15 | 1 | 14 | 9 | 9 | 2 | 11 | 7 | 8 | 2 | 5 | 1 | 3 |
15,932 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnx_preview_training/_op_run_training.py | onnx.reference.ops.aionnx_preview_training._op_run_training.OpRunTraining | from onnx.reference.op_run import OpRun
class OpRunTraining(OpRun):
op_domain = 'ai.onnx.preview.training' |
class OpRunTraining(OpRun):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 39 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
15,933 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnx_preview_training/op_adagrad.py | onnx.reference.ops.aionnx_preview_training.op_adagrad.Adagrad | from onnx.reference.ops.aionnx_preview_training._op_run_training import OpRunTraining
class Adagrad(OpRunTraining):
def _run(self, *data, decay_factor=None, epsilon=None, norm_coefficient=None):
if len(data) == 5:
return self._run1(*data, decay_factor=decay_factor, epsilon=epsilon, norm_coeffi... |
class Adagrad(OpRunTraining):
def _run(self, *data, decay_factor=None, epsilon=None, norm_coefficient=None):
pass
def _run1(self, r, t, x, g, h, decay_factor=None, epsilon=None, norm_coefficient=None):
pass | 3 | 0 | 19 | 0 | 19 | 3 | 2 | 0.13 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 41 | 40 | 1 | 39 | 11 | 34 | 5 | 15 | 9 | 12 | 3 | 6 | 1 | 4 |
15,934 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnx_preview_training/op_adam.py | onnx.reference.ops.aionnx_preview_training.op_adam.Adam | import numpy as np
from onnx.reference.ops.aionnx_preview_training._op_run_training import OpRunTraining
class Adam(OpRunTraining):
def _run(self, *data, alpha=None, beta=None, epsilon=None, norm_coefficient=None, norm_coefficient_post=None):
if len(data) == 6:
return self._run1(*data, alpha=a... |
class Adam(OpRunTraining):
def _run(self, *data, alpha=None, beta=None, epsilon=None, norm_coefficient=None, norm_coefficient_post=None):
pass
def _run1(self, r, t, x, g, v, h, alpha=None, beta=None, epsilon=None, norm_coefficient=None, norm_coefficient_post=None):
pass | 3 | 0 | 34 | 0 | 34 | 2 | 2 | 0.06 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 41 | 69 | 1 | 68 | 31 | 44 | 4 | 17 | 10 | 14 | 3 | 6 | 1 | 4 |
15,935 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnx_preview_training/op_momentum.py | onnx.reference.ops.aionnx_preview_training.op_momentum.Momentum | from onnx.reference.ops.aionnx_preview_training._op_run_training import OpRunTraining
class Momentum(OpRunTraining):
def _run(self, *data, alpha=None, beta=None, mode=None, norm_coefficient=None):
if len(data) == 5:
r, t, x, g, v = data
return self._run1(r, t, x, g, v, norm_coeffic... |
class Momentum(OpRunTraining):
def _run(self, *data, alpha=None, beta=None, mode=None, norm_coefficient=None):
pass
def _run1(self, r, t, x, g, v, mode='standard', norm_coefficient=None, alpha=None, beta=None):
pass | 3 | 0 | 24 | 0 | 24 | 2 | 3 | 0.08 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 41 | 50 | 1 | 49 | 21 | 35 | 4 | 18 | 10 | 15 | 3 | 6 | 1 | 5 |
15,936 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/_op_run_aionnxml.py | onnx.reference.ops.aionnxml._op_run_aionnxml.OpRunAiOnnxMl | from onnx.reference.op_run import OpRun
class OpRunAiOnnxMl(OpRun):
op_domain = 'ai.onnx.ml' |
class OpRunAiOnnxMl(OpRun):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 16 | 0 | 0 | 0 | 39 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
15,937 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_array_feature_extractor.py | onnx.reference.ops.aionnxml.op_array_feature_extractor.ArrayFeatureExtractor | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class ArrayFeatureExtractor(OpRunAiOnnxMl):
def _run(self, data, indices):
"""Runtime for operator *ArrayFeatureExtractor*.
Warning:
ONNX specifications may be imprecise in some cases.
When the input da... |
class ArrayFeatureExtractor(OpRunAiOnnxMl):
def _run(self, data, indices):
'''Runtime for operator *ArrayFeatureExtractor*.
Warning:
ONNX specifications may be imprecise in some cases.
When the input data is a vector (one dimension),
the output has still two lik... | 2 | 1 | 14 | 1 | 3 | 11 | 1 | 2.75 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 15 | 1 | 4 | 3 | 2 | 11 | 4 | 3 | 2 | 1 | 6 | 0 | 1 |
15,938 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_binarizer.py | onnx.reference.ops.aionnxml.op_binarizer.Binarizer | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class Binarizer(OpRunAiOnnxMl):
def _run(self, x, threshold=None):
return compute_binarizer(x, threshold) |
class Binarizer(OpRunAiOnnxMl):
def _run(self, x, threshold=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 | 6 | 0 | 1 |
15,939 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_dict_vectorizer.py | onnx.reference.ops.aionnxml.op_dict_vectorizer.DictVectorizer | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class DictVectorizer(OpRunAiOnnxMl):
def _run(self, x, int64_vocabulary=None, string_vocabulary=None):
if isinstance(x, (np.ndarray, list)):
if int64_vocabulary is None and string_vocabulary is None:
... |
class DictVectorizer(OpRunAiOnnxMl):
def _run(self, x, int64_vocabulary=None, string_vocabulary=None):
pass | 2 | 0 | 36 | 4 | 32 | 2 | 8 | 0.06 | 1 | 6 | 0 | 0 | 1 | 0 | 1 | 40 | 37 | 4 | 33 | 15 | 31 | 2 | 30 | 15 | 28 | 8 | 6 | 3 | 8 |
15,940 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_feature_vectorizer.py | onnx.reference.ops.aionnxml.op_feature_vectorizer.FeatureVectorizer | import numpy as np
from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class FeatureVectorizer(OpRunAiOnnxMl):
def _preprocess(self, a, cut):
if len(a.shape) == 1:
a = a.reshape((-1, 1))
if len(a.shape) != 2:
raise ValueError(f'Every input must have 1 or ... |
class FeatureVectorizer(OpRunAiOnnxMl):
def _preprocess(self, a, cut):
pass
def _run(self, *args, inputdimensions=None):
pass | 3 | 0 | 9 | 0 | 9 | 2 | 3 | 0.16 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 41 | 20 | 1 | 19 | 5 | 16 | 3 | 17 | 5 | 14 | 5 | 6 | 1 | 6 |
15,941 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_imputer.py | onnx.reference.ops.aionnxml.op_imputer.Imputer | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class Imputer(OpRunAiOnnxMl):
def _run(self, x, imputed_value_floats=None, imputed_value_int64s=None, replaced_value_float=None, replaced_value_int64=None):
if imputed_value_floats is not None and len(imputed_value_f... |
class Imputer(OpRunAiOnnxMl):
def _run(self, x, imputed_value_floats=None, imputed_value_int64s=None, replaced_value_float=None, replaced_value_int64=None):
pass | 2 | 0 | 36 | 2 | 34 | 2 | 9 | 0.06 | 1 | 4 | 0 | 0 | 1 | 0 | 1 | 40 | 37 | 2 | 35 | 13 | 26 | 2 | 23 | 6 | 21 | 9 | 6 | 2 | 9 |
15,942 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_label_encoder.py | onnx.reference.ops.aionnxml.op_label_encoder.LabelEncoder | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class LabelEncoder(OpRunAiOnnxMl):
def _run(self, x, default_float=None, default_int64=None, default_string=None, default_tensor=None, keys_floats=None, keys_int64s=None, keys_strings=None, values_floats=None, values_int64s=... |
class LabelEncoder(OpRunAiOnnxMl):
def _run(self, x, default_float=None, default_int64=None, default_string=None, default_tensor=None, keys_floats=None, keys_int64s=None, keys_strings=None, values_floats=None, values_int64s=None, values_strings=None, keys_tensor=None, values_tensor=None):
pass | 2 | 0 | 39 | 1 | 38 | 1 | 7 | 0.03 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 40 | 40 | 1 | 39 | 24 | 22 | 1 | 21 | 9 | 19 | 7 | 6 | 2 | 7 |
15,943 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_linear_classifier.py | onnx.reference.ops.aionnxml.op_linear_classifier.LinearClassifier | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
from onnx.reference.ops.aionnxml._common_classifier import compute_probit, compute_softmax_zero, expit
class LinearClassifier(OpRunAiOnnxMl):
@staticmethod
def _post_process_predicted_label(label, scores, classlabels_int... |
class LinearClassifier(OpRunAiOnnxMl):
@staticmethod
def _post_process_predicted_label(label, scores, classlabels_ints_string):
'''Replaces int64 predicted labels by the corresponding
strings.
'''
pass
def _run(self, x, classlabels_ints=None, classlabels_strings=None, coef... | 4 | 1 | 40 | 2 | 37 | 4 | 10 | 0.09 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 41 | 83 | 4 | 75 | 21 | 62 | 7 | 44 | 11 | 41 | 18 | 6 | 3 | 20 |
15,944 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_linear_regressor.py | onnx.reference.ops.aionnxml.op_linear_regressor.LinearRegressor | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class LinearRegressor(OpRunAiOnnxMl):
def _run(self, x, coefficients=None, intercepts=None, targets=1, post_transform=None):
coefficients = np.array(coefficients).astype(x.dtype)
intercepts = np.array(interce... |
class LinearRegressor(OpRunAiOnnxMl):
def _run(self, x, coefficients=None, intercepts=None, targets=1, post_transform=None):
pass | 2 | 0 | 15 | 0 | 15 | 1 | 3 | 0.06 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 16 | 0 | 16 | 6 | 12 | 1 | 12 | 4 | 10 | 3 | 6 | 1 | 3 |
15,945 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_normalizer.py | onnx.reference.ops.aionnxml.op_normalizer.Normalizer | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class Normalizer(OpRunAiOnnxMl):
@staticmethod
def norm_max(x):
"""Max normalization"""
div = np.abs(x).max(axis=1).reshape((x.shape[0], -1))
return x / np.maximum(div, 1e-30)
@staticmethod
... |
class Normalizer(OpRunAiOnnxMl):
@staticmethod
def norm_max(x):
'''Max normalization'''
pass
@staticmethod
def norm_l1(x):
'''L1 normalization'''
pass
@staticmethod
def norm_l2(x):
'''L2 normalization'''
pass
def _run(self, x, norm=None):
... | 8 | 3 | 6 | 0 | 5 | 2 | 2 | 0.28 | 1 | 1 | 0 | 0 | 1 | 0 | 4 | 43 | 31 | 3 | 25 | 13 | 17 | 7 | 19 | 10 | 14 | 4 | 6 | 1 | 7 |
15,946 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_one_hot_encoder.py | onnx.reference.ops.aionnxml.op_one_hot_encoder.OneHotEncoder | import numpy as np
from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class OneHotEncoder(OpRunAiOnnxMl):
def _run(self, x, cats_int64s=None, cats_strings=None, zeros=None):
if cats_int64s is not None and len(cats_int64s) > 0:
classes = {v: i for i, v in enumerate(cats_int6... |
class OneHotEncoder(OpRunAiOnnxMl):
def _run(self, x, cats_int64s=None, cats_strings=None, zeros=None):
pass | 2 | 0 | 42 | 3 | 39 | 1 | 15 | 0.03 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 40 | 43 | 3 | 40 | 12 | 38 | 1 | 32 | 12 | 30 | 15 | 6 | 5 | 15 |
15,947 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_scaler.py | onnx.reference.ops.aionnxml.op_scaler.Scaler | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class Scaler(OpRunAiOnnxMl):
def _run(self, x, offset=None, scale=None):
dx = x - offset
return ((dx * scale).astype(x.dtype),) |
class Scaler(OpRunAiOnnxMl):
def _run(self, x, offset=None, scale=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 | 6 | 0 | 1 |
15,948 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_svm_classifier.py | onnx.reference.ops.aionnxml.op_svm_classifier.SVMClassifier | import numpy as np
from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
from onnx.reference.ops.aionnxml.op_svm_helper import SVMCommon
class SVMClassifier(OpRunAiOnnxMl):
def _run_linear(self, X, coefs, class_count_, kernel_type_):
scores = []
for j in range(class_count_):
... |
class SVMClassifier(OpRunAiOnnxMl):
def _run_linear(self, X, coefs, class_count_, kernel_type_):
pass
def _run_svm(self, X, sv, vector_count_, kernel_type_, class_count_, starting_vector_, coefs):
pass
def _probabilities(self, scores, class_count_):
pass
def _compute_final_s... | 6 | 0 | 41 | 3 | 37 | 5 | 5 | 0.14 | 1 | 2 | 1 | 0 | 5 | 1 | 5 | 44 | 211 | 19 | 185 | 73 | 161 | 25 | 105 | 55 | 99 | 13 | 6 | 3 | 26 |
15,949 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_svm_helper.py | onnx.reference.ops.aionnxml.op_svm_helper.SVMAttributes | from typing import Any
import numpy as np
class SVMAttributes:
def __init__(self):
self._names = []
def add(self, name: str, value: Any) -> None:
if isinstance(value, list) and name not in {'kernel_params'}:
if name in {'vectors_per_class'}:
value = np.array(value,... |
class SVMAttributes:
def __init__(self):
pass
def add(self, name: str, value: Any) -> None:
pass
def __str__(self) -> str:
pass | 4 | 0 | 5 | 0 | 5 | 0 | 2 | 0.07 | 0 | 3 | 0 | 0 | 3 | 1 | 3 | 3 | 17 | 2 | 15 | 7 | 11 | 1 | 14 | 7 | 10 | 3 | 0 | 2 | 6 |
15,950 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_svm_helper.py | onnx.reference.ops.aionnxml.op_svm_helper.SVMCommon | import numpy as np
class SVMCommon:
"""Base class for SVM."""
def __init__(self, **kwargs):
self.atts = SVMAttributes()
for name, value in kwargs.items():
self.atts.add(name, value)
if self.atts.kernel_params:
self.gamma_ = self.atts.kernel_params[0]
... |
class SVMCommon:
'''Base class for SVM.'''
def __init__(self, **kwargs):
pass
def __str__(self) -> str:
pass
def kernel_dot(self, pA: np.ndarray, pB: np.ndarray, kernel: str) -> np.ndarray:
pass
def run_reg(self, X: np.ndarray) -> np.ndarray:
pass | 5 | 1 | 16 | 1 | 14 | 5 | 4 | 0.37 | 0 | 5 | 1 | 0 | 4 | 4 | 4 | 4 | 68 | 9 | 57 | 22 | 52 | 21 | 53 | 22 | 48 | 8 | 0 | 3 | 17 |
15,951 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_svm_regressor.py | onnx.reference.ops.aionnxml.op_svm_regressor.SVMRegressor | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
from onnx.reference.ops.aionnxml.op_svm_helper import SVMCommon
class SVMRegressor(OpRunAiOnnxMl):
"""The class only implements `POST_TRANSFORM="NONE"`."""
def _run(self, X, coefficients=None, kernel_params=None, kernel_type=None, n_target... |
class SVMRegressor(OpRunAiOnnxMl):
'''The class only implements `POST_TRANSFORM="NONE"`.'''
def _run(self, X, coefficients=None, kernel_params=None, kernel_type=None, n_targets=None, n_supports=None, one_class=None, post_transform=None, rho=None, support_vectors=None):
pass | 2 | 1 | 31 | 1 | 29 | 2 | 2 | 0.1 | 1 | 2 | 1 | 0 | 1 | 1 | 1 | 40 | 34 | 2 | 30 | 17 | 16 | 3 | 8 | 5 | 6 | 2 | 6 | 1 | 2 |
15,952 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.AggregationFunction | from enum import IntEnum
class AggregationFunction(IntEnum):
AVERAGE = 0
SUM = 1
MIN = 2
MAX = 3 |
class AggregationFunction(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 3 | 0 | 0 |
15,953 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.Leaf | import numpy as np
class Leaf:
def __init__(self, weight: float, target_id: int) -> None:
self.weight = weight
self.target_id = target_id
def predict(self, x: np.ndarray) -> np.ndarray:
return np.array([self.weight, self.target_id])
def _print(self, prefix: list, indent: int=0) -... |
class Leaf:
def __init__(self, weight: float, target_id: int) -> None:
pass
def predict(self, x: np.ndarray) -> np.ndarray:
pass
def _print(self, prefix: list, indent: int=0) -> None:
pass
def __repr__(self) -> str:
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0.14 | 0 | 4 | 0 | 0 | 4 | 2 | 4 | 4 | 18 | 3 | 14 | 8 | 9 | 2 | 12 | 8 | 7 | 1 | 0 | 0 | 4 |
15,954 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.Mode | from enum import IntEnum
class Mode(IntEnum):
LEQ = 0
LT = 1
GTE = 2
GT = 3
EQ = 4
NEQ = 5
MEMBER = 6 |
class Mode(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 8 | 0 | 8 | 8 | 7 | 0 | 8 | 8 | 7 | 0 | 3 | 0 | 0 |
15,955 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.Node | import numpy as np
class Node:
compare: Callable[[float, float | set[float]], bool]
true_branch: Node | Leaf
false_branch: Node | Leaf
feature: int
def __init__(self, mode: Mode, value: float | set[float], feature: int, missing_tracks_true: bool) -> None:
if mode == Mode.LEQ:
s... |
class Node:
def __init__(self, mode: Mode, value: float | set[float], feature: int, missing_tracks_true: bool) -> None:
pass
def predict(self, x: np.ndarray) -> float:
pass
def _print(self, prefix: list, indent: int=0) -> None:
pass
def __repr__(self) -> str:
pass | 5 | 0 | 14 | 0 | 14 | 0 | 3 | 0 | 0 | 7 | 1 | 0 | 4 | 2 | 4 | 4 | 63 | 4 | 59 | 14 | 48 | 0 | 29 | 8 | 24 | 8 | 0 | 1 | 12 |
15,956 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.PostTransform | from enum import IntEnum
class PostTransform(IntEnum):
NONE = 0
SOFTMAX = 1
LOGISTIC = 2
SOFTMAX_ZERO = 3
PROBIT = 4 |
class PostTransform(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 3 | 0 | 0 |
15,957 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble.py | onnx.reference.ops.aionnxml.op_tree_ensemble.TreeEnsemble | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
class TreeEnsemble(OpRunAiOnnxMl):
def _run(self, X, nodes_splits, nodes_featureids, nodes_modes, nodes_truenodeids, nodes_falsenodeids, nodes_trueleafs, nodes_falseleafs, leaf_targetids, leaf_weights, tree_roots, post_trans... |
class TreeEnsemble(OpRunAiOnnxMl):
def _run(self, X, nodes_splits, nodes_featureids, nodes_modes, nodes_truenodeids, nodes_falsenodeids, nodes_trueleafs, nodes_falseleafs, leaf_targetids, leaf_weights, tree_roots, post_transform=PostTransform.NONE, aggregate_function=AggregationFunction.SUM, nodes_hitrates=None, ... | 3 | 0 | 91 | 5 | 82 | 6 | 12 | 0.07 | 1 | 11 | 5 | 0 | 1 | 0 | 1 | 40 | 137 | 7 | 123 | 36 | 101 | 9 | 46 | 16 | 43 | 18 | 6 | 3 | 24 |
15,958 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble_classifier.py | onnx.reference.ops.aionnxml.op_tree_ensemble_classifier.TreeEnsembleClassifier | from onnx.reference.ops.aionnxml.op_tree_ensemble_helper import TreeEnsemble
from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
from onnx.reference.ops.aionnxml._common_classifier import logistic, probit, softmax, softmax_zero
import numpy as np
class TreeEnsembleClassifier(OpRunAiOnnxMl):
def... |
class TreeEnsembleClassifier(OpRunAiOnnxMl):
def _run(self, X, base_values=None, base_values_as_tensor=None, class_ids=None, class_nodeids=None, class_treeids=None, class_weights=None, class_weights_as_tensor=None, classlabels_int64s=None, classlabels_strings=None, nodes_falsenodeids=None, nodes_featureids=None, ... | 2 | 0 | 114 | 4 | 107 | 9 | 16 | 0.08 | 1 | 6 | 1 | 0 | 1 | 1 | 1 | 40 | 115 | 4 | 108 | 45 | 82 | 9 | 49 | 21 | 47 | 16 | 6 | 3 | 16 |
15,959 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble_helper.py | onnx.reference.ops.aionnxml.op_tree_ensemble_helper.TreeEnsemble | import numpy as np
class TreeEnsemble:
def __init__(self, **kwargs):
self.atts = TreeEnsembleAttributes()
for name, value in kwargs.items():
self.atts.add(name, value)
self.tree_ids = sorted(set(self.atts.nodes_treeids))
self.root_index = {tid: len(self.atts.nodes_treei... |
class TreeEnsemble:
def __init__(self, **kwargs):
pass
def __str__(self) -> str:
pass
def leaf_index_tree(self, X: np.ndarray, tree_id: int) -> int:
'''Computes the leaf index for one tree.'''
pass
def leave_index_tree(self, X: np.ndarray) -> np.ndarray:
'''C... | 5 | 2 | 17 | 1 | 16 | 4 | 5 | 0.22 | 0 | 7 | 1 | 0 | 4 | 4 | 4 | 4 | 70 | 5 | 63 | 22 | 58 | 14 | 42 | 22 | 37 | 10 | 0 | 3 | 18 |
15,960 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble_helper.py | onnx.reference.ops.aionnxml.op_tree_ensemble_helper.TreeEnsembleAttributes | import numpy as np
class TreeEnsembleAttributes:
def __init__(self):
self._names = []
def add(self, name, value):
if not name.endswith('_as_tensor'):
self._names.append(name)
if isinstance(value, list):
if name in {'base_values', 'class_weights', 'nodes_values'... |
class TreeEnsembleAttributes:
def __init__(self):
pass
def add(self, name, value):
pass
def __str__(self):
pass | 4 | 0 | 8 | 0 | 8 | 0 | 3 | 0.04 | 0 | 1 | 0 | 0 | 3 | 1 | 3 | 3 | 26 | 2 | 24 | 7 | 20 | 1 | 18 | 7 | 14 | 5 | 0 | 2 | 9 |
15,961 | onnx/onnx | onnx_onnx/onnx/reference/ops/aionnxml/op_tree_ensemble_regressor.py | onnx.reference.ops.aionnxml.op_tree_ensemble_regressor.TreeEnsembleRegressor | from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
import numpy as np
from onnx.reference.ops.aionnxml.op_tree_ensemble_helper import TreeEnsemble
class TreeEnsembleRegressor(OpRunAiOnnxMl):
"""`nodes_hitrates` and `nodes_hitrates_as_tensor` are not used."""
def _run(self, X, aggregate_fun... |
class TreeEnsembleRegressor(OpRunAiOnnxMl):
'''`nodes_hitrates` and `nodes_hitrates_as_tensor` are not used.'''
def _run(self, X, aggregate_function=None, base_values=None, base_values_as_tensor=None, n_targets=None, nodes_falsenodeids=None, nodes_featureids=None, nodes_hitrates=None, nodes_hitrates_as_tensor... | 2 | 1 | 93 | 3 | 88 | 8 | 16 | 0.1 | 1 | 6 | 1 | 0 | 1 | 1 | 1 | 40 | 96 | 4 | 89 | 38 | 63 | 9 | 36 | 14 | 34 | 16 | 6 | 4 | 16 |
15,962 | onnx/onnx | onnx_onnx/onnx/reference/ops/experimental/_op_run_experimental.py | onnx.reference.ops.experimental._op_run_experimental.OpRunExperimental | from onnx.reference.op_run import OpRun
class OpRunExperimental(OpRun):
op_domain = 'experimental' |
class OpRunExperimental(OpRun):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 39 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
15,963 | onnx/onnx | onnx_onnx/onnx/reference/ops/experimental/op_im2col.py | onnx.reference.ops.experimental.op_im2col.Im2Col | from onnx.reference.ops.experimental._op_run_experimental import OpRunExperimental
from onnx.reference.ops_optimized.op_conv_optimized import im2col_fast
class Im2Col(OpRunExperimental):
def _run(self, img, kernel_shape, dilations=None, pads=None, strides=None):
if dilations is None:
dilations... |
class Im2Col(OpRunExperimental):
def _run(self, img, kernel_shape, dilations=None, pads=None, strides=None):
pass | 2 | 0 | 25 | 3 | 21 | 4 | 7 | 0.18 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 40 | 26 | 3 | 22 | 8 | 20 | 4 | 20 | 7 | 18 | 7 | 6 | 2 | 7 |
15,964 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_abs.py | onnx.reference.ops.op_abs.Abs | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Abs(OpRunUnaryNum):
def _run(self, x):
return (np.absolute(x),) |
class Abs(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 |
15,965 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_acos.py | onnx.reference.ops.op_acos.Acos | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Acos(OpRunUnaryNum):
def _run(self, x):
return (np.arccos(x),) |
class Acos(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 |
15,966 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_acosh.py | onnx.reference.ops.op_acosh.Acosh | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Acosh(OpRunUnaryNum):
def _run(self, x):
return (np.arccosh(x),) |
class Acosh(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 |
15,967 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_add.py | onnx.reference.ops.op_add.Add | from onnx.reference.ops._op import OpRunBinaryNumpy
import numpy as np
class Add(OpRunBinaryNumpy):
def __init__(self, onnx_node, run_params):
OpRunBinaryNumpy.__init__(self, np.add, onnx_node, run_params) |
class Add(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 |
15,968 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_affine_grid.py | onnx.reference.ops.op_affine_grid.AffineGrid | from onnx.reference.op_run import OpRun
class AffineGrid(OpRun):
def _run(self, theta, size, align_corners=None):
align_corners = align_corners or self.align_corners
_, _, *data_size = size
original_grid = construct_original_grid(data_size, align_corners)
grid = apply_affine_transf... |
class AffineGrid(OpRun):
def _run(self, theta, size, align_corners=None):
pass | 2 | 0 | 6 | 0 | 6 | 2 | 1 | 0.29 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 7 | 0 | 7 | 5 | 5 | 2 | 7 | 5 | 5 | 1 | 5 | 0 | 1 |
15,969 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_and.py | onnx.reference.ops.op_and.And | from onnx.reference.ops._op import OpRunBinary
import numpy as np
class And(OpRunBinary):
def _run(self, x, y):
return (np.logical_and(x, y),) |
class And(OpRunBinary):
def _run(self, x, y):
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 |
15,970 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmax.py | onnx.reference.ops.op_argmax.ArgMax_1 | class ArgMax_1(_ArgMax):
pass | class ArgMax_1(_ArgMax):
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 |
15,971 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmax.py | onnx.reference.ops.op_argmax.ArgMax_12 | class ArgMax_12(_ArgMax):
def _run(self, data, axis=None, keepdims=None, select_last_index=None):
if select_last_index == 0:
return _ArgMax._run(self, data, axis=axis, keepdims=keepdims)
return (_argmax_use_numpy_select_last_index(data, axis=axis, keepdims=keepdims),) | class ArgMax_12(_ArgMax):
def _run(self, data, axis=None, keepdims=None, select_last_index=None):
pass | 2 | 0 | 6 | 0 | 6 | 2 | 2 | 0.29 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 7 | 0 | 7 | 2 | 5 | 2 | 5 | 2 | 3 | 2 | 6 | 1 | 2 |
15,972 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmax.py | onnx.reference.ops.op_argmax._ArgMax | from onnx.reference.op_run import OpRun
class _ArgMax(OpRun):
def _run(self, data, axis=None, keepdims=None):
return (_argmax(data, axis=axis, keepdims=keepdims),) |
class _ArgMax(OpRun):
def _run(self, data, axis=None, keepdims=None):
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 |
15,973 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmin.py | onnx.reference.ops.op_argmin.ArgMin_1 | class ArgMin_1(_ArgMin):
pass | class ArgMin_1(_ArgMin):
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 |
15,974 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmin.py | onnx.reference.ops.op_argmin.ArgMin_12 | class ArgMin_12(_ArgMin):
def _run(self, data, axis=None, keepdims=None, select_last_index=None):
if select_last_index == 0:
return _ArgMin._run(self, data, axis=axis, keepdims=keepdims)
return (_argmin_use_numpy_select_last_index(data, axis=axis, keepdims=keepdims),) | class ArgMin_12(_ArgMin):
def _run(self, data, axis=None, keepdims=None, select_last_index=None):
pass | 2 | 0 | 6 | 0 | 6 | 2 | 2 | 0.29 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 7 | 0 | 7 | 2 | 5 | 2 | 5 | 2 | 3 | 2 | 6 | 1 | 2 |
15,975 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_argmin.py | onnx.reference.ops.op_argmin._ArgMin | from onnx.reference.op_run import OpRun
class _ArgMin(OpRun):
def _run(self, data, axis=None, keepdims=None):
return (_argmin(data, axis=axis, keepdims=keepdims),) |
class _ArgMin(OpRun):
def _run(self, data, axis=None, keepdims=None):
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 |
15,976 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_asin.py | onnx.reference.ops.op_asin.Asin | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Asin(OpRunUnaryNum):
def _run(self, x):
return (np.arcsin(x),) |
class Asin(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 |
15,977 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_asinh.py | onnx.reference.ops.op_asinh.Asinh | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Asinh(OpRunUnaryNum):
def _run(self, x):
return (np.arcsinh(x),) |
class Asinh(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 |
15,978 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_atan.py | onnx.reference.ops.op_atan.Atan | from onnx.reference.ops._op import OpRunUnaryNum
import numpy as np
class Atan(OpRunUnaryNum):
def _run(self, x):
return (np.arctan(x),) |
class Atan(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 |
15,979 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_atanh.py | onnx.reference.ops.op_atanh.Atanh | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Atanh(OpRunUnaryNum):
def _run(self, x):
return (np.arctanh(x),) |
class Atanh(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 |
15,980 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_attribute_has_value.py | onnx.reference.ops.op_attribute_has_value.AttributeHasValue | import numpy as np
from onnx.reference.op_run import OpRun
class AttributeHasValue(OpRun):
def _run(self, value_float=None, value_floats=None, value_graph=None, value_graphs=None, value_int=None, value_ints=None, value_sparse_tensor=None, value_sparse_tensors=None, value_string=None, value_strings=None, value_ten... |
class AttributeHasValue(OpRun):
def _run(self, value_float=None, value_floats=None, value_graph=None, value_graphs=None, value_int=None, value_ints=None, value_sparse_tensor=None, value_sparse_tensors=None, value_string=None, value_strings=None, value_tensor=None, value_tensors=None, value_type_proto=None, value_... | 2 | 0 | 22 | 0 | 21 | 16 | 3 | 0.73 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 23 | 0 | 22 | 19 | 4 | 16 | 6 | 3 | 4 | 3 | 5 | 2 | 3 |
15,981 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_average_pool.py | onnx.reference.ops.op_average_pool.AveragePool_1 | from onnx.reference.ops.op_pool_common import CommonPool
class AveragePool_1(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
return CommonPool._run(self, 'AVG', count_include_pad, x, auto_pad=auto_pad, ceil_mode=ceil_mode, ... |
class AveragePool_1(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
pass | 2 | 0 | 22 | 0 | 22 | 1 | 1 | 0.04 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 23 | 0 | 23 | 11 | 12 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
15,982 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_average_pool.py | onnx.reference.ops.op_average_pool.AveragePool_11 | from onnx.reference.ops.op_pool_common import CommonPool
class AveragePool_11(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
return CommonPool._run(self, 'AVG', count_include_pad, x, auto_pad=auto_pad, ceil_mode=ceil_mode,... |
class AveragePool_11(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
pass | 2 | 0 | 22 | 0 | 22 | 1 | 1 | 0.04 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 23 | 0 | 23 | 11 | 12 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
15,983 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_average_pool.py | onnx.reference.ops.op_average_pool.AveragePool_19 | from onnx.reference.ops.op_pool_common import CommonPool
class AveragePool_19(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, dilations=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
return CommonPool._run(self, 'AVG', count_include_pad, x, auto_pad=auto_pad, ceil... |
class AveragePool_19(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, dilations=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
pass | 2 | 0 | 23 | 0 | 23 | 1 | 1 | 0.04 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 24 | 0 | 24 | 12 | 12 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
15,984 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_average_pool.py | onnx.reference.ops.op_average_pool.AveragePool_7 | from onnx.reference.ops.op_pool_common import CommonPool
class AveragePool_7(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
return CommonPool._run(self, 'AVG', count_include_pad, x, auto_pad=auto_pad, ceil_mode=ceil_mode, ... |
class AveragePool_7(CommonPool):
def _run(self, x, auto_pad=None, ceil_mode=None, kernel_shape=None, pads=None, strides=None, count_include_pad=None):
pass | 2 | 0 | 22 | 0 | 22 | 1 | 1 | 0.04 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 23 | 0 | 23 | 11 | 12 | 1 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
15,985 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_batch_normalization.py | onnx.reference.ops.op_batch_normalization.BatchNormalization_14 | from onnx.reference.op_run import OpRun
class BatchNormalization_14(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, momentum=None, training_mode=None):
if training_mode == 0:
res = _batchnorm_test_mode(x, scale, bias, mean, var, epsilon=epsilon)
return (res,)
... |
class BatchNormalization_14(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, momentum=None, training_mode=None):
pass | 2 | 0 | 10 | 0 | 10 | 2 | 2 | 0.18 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 11 | 0 | 11 | 6 | 7 | 2 | 7 | 4 | 5 | 2 | 5 | 1 | 2 |
15,986 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_batch_normalization.py | onnx.reference.ops.op_batch_normalization.BatchNormalization_6 | from onnx.reference.op_run import OpRun
class BatchNormalization_6(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, is_test=None, momentum=None, spatial=None):
if is_test:
res = _batchnorm_test_mode(x, scale, bias, mean, var, epsilon=epsilon)
else:
res = _bat... |
class BatchNormalization_6(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, is_test=None, momentum=None, spatial=None):
pass | 2 | 0 | 19 | 0 | 19 | 2 | 2 | 0.1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 20 | 0 | 20 | 14 | 7 | 2 | 6 | 3 | 4 | 2 | 5 | 1 | 2 |
15,987 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_batch_normalization.py | onnx.reference.ops.op_batch_normalization.BatchNormalization_9 | from onnx.reference.op_run import OpRun
import numpy as np
class BatchNormalization_9(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, momentum=None):
if momentum is None:
res = _batchnorm_test_mode(x, scale, bias, mean, var, epsilon=epsilon)
return (res,)
ax... |
class BatchNormalization_9(OpRun):
def _run(self, x, scale, bias, mean, var, epsilon=None, momentum=None):
pass | 2 | 0 | 13 | 0 | 13 | 1 | 2 | 0.07 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 40 | 14 | 0 | 14 | 8 | 12 | 1 | 12 | 8 | 10 | 2 | 5 | 1 | 2 |
15,988 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bernoulli.py | onnx.reference.ops.op_bernoulli.Bernoulli | from onnx.helper import np_dtype_to_tensor_dtype
from onnx.reference.ops._op_common_random import _CommonRandom
class Bernoulli(_CommonRandom):
def _run(self, x, dtype=None, seed=None):
if dtype is None:
dtype = np_dtype_to_tensor_dtype(x.dtype)
dtype = self._dtype(x, dtype=dtype, dtyp... |
class Bernoulli(_CommonRandom):
def _run(self, x, dtype=None, seed=None):
pass | 2 | 0 | 7 | 0 | 7 | 1 | 2 | 0.13 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 44 | 8 | 0 | 8 | 4 | 6 | 1 | 8 | 4 | 6 | 2 | 6 | 1 | 2 |
15,989 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bitshift.py | onnx.reference.ops.op_bitshift.BitShift | import numpy as np
from onnx.reference.ops._op import OpRunBinaryNumpy
class BitShift(OpRunBinaryNumpy):
def __init__(self, onnx_node, run_params):
OpRunBinaryNumpy.__init__(self, np.right_shift, onnx_node, run_params)
if self.direction not in ('LEFT', 'RIGHT'):
raise ValueError(f'Unex... |
class BitShift(OpRunBinaryNumpy):
def __init__(self, onnx_node, run_params):
pass | 2 | 0 | 6 | 0 | 6 | 4 | 3 | 0.57 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 44 | 7 | 0 | 7 | 3 | 5 | 4 | 7 | 3 | 5 | 3 | 8 | 1 | 3 |
15,990 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bitwise_and.py | onnx.reference.ops.op_bitwise_and.BitwiseAnd | import numpy as np
from onnx.reference.ops._op import OpRunBinary
class BitwiseAnd(OpRunBinary):
def _run(self, x, y):
return (np.bitwise_and(x, y),) |
class BitwiseAnd(OpRunBinary):
def _run(self, x, y):
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 |
15,991 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bitwise_not.py | onnx.reference.ops.op_bitwise_not.BitwiseNot | from onnx.reference.ops._op import OpRunUnary
import numpy as np
class BitwiseNot(OpRunUnary):
def _run(self, X):
return (np.bitwise_not(X),) |
class BitwiseNot(OpRunUnary):
def _run(self, X):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 41 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
15,992 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bitwise_or.py | onnx.reference.ops.op_bitwise_or.BitwiseOr | import numpy as np
from onnx.reference.ops._op import OpRunBinary
class BitwiseOr(OpRunBinary):
def _run(self, x, y):
return (np.bitwise_or(x, y),) |
class BitwiseOr(OpRunBinary):
def _run(self, x, y):
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 |
15,993 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_bitwise_xor.py | onnx.reference.ops.op_bitwise_xor.BitwiseXor | from onnx.reference.ops._op import OpRunBinary
import numpy as np
class BitwiseXor(OpRunBinary):
def _run(self, x, y):
return (np.bitwise_xor(x, y),) |
class BitwiseXor(OpRunBinary):
def _run(self, x, y):
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 |
15,994 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_blackman_window.py | onnx.reference.ops.op_blackman_window.BlackmanWindow | import numpy as np
from onnx.reference.ops._op_common_window import _CommonWindow
class BlackmanWindow(_CommonWindow):
"""Blankman windowing function.
Returns :math:`\\\\omega_n = 0.42 - 0.5 \\\\cos \\\\left( \\\\frac{2\\\\pi n}{N-1} \\\\right) + 0.08 \\\\cos \\\\left( \\\\frac{4\\\\pi n}{N-1} \\\\right)`
... |
class BlackmanWindow(_CommonWindow):
'''Blankman windowing function.
Returns :math:`\\omega_n = 0.42 - 0.5 \\cos \\left( \\frac{2\\pi n}{N-1} \\right) + 0.08 \\cos \\left( \\frac{4\\pi n}{N-1} \\right)`
where *N* is the window length.
See `blackman_window <https://pytorch.org/docs/stable/generated/torc... | 2 | 1 | 11 | 0 | 11 | 1 | 2 | 0.5 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 42 | 20 | 3 | 12 | 7 | 10 | 6 | 12 | 7 | 10 | 2 | 6 | 1 | 2 |
15,995 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_cast.py | onnx.reference.ops.op_cast.Cast_1 | from onnx.reference.op_run import OpRun
class Cast_1(OpRun):
def _run(self, x, to=None):
return (cast_to(x, to, saturate=True, round_mode='up'),) |
class Cast_1(OpRun):
def _run(self, x, to=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 |
15,996 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_cast.py | onnx.reference.ops.op_cast.Cast_19 | from onnx.reference.op_run import OpRun
class Cast_19(OpRun):
def _run(self, x, to=None, saturate=None):
return (cast_to(x, to, saturate, round_mode='up'),) |
class Cast_19(OpRun):
def _run(self, x, to=None, saturate=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 |
15,997 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_cast_like.py | onnx.reference.ops.op_cast_like.CastLike_15 | from onnx.reference.op_run import OpRun
class CastLike_15(OpRun):
def _run(self, x, y):
return _cast_like(x, y, True) |
class CastLike_15(OpRun):
def _run(self, x, y):
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 |
15,998 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_cast_like.py | onnx.reference.ops.op_cast_like.CastLike_19 | from onnx.reference.op_run import OpRun
class CastLike_19(OpRun):
def _run(self, x, y, saturate=False):
return _cast_like(x, y, saturate) |
class CastLike_19(OpRun):
def _run(self, x, y, saturate=False):
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 |
15,999 | onnx/onnx | onnx_onnx/onnx/reference/ops/op_ceil.py | onnx.reference.ops.op_ceil.Ceil | import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Ceil(OpRunUnaryNum):
def _run(self, x):
return (np.ceil(x),) |
class Ceil(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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.