Class MetaGraphDef.MetaInfoDef.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable, MetaGraphDef.MetaInfoDefOrBuilder
    Enclosing class:
    MetaGraphDef.MetaInfoDef

    public static final class MetaGraphDef.MetaInfoDef.Builder
    extends com.google.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 org.platanios.tensorflow.proto.MetaGraphDef.MetaInfoDef
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.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<MetaGraphDef.MetaInfoDef.Builder>
      • getDefaultInstanceForType

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

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

        public MetaGraphDef.MetaInfoDef buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setField

        public MetaGraphDef.MetaInfoDef.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<MetaGraphDef.MetaInfoDef.Builder>
      • setRepeatedField

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

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

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

        public MetaGraphDef.MetaInfoDef.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws java.io.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<MetaGraphDef.MetaInfoDef.Builder>
        Throws:
        java.io.IOException
      • getMetaGraphVersion

        public java.lang.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 com.google.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​(java.lang.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​(com.google.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.google.Any any_info = 3;
        Specified by:
        hasAnyInfo in interface MetaGraphDef.MetaInfoDefOrBuilder
        Returns:
        Whether the anyInfo field is set.
      • getAnyInfo

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

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

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

        public MetaGraphDef.MetaInfoDef.Builder mergeAnyInfo​(Any value)
         A serialized protobuf. Can be the time this meta graph is created, or
         modified, or name of the model.
         
        .org.platanios.tensorflow.proto.google.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.
         
        .org.platanios.tensorflow.proto.google.Any any_info = 3;
      • getAnyInfoBuilder

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

        public com.google.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 java.lang.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 com.google.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,
                                                        java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(com.google.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 java.lang.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 com.google.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​(java.lang.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​(com.google.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 java.lang.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 com.google.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​(java.lang.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​(com.google.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.
      • getFunctionAliasesMap

        public java.util.Map<java.lang.String,​java.lang.String> getFunctionAliasesMap()
         FunctionDef name to aliases mapping.
         
        map<string, string> function_aliases = 8;
        Specified by:
        getFunctionAliasesMap in interface MetaGraphDef.MetaInfoDefOrBuilder
      • getFunctionAliasesOrDefault

        public java.lang.String getFunctionAliasesOrDefault​(java.lang.String key,
                                                            java.lang.String defaultValue)
         FunctionDef name to aliases mapping.
         
        map<string, string> function_aliases = 8;
        Specified by:
        getFunctionAliasesOrDefault in interface MetaGraphDef.MetaInfoDefOrBuilder
      • removeFunctionAliases

        public MetaGraphDef.MetaInfoDef.Builder removeFunctionAliases​(java.lang.String key)
         FunctionDef name to aliases mapping.
         
        map<string, string> function_aliases = 8;
      • getMutableFunctionAliases

        @Deprecated
        public java.util.Map<java.lang.String,​java.lang.String> getMutableFunctionAliases()
        Deprecated.
        Use alternate mutation accessors instead.
      • putFunctionAliases

        public MetaGraphDef.MetaInfoDef.Builder putFunctionAliases​(java.lang.String key,
                                                                   java.lang.String value)
         FunctionDef name to aliases mapping.
         
        map<string, string> function_aliases = 8;
      • putAllFunctionAliases

        public MetaGraphDef.MetaInfoDef.Builder putAllFunctionAliases​(java.util.Map<java.lang.String,​java.lang.String> values)
         FunctionDef name to aliases mapping.
         
        map<string, string> function_aliases = 8;
      • setUnknownFields

        public final MetaGraphDef.MetaInfoDef.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<MetaGraphDef.MetaInfoDef.Builder>
      • mergeUnknownFields

        public final MetaGraphDef.MetaInfoDef.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<MetaGraphDef.MetaInfoDef.Builder>