onnxs v0.2.0 API Reference

Modules

A named attribute containing either singular float, integer, string and tensor values, or repeated float, integer, string 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

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

GraphProto defines a parameterized series of nodes to form a directed acyclic graph. This is the equivalent of the “network” and “graph” in many deep learning frameworks

ModelProto is a top-level file/container format for bundling a ML model. The semantics of the model are described by the GraphProto that represents a parameterized computation graph against a set of named operators that are defined independently from the graph

NodeProto stores a node that is similar to the notion of “layer” or “operator” in many deep 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

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

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

A message defined to store a tensor in its serialized format

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

Defines a tensor shape

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

Define the types

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

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