Class MetaGraphDef.MetaInfoDef.Builder

  • All Implemented Interfaces:
    Cloneable, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, MetaGraphDef.MetaInfoDefOrBuilder
    Enclosing class:
    MetaGraphDef.MetaInfoDef

    public static final class MetaGraphDef.MetaInfoDef.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
    implements MetaGraphDef.MetaInfoDefOrBuilder
     Meta information regarding the graph to be exported.  To be used by users
     of this protocol buffer to encode information regarding their meta graph.
     
    Protobuf type tensorflow.MetaGraphDef.MetaInfoDef
    • Method Detail

      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • clear

        public MetaGraphDef.MetaInfoDef.Builder clear()
        Specified by:
        clear in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clear in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clear in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • getDescriptorForType

        public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • getDefaultInstanceForType

        public MetaGraphDef.MetaInfoDef getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public MetaGraphDef.MetaInfoDef build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public MetaGraphDef.MetaInfoDef buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

        public MetaGraphDef.MetaInfoDef.Builder clone()
        Specified by:
        clone in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clone in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clone in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • clearField

        public MetaGraphDef.MetaInfoDef.Builder clearField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • clearOneof

        public MetaGraphDef.MetaInfoDef.Builder clearOneof​(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearOneof in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • setRepeatedField

        public MetaGraphDef.MetaInfoDef.Builder setRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • addRepeatedField

        public MetaGraphDef.MetaInfoDef.Builder addRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • mergeFrom

        public MetaGraphDef.MetaInfoDef.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                                          org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<MetaGraphDef.MetaInfoDef.Builder>
        Throws:
        IOException
      • getMetaGraphVersion

        public String getMetaGraphVersion()
         User specified Version string. Can be the name of the model and revision,
         steps this model has been trained to, etc.
         
        string meta_graph_version = 1;
        Specified by:
        getMetaGraphVersion in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The metaGraphVersion.
      • getMetaGraphVersionBytes

        public org.nd4j.shade.protobuf.ByteString getMetaGraphVersionBytes()
         User specified Version string. Can be the name of the model and revision,
         steps this model has been trained to, etc.
         
        string meta_graph_version = 1;
        Specified by:
        getMetaGraphVersionBytes in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The bytes for metaGraphVersion.
      • setMetaGraphVersion

        public MetaGraphDef.MetaInfoDef.Builder setMetaGraphVersion​(String value)
         User specified Version string. Can be the name of the model and revision,
         steps this model has been trained to, etc.
         
        string meta_graph_version = 1;
        Parameters:
        value - The metaGraphVersion to set.
        Returns:
        This builder for chaining.
      • clearMetaGraphVersion

        public MetaGraphDef.MetaInfoDef.Builder clearMetaGraphVersion()
         User specified Version string. Can be the name of the model and revision,
         steps this model has been trained to, etc.
         
        string meta_graph_version = 1;
        Returns:
        This builder for chaining.
      • setMetaGraphVersionBytes

        public MetaGraphDef.MetaInfoDef.Builder setMetaGraphVersionBytes​(org.nd4j.shade.protobuf.ByteString value)
         User specified Version string. Can be the name of the model and revision,
         steps this model has been trained to, etc.
         
        string meta_graph_version = 1;
        Parameters:
        value - The bytes for metaGraphVersion to set.
        Returns:
        This builder for chaining.
      • hasStrippedOpList

        public boolean hasStrippedOpList()
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
        Specified by:
        hasStrippedOpList in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        Whether the strippedOpList field is set.
      • getStrippedOpList

        public OpList getStrippedOpList()
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
        Specified by:
        getStrippedOpList in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The strippedOpList.
      • setStrippedOpList

        public MetaGraphDef.MetaInfoDef.Builder setStrippedOpList​(OpList value)
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
      • setStrippedOpList

        public MetaGraphDef.MetaInfoDef.Builder setStrippedOpList​(OpList.Builder builderForValue)
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
      • mergeStrippedOpList

        public MetaGraphDef.MetaInfoDef.Builder mergeStrippedOpList​(OpList value)
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
      • clearStrippedOpList

        public MetaGraphDef.MetaInfoDef.Builder clearStrippedOpList()
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
      • getStrippedOpListBuilder

        public OpList.Builder getStrippedOpListBuilder()
         A copy of the OpDefs used by the producer of this graph_def.
         Descriptions and Ops not used in graph_def are stripped out.
         
        .tensorflow.OpList stripped_op_list = 2;
      • hasAnyInfo

        public boolean hasAnyInfo()
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
        Specified by:
        hasAnyInfo in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        Whether the anyInfo field is set.
      • getAnyInfo

        public org.nd4j.shade.protobuf.Any getAnyInfo()
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
        Specified by:
        getAnyInfo in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The anyInfo.
      • setAnyInfo

        public MetaGraphDef.MetaInfoDef.Builder setAnyInfo​(org.nd4j.shade.protobuf.Any value)
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
      • setAnyInfo

        public MetaGraphDef.MetaInfoDef.Builder setAnyInfo​(org.nd4j.shade.protobuf.Any.Builder builderForValue)
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
      • mergeAnyInfo

        public MetaGraphDef.MetaInfoDef.Builder mergeAnyInfo​(org.nd4j.shade.protobuf.Any value)
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
      • clearAnyInfo

        public MetaGraphDef.MetaInfoDef.Builder clearAnyInfo()
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
      • getAnyInfoBuilder

        public org.nd4j.shade.protobuf.Any.Builder getAnyInfoBuilder()
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
      • getAnyInfoOrBuilder

        public org.nd4j.shade.protobuf.AnyOrBuilder getAnyInfoOrBuilder()
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .google.protobuf.Any any_info = 3;
        Specified by:
        getAnyInfoOrBuilder in interface MetaGraphDef.MetaInfoDefOrBuilder
      • getTagsList

        public org.nd4j.shade.protobuf.ProtocolStringList getTagsList()
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Specified by:
        getTagsList in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        A list containing the tags.
      • getTagsCount

        public int getTagsCount()
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Specified by:
        getTagsCount in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The count of tags.
      • getTags

        public String getTags​(int index)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Specified by:
        getTags in interface MetaGraphDef.MetaInfoDefOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The tags at the given index.
      • getTagsBytes

        public org.nd4j.shade.protobuf.ByteString getTagsBytes​(int index)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Specified by:
        getTagsBytes in interface MetaGraphDef.MetaInfoDefOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the tags at the given index.
      • setTags

        public MetaGraphDef.MetaInfoDef.Builder setTags​(int index,
                                                        String value)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Parameters:
        index - The index to set the value at.
        value - The tags to set.
        Returns:
        This builder for chaining.
      • addTags

        public MetaGraphDef.MetaInfoDef.Builder addTags​(String value)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Parameters:
        value - The tags to add.
        Returns:
        This builder for chaining.
      • addAllTags

        public MetaGraphDef.MetaInfoDef.Builder addAllTags​(Iterable<String> values)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Parameters:
        values - The tags to add.
        Returns:
        This builder for chaining.
      • clearTags

        public MetaGraphDef.MetaInfoDef.Builder clearTags()
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Returns:
        This builder for chaining.
      • addTagsBytes

        public MetaGraphDef.MetaInfoDef.Builder addTagsBytes​(org.nd4j.shade.protobuf.ByteString value)
         User supplied tag(s) on the meta_graph and included graph_def.
         MetaGraphDefs should be tagged with their capabilities or use-cases.
         Examples: "train", "serve", "gpu", "tpu", etc.
         These tags enable loaders to access the MetaGraph(s) appropriate for a
         specific use-case or runtime environment.
         
        repeated string tags = 4;
        Parameters:
        value - The bytes of the tags to add.
        Returns:
        This builder for chaining.
      • getTensorflowVersion

        public String getTensorflowVersion()
         The __version__ string of the tensorflow build used to write this graph.
         This will be populated by the framework, which will overwrite any user
         supplied value.
         
        string tensorflow_version = 5;
        Specified by:
        getTensorflowVersion in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The tensorflowVersion.
      • getTensorflowVersionBytes

        public org.nd4j.shade.protobuf.ByteString getTensorflowVersionBytes()
         The __version__ string of the tensorflow build used to write this graph.
         This will be populated by the framework, which will overwrite any user
         supplied value.
         
        string tensorflow_version = 5;
        Specified by:
        getTensorflowVersionBytes in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The bytes for tensorflowVersion.
      • setTensorflowVersion

        public MetaGraphDef.MetaInfoDef.Builder setTensorflowVersion​(String value)
         The __version__ string of the tensorflow build used to write this graph.
         This will be populated by the framework, which will overwrite any user
         supplied value.
         
        string tensorflow_version = 5;
        Parameters:
        value - The tensorflowVersion to set.
        Returns:
        This builder for chaining.
      • clearTensorflowVersion

        public MetaGraphDef.MetaInfoDef.Builder clearTensorflowVersion()
         The __version__ string of the tensorflow build used to write this graph.
         This will be populated by the framework, which will overwrite any user
         supplied value.
         
        string tensorflow_version = 5;
        Returns:
        This builder for chaining.
      • setTensorflowVersionBytes

        public MetaGraphDef.MetaInfoDef.Builder setTensorflowVersionBytes​(org.nd4j.shade.protobuf.ByteString value)
         The __version__ string of the tensorflow build used to write this graph.
         This will be populated by the framework, which will overwrite any user
         supplied value.
         
        string tensorflow_version = 5;
        Parameters:
        value - The bytes for tensorflowVersion to set.
        Returns:
        This builder for chaining.
      • getTensorflowGitVersion

        public String getTensorflowGitVersion()
         The __git_version__ string of the tensorflow build used to write this
         graph. This will be populated by the framework, which will overwrite any
         user supplied value.
         
        string tensorflow_git_version = 6;
        Specified by:
        getTensorflowGitVersion in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The tensorflowGitVersion.
      • getTensorflowGitVersionBytes

        public org.nd4j.shade.protobuf.ByteString getTensorflowGitVersionBytes()
         The __git_version__ string of the tensorflow build used to write this
         graph. This will be populated by the framework, which will overwrite any
         user supplied value.
         
        string tensorflow_git_version = 6;
        Specified by:
        getTensorflowGitVersionBytes in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The bytes for tensorflowGitVersion.
      • setTensorflowGitVersion

        public MetaGraphDef.MetaInfoDef.Builder setTensorflowGitVersion​(String value)
         The __git_version__ string of the tensorflow build used to write this
         graph. This will be populated by the framework, which will overwrite any
         user supplied value.
         
        string tensorflow_git_version = 6;
        Parameters:
        value - The tensorflowGitVersion to set.
        Returns:
        This builder for chaining.
      • clearTensorflowGitVersion

        public MetaGraphDef.MetaInfoDef.Builder clearTensorflowGitVersion()
         The __git_version__ string of the tensorflow build used to write this
         graph. This will be populated by the framework, which will overwrite any
         user supplied value.
         
        string tensorflow_git_version = 6;
        Returns:
        This builder for chaining.
      • setTensorflowGitVersionBytes

        public MetaGraphDef.MetaInfoDef.Builder setTensorflowGitVersionBytes​(org.nd4j.shade.protobuf.ByteString value)
         The __git_version__ string of the tensorflow build used to write this
         graph. This will be populated by the framework, which will overwrite any
         user supplied value.
         
        string tensorflow_git_version = 6;
        Parameters:
        value - The bytes for tensorflowGitVersion to set.
        Returns:
        This builder for chaining.
      • getStrippedDefaultAttrs

        public boolean getStrippedDefaultAttrs()
         A flag to denote whether default-valued attrs have been stripped from
         the nodes in this graph_def.
         
        bool stripped_default_attrs = 7;
        Specified by:
        getStrippedDefaultAttrs in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        The strippedDefaultAttrs.
      • setStrippedDefaultAttrs

        public MetaGraphDef.MetaInfoDef.Builder setStrippedDefaultAttrs​(boolean value)
         A flag to denote whether default-valued attrs have been stripped from
         the nodes in this graph_def.
         
        bool stripped_default_attrs = 7;
        Parameters:
        value - The strippedDefaultAttrs to set.
        Returns:
        This builder for chaining.
      • clearStrippedDefaultAttrs

        public MetaGraphDef.MetaInfoDef.Builder clearStrippedDefaultAttrs()
         A flag to denote whether default-valued attrs have been stripped from
         the nodes in this graph_def.
         
        bool stripped_default_attrs = 7;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final MetaGraphDef.MetaInfoDef.Builder setUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • mergeUnknownFields

        public final MetaGraphDef.MetaInfoDef.Builder mergeUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>