Package onnx

Class Onnx.GraphProto

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, Onnx.GraphProtoOrBuilder
    Enclosing class:
    Onnx

    public static final class Onnx.GraphProto
    extends com.google.protobuf.GeneratedMessageV3
    implements Onnx.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:
    Serialized Form
    • Method Detail

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

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

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

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

        public List<Onnx.TensorProto> getInitializerList()
         A list of named tensor values, used to specify constant inputs of the graph.
         Each TensorProto entry must have a distinct name (within the list) that
         also appears in the input list.
         
        repeated .onnx.TensorProto initializer = 5;
        Specified by:
        getInitializerList in interface Onnx.GraphProtoOrBuilder
      • getInitializerOrBuilderList

        public List<? extends Onnx.TensorProtoOrBuilder> getInitializerOrBuilderList()
         A list of named tensor values, used to specify constant inputs of the graph.
         Each TensorProto entry must have a distinct name (within the list) that
         also appears in the input list.
         
        repeated .onnx.TensorProto initializer = 5;
        Specified by:
        getInitializerOrBuilderList in interface Onnx.GraphProtoOrBuilder
      • getInitializerCount

        public int getInitializerCount()
         A list of named tensor values, used to specify constant inputs of the graph.
         Each TensorProto entry must have a distinct name (within the list) that
         also appears in the input list.
         
        repeated .onnx.TensorProto initializer = 5;
        Specified by:
        getInitializerCount in interface Onnx.GraphProtoOrBuilder
      • getInitializer

        public Onnx.TensorProto getInitializer​(int index)
         A list of named tensor values, used to specify constant inputs of the graph.
         Each TensorProto entry must have a distinct name (within the list) that
         also appears in the input list.
         
        repeated .onnx.TensorProto initializer = 5;
        Specified by:
        getInitializer in interface Onnx.GraphProtoOrBuilder
      • getInitializerOrBuilder

        public Onnx.TensorProtoOrBuilder getInitializerOrBuilder​(int index)
         A list of named tensor values, used to specify constant inputs of the graph.
         Each TensorProto entry must have a distinct name (within the list) that
         also appears in the input list.
         
        repeated .onnx.TensorProto initializer = 5;
        Specified by:
        getInitializerOrBuilder in interface Onnx.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 Onnx.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 Onnx.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 Onnx.GraphProtoOrBuilder
        Returns:
        The bytes for docString.
      • getInputCount

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

        public List<Onnx.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 Onnx.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 Onnx.GraphProtoOrBuilder
      • getValueInfo

        public Onnx.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 Onnx.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 Onnx.GraphProto parseFrom​(ByteBuffer data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

        protected Onnx.GraphProto.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • parser

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

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