Package ai.onnx.proto

Class OnnxMl.GraphProto

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
ai.onnx.proto.OnnxMl.GraphProto
All Implemented Interfaces:
OnnxMl.GraphProtoOrBuilder, 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.GraphProto extends com.google.protobuf.GeneratedMessageV3 implements OnnxMl.GraphProtoOrBuilder
 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.
 
Protobuf type onnx.GraphProto
See Also:
  • Field Details

  • 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
    • getNodeList

      public List<OnnxMl.NodeProto> getNodeList()
       The nodes in the graph, sorted topologically.
       
      repeated .onnx.NodeProto node = 1;
      Specified by:
      getNodeList in interface OnnxMl.GraphProtoOrBuilder
    • getNodeOrBuilderList

      public List<? extends OnnxMl.NodeProtoOrBuilder> getNodeOrBuilderList()
       The nodes in the graph, sorted topologically.
       
      repeated .onnx.NodeProto node = 1;
      Specified by:
      getNodeOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getNodeCount

      public int getNodeCount()
       The nodes in the graph, sorted topologically.
       
      repeated .onnx.NodeProto node = 1;
      Specified by:
      getNodeCount in interface OnnxMl.GraphProtoOrBuilder
    • getNode

      public OnnxMl.NodeProto getNode(int index)
       The nodes in the graph, sorted topologically.
       
      repeated .onnx.NodeProto node = 1;
      Specified by:
      getNode in interface OnnxMl.GraphProtoOrBuilder
    • getNodeOrBuilder

      public OnnxMl.NodeProtoOrBuilder getNodeOrBuilder(int index)
       The nodes in the graph, sorted topologically.
       
      repeated .onnx.NodeProto node = 1;
      Specified by:
      getNodeOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • hasName

      public boolean hasName()
       The name of the graph.
       
      optional string name = 2;
      Specified by:
      hasName in interface OnnxMl.GraphProtoOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The name of the graph.
       
      optional string name = 2;
      Specified by:
      getName in interface OnnxMl.GraphProtoOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the graph.
       
      optional string name = 2;
      Specified by:
      getNameBytes in interface OnnxMl.GraphProtoOrBuilder
      Returns:
      The bytes for name.
    • getInitializerList

      public List<OnnxMl.TensorProto> getInitializerList()
       A list of named tensor values, used to specify constant inputs of the graph.
       Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
       The name MUST be unique across both initializer and sparse_initializer,
       but the name MAY also appear in the input list.
       
      repeated .onnx.TensorProto initializer = 5;
      Specified by:
      getInitializerList in interface OnnxMl.GraphProtoOrBuilder
    • getInitializerOrBuilderList

      public List<? extends OnnxMl.TensorProtoOrBuilder> getInitializerOrBuilderList()
       A list of named tensor values, used to specify constant inputs of the graph.
       Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
       The name MUST be unique across both initializer and sparse_initializer,
       but the name MAY also appear in the input list.
       
      repeated .onnx.TensorProto initializer = 5;
      Specified by:
      getInitializerOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getInitializerCount

      public int getInitializerCount()
       A list of named tensor values, used to specify constant inputs of the graph.
       Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
       The name MUST be unique across both initializer and sparse_initializer,
       but the name MAY also appear in the input list.
       
      repeated .onnx.TensorProto initializer = 5;
      Specified by:
      getInitializerCount in interface OnnxMl.GraphProtoOrBuilder
    • getInitializer

      public OnnxMl.TensorProto getInitializer(int index)
       A list of named tensor values, used to specify constant inputs of the graph.
       Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
       The name MUST be unique across both initializer and sparse_initializer,
       but the name MAY also appear in the input list.
       
      repeated .onnx.TensorProto initializer = 5;
      Specified by:
      getInitializer in interface OnnxMl.GraphProtoOrBuilder
    • getInitializerOrBuilder

      public OnnxMl.TensorProtoOrBuilder getInitializerOrBuilder(int index)
       A list of named tensor values, used to specify constant inputs of the graph.
       Each initializer (both TensorProto as well SparseTensorProto) MUST have a name.
       The name MUST be unique across both initializer and sparse_initializer,
       but the name MAY also appear in the input list.
       
      repeated .onnx.TensorProto initializer = 5;
      Specified by:
      getInitializerOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • getSparseInitializerList

      public List<OnnxMl.SparseTensorProto> getSparseInitializerList()
       Initializers (see above) stored in sparse format.
       
      repeated .onnx.SparseTensorProto sparse_initializer = 15;
      Specified by:
      getSparseInitializerList in interface OnnxMl.GraphProtoOrBuilder
    • getSparseInitializerOrBuilderList

      public List<? extends OnnxMl.SparseTensorProtoOrBuilder> getSparseInitializerOrBuilderList()
       Initializers (see above) stored in sparse format.
       
      repeated .onnx.SparseTensorProto sparse_initializer = 15;
      Specified by:
      getSparseInitializerOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getSparseInitializerCount

      public int getSparseInitializerCount()
       Initializers (see above) stored in sparse format.
       
      repeated .onnx.SparseTensorProto sparse_initializer = 15;
      Specified by:
      getSparseInitializerCount in interface OnnxMl.GraphProtoOrBuilder
    • getSparseInitializer

      public OnnxMl.SparseTensorProto getSparseInitializer(int index)
       Initializers (see above) stored in sparse format.
       
      repeated .onnx.SparseTensorProto sparse_initializer = 15;
      Specified by:
      getSparseInitializer in interface OnnxMl.GraphProtoOrBuilder
    • getSparseInitializerOrBuilder

      public OnnxMl.SparseTensorProtoOrBuilder getSparseInitializerOrBuilder(int index)
       Initializers (see above) stored in sparse format.
       
      repeated .onnx.SparseTensorProto sparse_initializer = 15;
      Specified by:
      getSparseInitializerOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • hasDocString

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

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

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

      public List<OnnxMl.ValueInfoProto> getInputList()
       The inputs and outputs of the graph.
       
      repeated .onnx.ValueInfoProto input = 11;
      Specified by:
      getInputList in interface OnnxMl.GraphProtoOrBuilder
    • getInputOrBuilderList

      public List<? extends OnnxMl.ValueInfoProtoOrBuilder> getInputOrBuilderList()
       The inputs and outputs of the graph.
       
      repeated .onnx.ValueInfoProto input = 11;
      Specified by:
      getInputOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getInputCount

      public int getInputCount()
       The inputs and outputs of the graph.
       
      repeated .onnx.ValueInfoProto input = 11;
      Specified by:
      getInputCount in interface OnnxMl.GraphProtoOrBuilder
    • getInput

      public OnnxMl.ValueInfoProto getInput(int index)
       The inputs and outputs of the graph.
       
      repeated .onnx.ValueInfoProto input = 11;
      Specified by:
      getInput in interface OnnxMl.GraphProtoOrBuilder
    • getInputOrBuilder

      public OnnxMl.ValueInfoProtoOrBuilder getInputOrBuilder(int index)
       The inputs and outputs of the graph.
       
      repeated .onnx.ValueInfoProto input = 11;
      Specified by:
      getInputOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • getOutputList

      public List<OnnxMl.ValueInfoProto> getOutputList()
      repeated .onnx.ValueInfoProto output = 12;
      Specified by:
      getOutputList in interface OnnxMl.GraphProtoOrBuilder
    • getOutputOrBuilderList

      public List<? extends OnnxMl.ValueInfoProtoOrBuilder> getOutputOrBuilderList()
      repeated .onnx.ValueInfoProto output = 12;
      Specified by:
      getOutputOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getOutputCount

      public int getOutputCount()
      repeated .onnx.ValueInfoProto output = 12;
      Specified by:
      getOutputCount in interface OnnxMl.GraphProtoOrBuilder
    • getOutput

      public OnnxMl.ValueInfoProto getOutput(int index)
      repeated .onnx.ValueInfoProto output = 12;
      Specified by:
      getOutput in interface OnnxMl.GraphProtoOrBuilder
    • getOutputOrBuilder

      public OnnxMl.ValueInfoProtoOrBuilder getOutputOrBuilder(int index)
      repeated .onnx.ValueInfoProto output = 12;
      Specified by:
      getOutputOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • getValueInfoList

      public List<OnnxMl.ValueInfoProto> getValueInfoList()
       Information for the values in the graph. The ValueInfoProto.name's
       must be distinct. It is optional for a value to appear in value_info list.
       
      repeated .onnx.ValueInfoProto value_info = 13;
      Specified by:
      getValueInfoList in interface OnnxMl.GraphProtoOrBuilder
    • getValueInfoOrBuilderList

      public List<? extends OnnxMl.ValueInfoProtoOrBuilder> getValueInfoOrBuilderList()
       Information for the values in the graph. The ValueInfoProto.name's
       must be distinct. It is optional for a value to appear in value_info list.
       
      repeated .onnx.ValueInfoProto value_info = 13;
      Specified by:
      getValueInfoOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getValueInfoCount

      public int getValueInfoCount()
       Information for the values in the graph. The ValueInfoProto.name's
       must be distinct. It is optional for a value to appear in value_info list.
       
      repeated .onnx.ValueInfoProto value_info = 13;
      Specified by:
      getValueInfoCount in interface OnnxMl.GraphProtoOrBuilder
    • getValueInfo

      public OnnxMl.ValueInfoProto getValueInfo(int index)
       Information for the values in the graph. The ValueInfoProto.name's
       must be distinct. It is optional for a value to appear in value_info list.
       
      repeated .onnx.ValueInfoProto value_info = 13;
      Specified by:
      getValueInfo in interface OnnxMl.GraphProtoOrBuilder
    • getValueInfoOrBuilder

      public OnnxMl.ValueInfoProtoOrBuilder getValueInfoOrBuilder(int index)
       Information for the values in the graph. The ValueInfoProto.name's
       must be distinct. It is optional for a value to appear in value_info list.
       
      repeated .onnx.ValueInfoProto value_info = 13;
      Specified by:
      getValueInfoOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • getQuantizationAnnotationList

      public List<OnnxMl.TensorAnnotation> getQuantizationAnnotationList()
       This field carries information to indicate the mapping among a tensor and its
       quantization parameter tensors. For example:
       For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
       which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
       
      repeated .onnx.TensorAnnotation quantization_annotation = 14;
      Specified by:
      getQuantizationAnnotationList in interface OnnxMl.GraphProtoOrBuilder
    • getQuantizationAnnotationOrBuilderList

      public List<? extends OnnxMl.TensorAnnotationOrBuilder> getQuantizationAnnotationOrBuilderList()
       This field carries information to indicate the mapping among a tensor and its
       quantization parameter tensors. For example:
       For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
       which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
       
      repeated .onnx.TensorAnnotation quantization_annotation = 14;
      Specified by:
      getQuantizationAnnotationOrBuilderList in interface OnnxMl.GraphProtoOrBuilder
    • getQuantizationAnnotationCount

      public int getQuantizationAnnotationCount()
       This field carries information to indicate the mapping among a tensor and its
       quantization parameter tensors. For example:
       For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
       which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
       
      repeated .onnx.TensorAnnotation quantization_annotation = 14;
      Specified by:
      getQuantizationAnnotationCount in interface OnnxMl.GraphProtoOrBuilder
    • getQuantizationAnnotation

      public OnnxMl.TensorAnnotation getQuantizationAnnotation(int index)
       This field carries information to indicate the mapping among a tensor and its
       quantization parameter tensors. For example:
       For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
       which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
       
      repeated .onnx.TensorAnnotation quantization_annotation = 14;
      Specified by:
      getQuantizationAnnotation in interface OnnxMl.GraphProtoOrBuilder
    • getQuantizationAnnotationOrBuilder

      public OnnxMl.TensorAnnotationOrBuilder getQuantizationAnnotationOrBuilder(int index)
       This field carries information to indicate the mapping among a tensor and its
       quantization parameter tensors. For example:
       For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated,
       which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model.
       
      repeated .onnx.TensorAnnotation quantization_annotation = 14;
      Specified by:
      getQuantizationAnnotationOrBuilder in interface OnnxMl.GraphProtoOrBuilder
    • 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.GraphProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static OnnxMl.GraphProto 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.GraphProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static OnnxMl.GraphProto getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<OnnxMl.GraphProto> 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.GraphProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder