Class FunctionDef.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, FunctionDefOrBuilder
    Enclosing class:
    FunctionDef

    public static final class FunctionDef.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<FunctionDef.Builder>
    implements FunctionDefOrBuilder
     A function can be instantiated when the runtime can bind every attr
     with a value. When a GraphDef has a call to a function, it must
     have binding for every attr defined in the signature.
     TODO(zhifengc):
       * device spec, etc.
     
    Protobuf type tensorflow.FunctionDef
    • Method Detail

      • getDescriptor

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

        protected org.nd4j.shade.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<FunctionDef.Builder>
      • internalGetMutableMapField

        protected org.nd4j.shade.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<FunctionDef.Builder>
      • internalGetFieldAccessorTable

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

        public FunctionDef.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<FunctionDef.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<FunctionDef.Builder>
      • getDefaultInstanceForType

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

        public FunctionDef 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 FunctionDef 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 FunctionDef.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<FunctionDef.Builder>
      • setField

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

        public FunctionDef.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<FunctionDef.Builder>
      • clearOneof

        public FunctionDef.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<FunctionDef.Builder>
      • setRepeatedField

        public FunctionDef.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<FunctionDef.Builder>
      • addRepeatedField

        public FunctionDef.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<FunctionDef.Builder>
      • mergeFrom

        public FunctionDef.Builder mergeFrom​(org.nd4j.shade.protobuf.Message other)
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<FunctionDef.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<FunctionDef.Builder>
      • mergeFrom

        public FunctionDef.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<FunctionDef.Builder>
        Throws:
        IOException
      • hasSignature

        public boolean hasSignature()
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
        Specified by:
        hasSignature in interface FunctionDefOrBuilder
        Returns:
        Whether the signature field is set.
      • getSignature

        public OpDef getSignature()
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
        Specified by:
        getSignature in interface FunctionDefOrBuilder
        Returns:
        The signature.
      • setSignature

        public FunctionDef.Builder setSignature​(OpDef value)
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
      • setSignature

        public FunctionDef.Builder setSignature​(OpDef.Builder builderForValue)
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
      • mergeSignature

        public FunctionDef.Builder mergeSignature​(OpDef value)
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
      • clearSignature

        public FunctionDef.Builder clearSignature()
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
      • getSignatureBuilder

        public OpDef.Builder getSignatureBuilder()
         The definition of the function's name, arguments, return values,
         attrs etc.
         
        .tensorflow.OpDef signature = 1;
      • containsAttr

        public boolean containsAttr​(String key)
         Attributes specific to this function definition.
         
        map<string, .tensorflow.AttrValue> attr = 5;
        Specified by:
        containsAttr in interface FunctionDefOrBuilder
      • removeAttr

        public FunctionDef.Builder removeAttr​(String key)
         Attributes specific to this function definition.
         
        map<string, .tensorflow.AttrValue> attr = 5;
      • putAttr

        public FunctionDef.Builder putAttr​(String key,
                                           AttrValue value)
         Attributes specific to this function definition.
         
        map<string, .tensorflow.AttrValue> attr = 5;
      • getNodeDefList

        public List<NodeDef> getNodeDefList()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
        Specified by:
        getNodeDefList in interface FunctionDefOrBuilder
      • getNodeDefCount

        public int getNodeDefCount()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
        Specified by:
        getNodeDefCount in interface FunctionDefOrBuilder
      • getNodeDef

        public NodeDef getNodeDef​(int index)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
        Specified by:
        getNodeDef in interface FunctionDefOrBuilder
      • setNodeDef

        public FunctionDef.Builder setNodeDef​(int index,
                                              NodeDef value)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • setNodeDef

        public FunctionDef.Builder setNodeDef​(int index,
                                              NodeDef.Builder builderForValue)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addNodeDef

        public FunctionDef.Builder addNodeDef​(NodeDef value)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addNodeDef

        public FunctionDef.Builder addNodeDef​(int index,
                                              NodeDef value)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addNodeDef

        public FunctionDef.Builder addNodeDef​(NodeDef.Builder builderForValue)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addNodeDef

        public FunctionDef.Builder addNodeDef​(int index,
                                              NodeDef.Builder builderForValue)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addAllNodeDef

        public FunctionDef.Builder addAllNodeDef​(Iterable<? extends NodeDef> values)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • clearNodeDef

        public FunctionDef.Builder clearNodeDef()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • removeNodeDef

        public FunctionDef.Builder removeNodeDef​(int index)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • getNodeDefBuilder

        public NodeDef.Builder getNodeDefBuilder​(int index)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • getNodeDefOrBuilder

        public NodeDefOrBuilder getNodeDefOrBuilder​(int index)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
        Specified by:
        getNodeDefOrBuilder in interface FunctionDefOrBuilder
      • getNodeDefOrBuilderList

        public List<? extends NodeDefOrBuilder> getNodeDefOrBuilderList()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
        Specified by:
        getNodeDefOrBuilderList in interface FunctionDefOrBuilder
      • addNodeDefBuilder

        public NodeDef.Builder addNodeDefBuilder()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • addNodeDefBuilder

        public NodeDef.Builder addNodeDefBuilder​(int index)
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • getNodeDefBuilderList

        public List<NodeDef.Builder> getNodeDefBuilderList()
         By convention, "op" in node_def is resolved by consulting with a
         user-defined library first. If not resolved, "func" is assumed to
         be a builtin op.
         
        repeated .tensorflow.NodeDef node_def = 3;
      • getRetCount

        public int getRetCount()
        Description copied from interface: FunctionDefOrBuilder
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
        Specified by:
        getRetCount in interface FunctionDefOrBuilder
      • containsRet

        public boolean containsRet​(String key)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
        Specified by:
        containsRet in interface FunctionDefOrBuilder
      • getRetMap

        public Map<String,​String> getRetMap()
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
        Specified by:
        getRetMap in interface FunctionDefOrBuilder
      • getRetOrDefault

        public String getRetOrDefault​(String key,
                                      String defaultValue)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
        Specified by:
        getRetOrDefault in interface FunctionDefOrBuilder
      • getRetOrThrow

        public String getRetOrThrow​(String key)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
        Specified by:
        getRetOrThrow in interface FunctionDefOrBuilder
      • removeRet

        public FunctionDef.Builder removeRet​(String key)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
      • putRet

        public FunctionDef.Builder putRet​(String key,
                                          String value)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
      • putAllRet

        public FunctionDef.Builder putAllRet​(Map<String,​String> values)
         A mapping from the output arg names from `signature` to the
         outputs from `node_def` that should be returned by the function.
         
        map<string, string> ret = 4;
      • setUnknownFields

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

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