Package ai.onnx.proto

Class OnnxMl.ModelProto

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
ai.onnx.proto.OnnxMl.ModelProto
All Implemented Interfaces:
OnnxMl.ModelProtoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
OnnxMl

public static final class OnnxMl.ModelProto extends com.google.protobuf.GeneratedMessageV3 implements OnnxMl.ModelProtoOrBuilder
 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.
 
Protobuf type onnx.ModelProto
See Also:
  • Field Details

    • IR_VERSION_FIELD_NUMBER

      public static final int IR_VERSION_FIELD_NUMBER
      See Also:
    • OPSET_IMPORT_FIELD_NUMBER

      public static final int OPSET_IMPORT_FIELD_NUMBER
      See Also:
    • PRODUCER_NAME_FIELD_NUMBER

      public static final int PRODUCER_NAME_FIELD_NUMBER
      See Also:
    • PRODUCER_VERSION_FIELD_NUMBER

      public static final int PRODUCER_VERSION_FIELD_NUMBER
      See Also:
    • DOMAIN_FIELD_NUMBER

      public static final int DOMAIN_FIELD_NUMBER
      See Also:
    • MODEL_VERSION_FIELD_NUMBER

      public static final int MODEL_VERSION_FIELD_NUMBER
      See Also:
    • DOC_STRING_FIELD_NUMBER

      public static final int DOC_STRING_FIELD_NUMBER
      See Also:
    • GRAPH_FIELD_NUMBER

      public static final int GRAPH_FIELD_NUMBER
      See Also:
    • METADATA_PROPS_FIELD_NUMBER

      public static final int METADATA_PROPS_FIELD_NUMBER
      See Also:
    • TRAINING_INFO_FIELD_NUMBER

      public static final int TRAINING_INFO_FIELD_NUMBER
      See Also:
    • PARSER

      @Deprecated public static final com.google.protobuf.Parser<OnnxMl.ModelProto> PARSER
      Deprecated.
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasIrVersion

      public boolean hasIrVersion()
       The version of the IR this model targets. See Version enum above.
       This field MUST be present.
       
      optional int64 ir_version = 1;
      Specified by:
      hasIrVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the irVersion field is set.
    • getIrVersion

      public long getIrVersion()
       The version of the IR this model targets. See Version enum above.
       This field MUST be present.
       
      optional int64 ir_version = 1;
      Specified by:
      getIrVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The irVersion.
    • getOpsetImportList

      public List<OnnxMl.OperatorSetIdProto> getOpsetImportList()
       The OperatorSets this model relies on.
       All ModelProtos MUST have at least one entry that
       specifies which version of the ONNX OperatorSet is
       being imported.
       All nodes in the ModelProto's graph will bind against the operator
       with the same-domain/same-op_type operator with the HIGHEST version
       in the referenced operator sets.
       
      repeated .onnx.OperatorSetIdProto opset_import = 8;
      Specified by:
      getOpsetImportList in interface OnnxMl.ModelProtoOrBuilder
    • getOpsetImportOrBuilderList

      public List<? extends OnnxMl.OperatorSetIdProtoOrBuilder> getOpsetImportOrBuilderList()
       The OperatorSets this model relies on.
       All ModelProtos MUST have at least one entry that
       specifies which version of the ONNX OperatorSet is
       being imported.
       All nodes in the ModelProto's graph will bind against the operator
       with the same-domain/same-op_type operator with the HIGHEST version
       in the referenced operator sets.
       
      repeated .onnx.OperatorSetIdProto opset_import = 8;
      Specified by:
      getOpsetImportOrBuilderList in interface OnnxMl.ModelProtoOrBuilder
    • getOpsetImportCount

      public int getOpsetImportCount()
       The OperatorSets this model relies on.
       All ModelProtos MUST have at least one entry that
       specifies which version of the ONNX OperatorSet is
       being imported.
       All nodes in the ModelProto's graph will bind against the operator
       with the same-domain/same-op_type operator with the HIGHEST version
       in the referenced operator sets.
       
      repeated .onnx.OperatorSetIdProto opset_import = 8;
      Specified by:
      getOpsetImportCount in interface OnnxMl.ModelProtoOrBuilder
    • getOpsetImport

      public OnnxMl.OperatorSetIdProto getOpsetImport(int index)
       The OperatorSets this model relies on.
       All ModelProtos MUST have at least one entry that
       specifies which version of the ONNX OperatorSet is
       being imported.
       All nodes in the ModelProto's graph will bind against the operator
       with the same-domain/same-op_type operator with the HIGHEST version
       in the referenced operator sets.
       
      repeated .onnx.OperatorSetIdProto opset_import = 8;
      Specified by:
      getOpsetImport in interface OnnxMl.ModelProtoOrBuilder
    • getOpsetImportOrBuilder

      public OnnxMl.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(int index)
       The OperatorSets this model relies on.
       All ModelProtos MUST have at least one entry that
       specifies which version of the ONNX OperatorSet is
       being imported.
       All nodes in the ModelProto's graph will bind against the operator
       with the same-domain/same-op_type operator with the HIGHEST version
       in the referenced operator sets.
       
      repeated .onnx.OperatorSetIdProto opset_import = 8;
      Specified by:
      getOpsetImportOrBuilder in interface OnnxMl.ModelProtoOrBuilder
    • hasProducerName

      public boolean hasProducerName()
       The name of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_name = 2;
      Specified by:
      hasProducerName in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the producerName field is set.
    • getProducerName

      public String getProducerName()
       The name of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_name = 2;
      Specified by:
      getProducerName in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The producerName.
    • getProducerNameBytes

      public com.google.protobuf.ByteString getProducerNameBytes()
       The name of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_name = 2;
      Specified by:
      getProducerNameBytes in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The bytes for producerName.
    • hasProducerVersion

      public boolean hasProducerVersion()
       The version of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_version = 3;
      Specified by:
      hasProducerVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the producerVersion field is set.
    • getProducerVersion

      public String getProducerVersion()
       The version of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_version = 3;
      Specified by:
      getProducerVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The producerVersion.
    • getProducerVersionBytes

      public com.google.protobuf.ByteString getProducerVersionBytes()
       The version of the framework or tool used to generate this model.
       This field SHOULD be present to indicate which implementation/tool/framework
       emitted the model.
       
      optional string producer_version = 3;
      Specified by:
      getProducerVersionBytes in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The bytes for producerVersion.
    • hasDomain

      public boolean hasDomain()
       Domain name of the model.
       We use reverse domain names as name space indicators. For example:
       `com.facebook.fair` or `com.microsoft.cognitiveservices`
       Together with `model_version` and GraphProto.name, this forms the unique identity of
       the graph.
       
      optional string domain = 4;
      Specified by:
      hasDomain in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the domain field is set.
    • getDomain

      public String getDomain()
       Domain name of the model.
       We use reverse domain names as name space indicators. For example:
       `com.facebook.fair` or `com.microsoft.cognitiveservices`
       Together with `model_version` and GraphProto.name, this forms the unique identity of
       the graph.
       
      optional string domain = 4;
      Specified by:
      getDomain in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The domain.
    • getDomainBytes

      public com.google.protobuf.ByteString getDomainBytes()
       Domain name of the model.
       We use reverse domain names as name space indicators. For example:
       `com.facebook.fair` or `com.microsoft.cognitiveservices`
       Together with `model_version` and GraphProto.name, this forms the unique identity of
       the graph.
       
      optional string domain = 4;
      Specified by:
      getDomainBytes in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The bytes for domain.
    • hasModelVersion

      public boolean hasModelVersion()
       The version of the graph encoded. See Version enum below.
       
      optional int64 model_version = 5;
      Specified by:
      hasModelVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the modelVersion field is set.
    • getModelVersion

      public long getModelVersion()
       The version of the graph encoded. See Version enum below.
       
      optional int64 model_version = 5;
      Specified by:
      getModelVersion in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The modelVersion.
    • hasDocString

      public boolean hasDocString()
       A human-readable documentation for this model. Markdown is allowed.
       
      optional string doc_string = 6;
      Specified by:
      hasDocString in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the docString field is set.
    • getDocString

      public String getDocString()
       A human-readable documentation for this model. Markdown is allowed.
       
      optional string doc_string = 6;
      Specified by:
      getDocString in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The docString.
    • getDocStringBytes

      public com.google.protobuf.ByteString getDocStringBytes()
       A human-readable documentation for this model. Markdown is allowed.
       
      optional string doc_string = 6;
      Specified by:
      getDocStringBytes in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The bytes for docString.
    • hasGraph

      public boolean hasGraph()
       The parameterized graph that is evaluated to execute the model.
       
      optional .onnx.GraphProto graph = 7;
      Specified by:
      hasGraph in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      Whether the graph field is set.
    • getGraph

      public OnnxMl.GraphProto getGraph()
       The parameterized graph that is evaluated to execute the model.
       
      optional .onnx.GraphProto graph = 7;
      Specified by:
      getGraph in interface OnnxMl.ModelProtoOrBuilder
      Returns:
      The graph.
    • getGraphOrBuilder

      public OnnxMl.GraphProtoOrBuilder getGraphOrBuilder()
       The parameterized graph that is evaluated to execute the model.
       
      optional .onnx.GraphProto graph = 7;
      Specified by:
      getGraphOrBuilder in interface OnnxMl.ModelProtoOrBuilder
    • getMetadataPropsList

      public List<OnnxMl.StringStringEntryProto> getMetadataPropsList()
       Named metadata values; keys should be distinct.
       
      repeated .onnx.StringStringEntryProto metadata_props = 14;
      Specified by:
      getMetadataPropsList in interface OnnxMl.ModelProtoOrBuilder
    • getMetadataPropsOrBuilderList

      public List<? extends OnnxMl.StringStringEntryProtoOrBuilder> getMetadataPropsOrBuilderList()
       Named metadata values; keys should be distinct.
       
      repeated .onnx.StringStringEntryProto metadata_props = 14;
      Specified by:
      getMetadataPropsOrBuilderList in interface OnnxMl.ModelProtoOrBuilder
    • getMetadataPropsCount

      public int getMetadataPropsCount()
       Named metadata values; keys should be distinct.
       
      repeated .onnx.StringStringEntryProto metadata_props = 14;
      Specified by:
      getMetadataPropsCount in interface OnnxMl.ModelProtoOrBuilder
    • getMetadataProps

      public OnnxMl.StringStringEntryProto getMetadataProps(int index)
       Named metadata values; keys should be distinct.
       
      repeated .onnx.StringStringEntryProto metadata_props = 14;
      Specified by:
      getMetadataProps in interface OnnxMl.ModelProtoOrBuilder
    • getMetadataPropsOrBuilder

      public OnnxMl.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(int index)
       Named metadata values; keys should be distinct.
       
      repeated .onnx.StringStringEntryProto metadata_props = 14;
      Specified by:
      getMetadataPropsOrBuilder in interface OnnxMl.ModelProtoOrBuilder
    • getTrainingInfoList

      public List<OnnxMl.TrainingInfoProto> getTrainingInfoList()
       Training-specific information. Sequentially executing all stored
       `TrainingInfoProto.algorithm`s and assigning their outputs following
       the corresponding `TrainingInfoProto.update_binding`s is one training
       iteration. Similarly, to initialize the model
       (as if training hasn't happened), the user should sequentially execute
       all stored `TrainingInfoProto.initialization`s and assigns their outputs
       using `TrainingInfoProto.initialization_binding`s.
       If this field is empty, the training behavior of the model is undefined.
       
      repeated .onnx.TrainingInfoProto training_info = 20;
      Specified by:
      getTrainingInfoList in interface OnnxMl.ModelProtoOrBuilder
    • getTrainingInfoOrBuilderList

      public List<? extends OnnxMl.TrainingInfoProtoOrBuilder> getTrainingInfoOrBuilderList()
       Training-specific information. Sequentially executing all stored
       `TrainingInfoProto.algorithm`s and assigning their outputs following
       the corresponding `TrainingInfoProto.update_binding`s is one training
       iteration. Similarly, to initialize the model
       (as if training hasn't happened), the user should sequentially execute
       all stored `TrainingInfoProto.initialization`s and assigns their outputs
       using `TrainingInfoProto.initialization_binding`s.
       If this field is empty, the training behavior of the model is undefined.
       
      repeated .onnx.TrainingInfoProto training_info = 20;
      Specified by:
      getTrainingInfoOrBuilderList in interface OnnxMl.ModelProtoOrBuilder
    • getTrainingInfoCount

      public int getTrainingInfoCount()
       Training-specific information. Sequentially executing all stored
       `TrainingInfoProto.algorithm`s and assigning their outputs following
       the corresponding `TrainingInfoProto.update_binding`s is one training
       iteration. Similarly, to initialize the model
       (as if training hasn't happened), the user should sequentially execute
       all stored `TrainingInfoProto.initialization`s and assigns their outputs
       using `TrainingInfoProto.initialization_binding`s.
       If this field is empty, the training behavior of the model is undefined.
       
      repeated .onnx.TrainingInfoProto training_info = 20;
      Specified by:
      getTrainingInfoCount in interface OnnxMl.ModelProtoOrBuilder
    • getTrainingInfo

      public OnnxMl.TrainingInfoProto getTrainingInfo(int index)
       Training-specific information. Sequentially executing all stored
       `TrainingInfoProto.algorithm`s and assigning their outputs following
       the corresponding `TrainingInfoProto.update_binding`s is one training
       iteration. Similarly, to initialize the model
       (as if training hasn't happened), the user should sequentially execute
       all stored `TrainingInfoProto.initialization`s and assigns their outputs
       using `TrainingInfoProto.initialization_binding`s.
       If this field is empty, the training behavior of the model is undefined.
       
      repeated .onnx.TrainingInfoProto training_info = 20;
      Specified by:
      getTrainingInfo in interface OnnxMl.ModelProtoOrBuilder
    • getTrainingInfoOrBuilder

      public OnnxMl.TrainingInfoProtoOrBuilder getTrainingInfoOrBuilder(int index)
       Training-specific information. Sequentially executing all stored
       `TrainingInfoProto.algorithm`s and assigning their outputs following
       the corresponding `TrainingInfoProto.update_binding`s is one training
       iteration. Similarly, to initialize the model
       (as if training hasn't happened), the user should sequentially execute
       all stored `TrainingInfoProto.initialization`s and assigns their outputs
       using `TrainingInfoProto.initialization_binding`s.
       If this field is empty, the training behavior of the model is undefined.
       
      repeated .onnx.TrainingInfoProto training_info = 20;
      Specified by:
      getTrainingInfoOrBuilder in interface OnnxMl.ModelProtoOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OnnxMl.ModelProto parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OnnxMl.ModelProto parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OnnxMl.ModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OnnxMl.ModelProto.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OnnxMl.ModelProto.Builder newBuilder()
    • newBuilder

      public static OnnxMl.ModelProto.Builder newBuilder(OnnxMl.ModelProto prototype)
    • toBuilder

      public OnnxMl.ModelProto.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OnnxMl.ModelProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static OnnxMl.ModelProto getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OnnxMl.ModelProto> parser()
    • getParserForType

      public com.google.protobuf.Parser<OnnxMl.ModelProto> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public OnnxMl.ModelProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder