onnx.defs#

Opset Version#

onnx.defs.onnx_opset_version() int#

Return current opset for domain ai.onnx.

onnx.defs.get_all_schemas_with_history() List[onnx.onnx_cpp2py_export.defs.OpSchema]#

Return the schema of all existing operators and all versions.

Operators and Functions Schemas#

onnx.defs.get_function_ops() List[OpSchema]#

Return operators defined as functions.

onnx.defs.get_schema(*args, **kwargs)#

Overloaded function.

  1. get_schema(op_type: str, max_inclusive_version: int, domain: str = ‘’) -> onnx.onnx_cpp2py_export.defs.OpSchema

Return the schema of the operator op_type and for a specific version.

  1. get_schema(op_type: str, domain: str = ‘’) -> onnx.onnx_cpp2py_export.defs.OpSchema

Return the schema of the operator op_type and for a specific version.

class OpSchema#

class onnx.defs.OpSchema#

Schema of an operator.

class AttrType(self: onnx.onnx_cpp2py_export.defs.OpSchema.AttrType, value: int)#

Members:

FLOAT

INT

STRING

TENSOR

GRAPH

FLOATS

INTS

STRINGS

TENSORS

GRAPHS

SPARSE_TENSOR

SPARSE_TENSORS

TYPE_PROTO

TYPE_PROTOS

__eq__(self: object, other: object) bool#
__getstate__(self: object) int#
__hash__(self: object) int#
__index__(self: onnx.onnx_cpp2py_export.defs.OpSchema.AttrType) int#
__init__(self: onnx.onnx_cpp2py_export.defs.OpSchema.AttrType, value: int) None#
__int__(self: onnx.onnx_cpp2py_export.defs.OpSchema.AttrType) int#
__members__ = {'FLOAT': <AttrType.FLOAT: 1>, 'FLOATS': <AttrType.FLOATS: 6>, 'GRAPH': <AttrType.GRAPH: 5>, 'GRAPHS': <AttrType.GRAPHS: 10>, 'INT': <AttrType.INT: 2>, 'INTS': <AttrType.INTS: 7>, 'SPARSE_TENSOR': <AttrType.SPARSE_TENSOR: 11>, 'SPARSE_TENSORS': <AttrType.SPARSE_TENSORS: 12>, 'STRING': <AttrType.STRING: 3>, 'STRINGS': <AttrType.STRINGS: 8>, 'TENSOR': <AttrType.TENSOR: 4>, 'TENSORS': <AttrType.TENSORS: 9>, 'TYPE_PROTO': <AttrType.TYPE_PROTO: 13>, 'TYPE_PROTOS': <AttrType.TYPE_PROTOS: 14>}#
__ne__(self: object, other: object) bool#
__repr__(self: object) str#
__setstate__(self: onnx.onnx_cpp2py_export.defs.OpSchema.AttrType, state: int) None#
__str__()#

name(self: handle) -> str

property name#
class DifferentiationCategory(self: onnx.onnx_cpp2py_export.defs.OpSchema.DifferentiationCategory, value: int)#

Members:

Unknown

Differentiable

NonDifferentiable

__eq__(self: object, other: object) bool#
__getstate__(self: object) int#
__hash__(self: object) int#
__index__(self: onnx.onnx_cpp2py_export.defs.OpSchema.DifferentiationCategory) int#
__init__(self: onnx.onnx_cpp2py_export.defs.OpSchema.DifferentiationCategory, value: int) None#
__int__(self: onnx.onnx_cpp2py_export.defs.OpSchema.DifferentiationCategory) int#
__members__ = {'Differentiable': <DifferentiationCategory.Differentiable: 1>, 'NonDifferentiable': <DifferentiationCategory.NonDifferentiable: 2>, 'Unknown': <DifferentiationCategory.Unknown: 0>}#
__ne__(self: object, other: object) bool#
__repr__(self: object) str#
__setstate__(self: onnx.onnx_cpp2py_export.defs.OpSchema.DifferentiationCategory, state: int) None#
__str__()#

name(self: handle) -> str

property name#
class FormalParameterOption(self: onnx.onnx_cpp2py_export.defs.OpSchema.FormalParameterOption, value: int)#

Members:

Single

Optional

Variadic

__eq__(self: object, other: object) bool#
__getstate__(self: object) int#
__hash__(self: object) int#
__index__(self: onnx.onnx_cpp2py_export.defs.OpSchema.FormalParameterOption) int#
__init__(self: onnx.onnx_cpp2py_export.defs.OpSchema.FormalParameterOption, value: int) None#
__int__(self: onnx.onnx_cpp2py_export.defs.OpSchema.FormalParameterOption) int#
__members__ = {'Optional': <FormalParameterOption.Optional: 1>, 'Single': <FormalParameterOption.Single: 0>, 'Variadic': <FormalParameterOption.Variadic: 2>}#
__ne__(self: object, other: object) bool#
__repr__(self: object) str#
__setstate__(self: onnx.onnx_cpp2py_export.defs.OpSchema.FormalParameterOption, state: int) None#
__str__()#

name(self: handle) -> str

property name#
class SupportType(self: onnx.onnx_cpp2py_export.defs.OpSchema.SupportType, value: int)#

Members:

COMMON

EXPERIMENTAL

__eq__(self: object, other: object) bool#
__getstate__(self: object) int#
__hash__(self: object) int#
__index__(self: onnx.onnx_cpp2py_export.defs.OpSchema.SupportType) int#
__init__(self: onnx.onnx_cpp2py_export.defs.OpSchema.SupportType, value: int) None#
__int__(self: onnx.onnx_cpp2py_export.defs.OpSchema.SupportType) int#
__members__ = {'COMMON': <SupportType.COMMON: 0>, 'EXPERIMENTAL': <SupportType.EXPERIMENTAL: 1>}#
__ne__(self: object, other: object) bool#
__repr__(self: object) str#
__setstate__(self: onnx.onnx_cpp2py_export.defs.OpSchema.SupportType, state: int) None#
__str__()#

name(self: handle) -> str

property name#
__init__(*args, **kwargs)#
property _function_body#
_infer_node_outputs(self: onnx.onnx_cpp2py_export.defs.OpSchema, nodeBytes: bytes, valueTypesByNameBytes: Dict[str, bytes], inputDataByNameBytes: Dict[str, bytes] = {}, inputSparseDataByNameBytes: Dict[str, bytes] = {}, opsetImports: Dict[str, int] = {}, irVersion: int = 8) Dict[str, bytes]#
get_context_dependent_function(self: onnx.onnx_cpp2py_export.defs.OpSchema, arg0: bytes, arg1: List[bytes]) bytes#
get_context_dependent_function_with_opset_version(self: onnx.onnx_cpp2py_export.defs.OpSchema, arg0: int, arg1: bytes, arg2: List[bytes]) bytes#
get_function_with_opset_version(self: onnx.onnx_cpp2py_export.defs.OpSchema, arg0: int) bytes#
static is_infinite(arg0: int) bool#

Exception SchemaError#

class onnx.defs.SchemaError#

Constants#

Domains officially supported in onnx package.