onnx.defs#

Opset Version#

onnx.defs.onnx_opset_version() int[source]#

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][source]#

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#

Members:

FLOAT

INT

STRING

TENSOR

GRAPH

FLOATS

INTS

STRINGS

TENSORS

GRAPHS

SPARSE_TENSOR

SPARSE_TENSORS

TYPE_PROTO

TYPE_PROTOS

property name#
class DifferentiationCategory#

Members:

Unknown

Differentiable

NonDifferentiable

property name#
class FormalParameterOption#

Members:

Single

Optional

Variadic

property name#
class SupportType#

Members:

COMMON

EXPERIMENTAL

property name#
get_context_dependent_function(self: onnx.onnx_cpp2py_export.defs.OpSchema, arg0: bytes, arg1: List[bytes]) bytes#
static is_infinite(arg0: int) bool#

Exception SchemaError#

class onnx.defs.SchemaError#

Constants#

Domains officially supported in onnx package.

from onnx.defs import (
    ONNX_DOMAIN,
    ONNX_ML_DOMAIN,
    AI_ONNX_PREVIEW_TRAINING_DOMAIN,
)
print(f"ONNX_DOMAIN={ONNX_DOMAIN!r}")
print(f"ONNX_ML_DOMAIN={ONNX_ML_DOMAIN!r}")
print(f"AI_ONNX_PREVIEW_TRAINING_DOMAIN={AI_ONNX_PREVIEW_TRAINING_DOMAIN!r}")
ONNX_DOMAIN=''
ONNX_ML_DOMAIN='ai.onnx.ml'
AI_ONNX_PREVIEW_TRAINING_DOMAIN='ai.onnx.preview.training'