Package onnx

Class Onnx.GraphProto.Builder

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

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

      • 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.Builder<Onnx.GraphProto.Builder>
      • clear

        public Onnx.GraphProto.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • getDefaultInstanceForType

        public Onnx.GraphProto getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

        public Onnx.GraphProto.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • setField

        public Onnx.GraphProto.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • clearField

        public Onnx.GraphProto.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • clearOneof

        public Onnx.GraphProto.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • setRepeatedField

        public Onnx.GraphProto.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • addRepeatedField

        public Onnx.GraphProto.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • mergeFrom

        public Onnx.GraphProto.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Onnx.GraphProto.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • mergeFrom

        public Onnx.GraphProto.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Onnx.GraphProto.Builder>
        Throws:
        IOException
      • getNodeCount

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

        public Onnx.GraphProto.Builder clearNode()
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • removeNode

        public Onnx.GraphProto.Builder removeNode​(int index)
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • getNodeBuilder

        public Onnx.NodeProto.Builder getNodeBuilder​(int index)
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • addNodeBuilder

        public Onnx.NodeProto.Builder addNodeBuilder()
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • addNodeBuilder

        public Onnx.NodeProto.Builder addNodeBuilder​(int index)
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • getNodeBuilderList

        public List<Onnx.NodeProto.Builder> getNodeBuilderList()
         The nodes in the graph, sorted topologically.
         
        repeated .onnx.NodeProto node = 1;
      • 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.
      • setName

        public Onnx.GraphProto.Builder setName​(String value)
         The name of the graph.
         
        optional string name = 2;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Onnx.GraphProto.Builder clearName()
         The name of the graph.
         
        optional string name = 2;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Onnx.GraphProto.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The name of the graph.
         
        optional string name = 2;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • 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
      • 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
      • setInitializer

        public Onnx.GraphProto.Builder setInitializer​(int index,
                                                      Onnx.TensorProto value)
         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;
      • setInitializer

        public Onnx.GraphProto.Builder setInitializer​(int index,
                                                      Onnx.TensorProto.Builder builderForValue)
         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;
      • addInitializer

        public Onnx.GraphProto.Builder addInitializer​(Onnx.TensorProto value)
         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;
      • addInitializer

        public Onnx.GraphProto.Builder addInitializer​(int index,
                                                      Onnx.TensorProto value)
         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;
      • addInitializer

        public Onnx.GraphProto.Builder addInitializer​(Onnx.TensorProto.Builder builderForValue)
         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;
      • addInitializer

        public Onnx.GraphProto.Builder addInitializer​(int index,
                                                      Onnx.TensorProto.Builder builderForValue)
         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;
      • addAllInitializer

        public Onnx.GraphProto.Builder addAllInitializer​(Iterable<? extends Onnx.TensorProto> values)
         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;
      • clearInitializer

        public Onnx.GraphProto.Builder clearInitializer()
         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;
      • removeInitializer

        public Onnx.GraphProto.Builder removeInitializer​(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;
      • getInitializerBuilder

        public Onnx.TensorProto.Builder getInitializerBuilder​(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;
      • 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
      • 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
      • addInitializerBuilder

        public Onnx.TensorProto.Builder addInitializerBuilder()
         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;
      • addInitializerBuilder

        public Onnx.TensorProto.Builder addInitializerBuilder​(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;
      • getInitializerBuilderList

        public List<Onnx.TensorProto.Builder> getInitializerBuilderList()
         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;
      • 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.
      • setDocString

        public Onnx.GraphProto.Builder setDocString​(String value)
         A human-readable documentation for this graph. Markdown is allowed.
         
        optional string doc_string = 10;
        Parameters:
        value - The docString to set.
        Returns:
        This builder for chaining.
      • clearDocString

        public Onnx.GraphProto.Builder clearDocString()
         A human-readable documentation for this graph. Markdown is allowed.
         
        optional string doc_string = 10;
        Returns:
        This builder for chaining.
      • setDocStringBytes

        public Onnx.GraphProto.Builder setDocStringBytes​(com.google.protobuf.ByteString value)
         A human-readable documentation for this graph. Markdown is allowed.
         
        optional string doc_string = 10;
        Parameters:
        value - The bytes for docString to set.
        Returns:
        This builder for chaining.
      • getInputCount

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

        public Onnx.GraphProto.Builder clearInput()
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • removeInput

        public Onnx.GraphProto.Builder removeInput​(int index)
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • getInputBuilder

        public Onnx.ValueInfoProto.Builder getInputBuilder​(int index)
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • addInputBuilder

        public Onnx.ValueInfoProto.Builder addInputBuilder()
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • addInputBuilder

        public Onnx.ValueInfoProto.Builder addInputBuilder​(int index)
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • getInputBuilderList

        public List<Onnx.ValueInfoProto.Builder> getInputBuilderList()
         The inputs and outputs of the graph.
         
        repeated .onnx.ValueInfoProto input = 11;
      • removeOutput

        public Onnx.GraphProto.Builder removeOutput​(int index)
        repeated .onnx.ValueInfoProto output = 12;
      • 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
      • setValueInfo

        public Onnx.GraphProto.Builder setValueInfo​(int index,
                                                    Onnx.ValueInfoProto value)
         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;
      • setValueInfo

        public Onnx.GraphProto.Builder setValueInfo​(int index,
                                                    Onnx.ValueInfoProto.Builder builderForValue)
         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;
      • addValueInfo

        public Onnx.GraphProto.Builder addValueInfo​(Onnx.ValueInfoProto value)
         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;
      • addValueInfo

        public Onnx.GraphProto.Builder addValueInfo​(int index,
                                                    Onnx.ValueInfoProto value)
         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;
      • addValueInfo

        public Onnx.GraphProto.Builder addValueInfo​(Onnx.ValueInfoProto.Builder builderForValue)
         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;
      • addValueInfo

        public Onnx.GraphProto.Builder addValueInfo​(int index,
                                                    Onnx.ValueInfoProto.Builder builderForValue)
         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;
      • addAllValueInfo

        public Onnx.GraphProto.Builder addAllValueInfo​(Iterable<? extends Onnx.ValueInfoProto> values)
         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;
      • clearValueInfo

        public Onnx.GraphProto.Builder clearValueInfo()
         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;
      • removeValueInfo

        public Onnx.GraphProto.Builder removeValueInfo​(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;
      • getValueInfoBuilder

        public Onnx.ValueInfoProto.Builder getValueInfoBuilder​(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;
      • addValueInfoBuilder

        public Onnx.ValueInfoProto.Builder addValueInfoBuilder()
         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;
      • addValueInfoBuilder

        public Onnx.ValueInfoProto.Builder addValueInfoBuilder​(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;
      • getValueInfoBuilderList

        public List<Onnx.ValueInfoProto.Builder> getValueInfoBuilderList()
         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;
      • setUnknownFields

        public final Onnx.GraphProto.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>
      • mergeUnknownFields

        public final Onnx.GraphProto.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.GraphProto.Builder>