package onnx

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message AttributeProto

onnx.proto:114

Attributes A named attribute containing either singular float, integer, string, graph, and tensor values, or repeated float, integer, string, graph, and tensor values. An AttributeProto MUST contain the name field, and *only one* of the following content fields, effectively enforcing a C/C++ union equivalent.

Used in: NodeProto

enum AttributeProto.AttributeType

onnx.proto:118

Note: this enum is structurally identical to the OpSchema::AttrType enum defined in schema.h. If you rev one, you likely need to rev the other.

Used in: AttributeProto

message FunctionProto

onnx.proto:767

Used in: ModelProto, OperatorSetProto

message GraphProto

onnx.proto:439

Graphs A graph defines the computational logic of a model and is comprised of a parameterized list of nodes that form a directed acyclic graph based on their inputs and outputs. This is the equivalent of the "network" or "graph" in many deep learning frameworks.

Used in: AttributeProto, ModelProto, TrainingInfoProto

message MapProto

onnx-data.proto:83

Maps Specifies an associative table, defined by keys and values. MapProto is formed with a repeated field of keys (of type INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, or STRING) and values (of type TENSOR, SPARSE_TENSOR, SEQUENCE, or MAP). Key types and value types have to remain the same throughout the instantiation of the MapProto.

Used in: OptionalProto, SequenceProto

message ModelProto

onnx.proto:340

Models ModelProto is a top-level file/container format for bundling a ML model and associating its computation graph with metadata. The semantics of the model are described by the associated GraphProto's.

message NodeProto

onnx.proto:196

Nodes Computation graphs are made up of a DAG of nodes, which represent what is commonly called a "layer" or "pipeline stage" in machine learning frameworks. For example, it can be a node of type "Conv" that takes in an image, a filter tensor and a bias tensor, and produces the convolved output.

Used in: FunctionProto, GraphProto

message OperatorProto

onnx-operators.proto:48

An OperatorProto represents the immutable specification of the signature and semantics of an operator. Operators are declared as part of an OperatorSet, which also defines the domain name for the set. Operators are uniquely identified by a three part identifier (domain, op_type, since_version) where *domain* is the domain of an operator set that contains this operator specification. *op_type* is the name of the operator as referenced by a NodeProto.op_type *since_version* is the version of the operator set that this operator was initially declared in.

Used in: OperatorSetProto

message OperatorSetIdProto

onnx.proto:749

Operator Sets OperatorSets are uniquely identified by a (domain, opset_version) pair.

Used in: FunctionProto, ModelProto

message OperatorSetProto

onnx-operators.proto:92

An OperatorSetProto represents an immutable set of immutable operator specifications. The domain of the set (OperatorSetProto.domain) is a reverse-DNS name that disambiguates operator sets defined by independent entities. The version of the set (opset_version) is a monotonically increasing integer that indicates changes to the membership of the operator set. Operator sets are uniquely identified by a two part identifier (domain, opset_version) Like ModelProto, OperatorSetProto is intended as a top-level file/wire format, and thus has the standard format headers in addition to the operator set information.

enum OperatorStatus

onnx.proto:762

Operator/function status.

Used in: OperatorProto

message OptionalProto

onnx-data.proto:112

Optional

Used in: SequenceProto

enum OptionalProto.DataType

onnx-data.proto:116

message SequenceProto

onnx-data.proto:35

Sequences Defines a dense, ordered, collection of elements that are of homogeneous types. Sequences can be made out of tensors, maps, or sequences. If a sequence is made out of tensors, the tensors must have the same element type (i.e. int32). In some cases, the tensors in a sequence can have different shapes. Whether the tensors can have different shapes or not depends on the type/shape associated with the corresponding "ValueInfo". For example, "Sequence<Tensor<float, [M,N]>" means that all tensors have same shape. However, "Sequence<Tensor<float, [omitted,omitted]>" means they can have different shapes (all of rank 2), where "omitted" means the corresponding dimension has no symbolic/constant value. Finally, "Sequence<Tensor<float, omitted>>" means that the different tensors can have different ranks, when the "shape" itself is omitted from the tensor-type. For a more complete description, refer to https://github.com/onnx/onnx/blob/master/docs/IR.md#static-tensor-shapes.

Used in: MapProto, OptionalProto

enum SequenceProto.DataType

onnx-data.proto:39

message SparseTensorProto

onnx.proto:625

A serialized sparse-tensor value

Used in: AttributeProto, GraphProto, OptionalProto, SequenceProto

message StringStringEntryProto

onnx.proto:417

StringStringEntryProto follows the pattern for cross-proto-version maps. See https://developers.google.com/protocol-buffers/docs/proto3#maps

Used in: ModelProto, TensorAnnotation, TensorProto, TrainingInfoProto

message TensorAnnotation

onnx.proto:422

Used in: GraphProto

message TensorProto

onnx.proto:484

Tensors A serialized tensor value.

Used in: AttributeProto, GraphProto, OptionalProto, SequenceProto, SparseTensorProto

enum TensorProto.DataLocation

onnx.proto:601

Location of the data for this tensor. MUST be one of: - DEFAULT - data stored inside the protobuf message. Data is stored in raw_data (if set) otherwise in type-specified field. - EXTERNAL - data stored in an external location as described by external_data field.

Used in: TensorProto

enum TensorProto.DataType

onnx.proto:485

message TensorProto.Segment

onnx.proto:526

For very large tensors, we may want to store them in chunks, in which case the following fields will specify the segment that is stored in the current TensorProto.

Used in: TensorProto

message TensorShapeProto

onnx.proto:651

Defines a tensor shape. A dimension can be either an integer value or a symbolic variable. A symbolic variable represents an unknown dimension.

Used in: TypeProto.SparseTensor, TypeProto.Tensor

message TensorShapeProto.Dimension

onnx.proto:652

Used in: TensorShapeProto

message TrainingInfoProto

onnx.proto:235

Training information TrainingInfoProto stores information for training a model. In particular, this defines two functionalities: an initialization-step and a training-algorithm-step. Initialization resets the model back to its original state as if no training has been performed. Training algorithm improves the model based on input data. The semantics of the initialization-step is that the initializers in ModelProto.graph and in TrainingInfoProto.algorithm are first initialized as specified by the initializers in the graph, and then updated by the "initialization_binding" in every instance in ModelProto.training_info. The field "algorithm" defines a computation graph which represents a training algorithm's step. After the execution of a TrainingInfoProto.algorithm, the initializers specified by "update_binding" may be immediately updated. If the targeted training algorithm contains consecutive update steps (such as block coordinate descent methods), the user needs to create a TrainingInfoProto for each step.

Used in: ModelProto

message TypeProto

onnx.proto:670

Types The standard ONNX data types.

Used in: AttributeProto, TypeProto.Map, TypeProto.Optional, TypeProto.Sequence, ValueInfoProto

message TypeProto.Map

onnx.proto:688

map<K,V>

Used in: TypeProto

message TypeProto.Optional

onnx.proto:698

wrapper for Tensor, Sequence, or Map

Used in: TypeProto

message TypeProto.Sequence

onnx.proto:681

repeated T

Used in: TypeProto

message TypeProto.SparseTensor

onnx.proto:706

Used in: TypeProto

message TypeProto.Tensor

onnx.proto:672

Used in: TypeProto

message ValueInfoProto

onnx.proto:179

Defines information on value, including the name, the type, and the shape of the value.

Used in: GraphProto

enum Version

onnx.proto:50

Versioning ONNX versioning is specified in docs/IR.md and elaborated on in docs/Versioning.md To be compatible with both proto2 and proto3, we will use a version number that is not defined by the default value but an explicit enum number.