mappings

Type Mappings

TENSOR_TYPE_TO_NP_TYPE

<<<

import pprint
from onnx.mapping import TENSOR_TYPE_TO_NP_TYPE

pprint.pprint(TENSOR_TYPE_TO_NP_TYPE)

>>>

    {1: dtype('float32'),
     2: dtype('uint8'),
     3: dtype('int8'),
     4: dtype('uint16'),
     5: dtype('int16'),
     6: dtype('int32'),
     7: dtype('int64'),
     8: dtype('O'),
     9: dtype('bool'),
     10: dtype('float16'),
     11: dtype('float64'),
     12: dtype('uint32'),
     13: dtype('uint64'),
     14: dtype('complex64'),
     15: dtype('complex128'),
     16: dtype('float16')}

NP_TYPE_TO_TENSOR_TYPE

<<<

import pprint
from onnx.mapping import NP_TYPE_TO_TENSOR_TYPE

pprint.pprint(NP_TYPE_TO_TENSOR_TYPE)

>>>

    {dtype('bool'): 9,
     dtype('uint8'): 2,
     dtype('int8'): 3,
     dtype('uint16'): 4,
     dtype('int16'): 5,
     dtype('float32'): 1,
     dtype('int32'): 6,
     dtype('int64'): 7,
     dtype('float16'): 10,
     dtype('uint32'): 12,
     dtype('uint64'): 13,
     dtype('float64'): 11,
     dtype('complex64'): 14,
     dtype('complex128'): 15,
     dtype('O'): 8}

TENSOR_TYPE_TO_STORAGE_TENSOR_TYPE

<<<

import pprint
from onnx.mapping import TENSOR_TYPE_TO_STORAGE_TENSOR_TYPE

pprint.pprint(TENSOR_TYPE_TO_STORAGE_TENSOR_TYPE)

>>>

    {1: 1,
     2: 6,
     3: 6,
     4: 6,
     5: 6,
     6: 6,
     7: 7,
     8: 8,
     9: 6,
     10: 4,
     11: 11,
     12: 12,
     13: 13,
     14: 1,
     15: 11,
     16: 4}

STORAGE_TENSOR_TYPE_TO_FIELD

<<<

import pprint
from onnx.mapping import STORAGE_TENSOR_TYPE_TO_FIELD

pprint.pprint(STORAGE_TENSOR_TYPE_TO_FIELD)

>>>

    {1: 'float_data',
     4: 'int32_data',
     6: 'int32_data',
     7: 'int64_data',
     8: 'string_data',
     9: 'int32_data',
     11: 'double_data',
     12: 'uint64_data',
     13: 'uint64_data',
     14: 'float_data',
     15: 'double_data'}

STORAGE_ELEMENT_TYPE_TO_FIELD

<<<

import pprint
from onnx.mapping import STORAGE_ELEMENT_TYPE_TO_FIELD

pprint.pprint(STORAGE_ELEMENT_TYPE_TO_FIELD)

>>>

    {1: 'tensor_values',
     2: 'sparse_tensor_values',
     3: 'sequence_values',
     4: 'map_values',
     5: 'optional_value'}

OPTIONAL_ELEMENT_TYPE_TO_FIELD

<<<

import pprint
from onnx.mapping import OPTIONAL_ELEMENT_TYPE_TO_FIELD

pprint.pprint(OPTIONAL_ELEMENT_TYPE_TO_FIELD)

>>>

    {1: 'tensor_value',
     2: 'sparse_tensor_value',
     3: 'sequence_value',
     4: 'map_value',
     5: 'optional_value'}

Opset Version

onnx.defs.onnx_opset_version() int[source]
onnx.defs.get_all_schemas_with_history() List[onnx.onnx_cpp2py_export.defs.OpSchema]

Internal module

Schema submodule

exception onnx.onnx_cpp2py_export.defs.SchemaError
onnx.onnx_cpp2py_export.defs.get_all_schemas() List[onnx.onnx_cpp2py_export.defs.OpSchema]
onnx.onnx_cpp2py_export.defs.get_all_schemas_with_history() List[onnx.onnx_cpp2py_export.defs.OpSchema]
onnx.onnx_cpp2py_export.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

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

onnx.onnx_cpp2py_export.defs.has_schema(op_type: str, domain: str = '') bool
onnx.onnx_cpp2py_export.defs.schema_version_map() Dict[str, Tuple[int, int]]