Class FunctionDef

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.tensorflow.framework.FunctionDef
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, FunctionDefOrBuilder

@Generated public final class FunctionDef extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

  • Method Details

    • getDescriptor

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

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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.
    • getSignatureOrBuilder

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

      public int getAttrCount()
      Description copied from interface: FunctionDefOrBuilder
       Attributes specific to this function definition.
       
      map<string, .tensorflow.AttrValue> attr = 5;
      Specified by:
      getAttrCount in interface FunctionDefOrBuilder
    • containsAttr

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

      @Deprecated public Map<String,AttrValue> getAttr()
      Deprecated.
      Use getAttrMap() instead.
      Specified by:
      getAttr in interface FunctionDefOrBuilder
    • getAttrMap

      public Map<String,AttrValue> getAttrMap()
       Attributes specific to this function definition.
       
      map<string, .tensorflow.AttrValue> attr = 5;
      Specified by:
      getAttrMap in interface FunctionDefOrBuilder
    • getAttrOrDefault

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

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

      public int getArgAttrCount()
      Description copied from interface: FunctionDefOrBuilder
      map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
      Specified by:
      getArgAttrCount in interface FunctionDefOrBuilder
    • containsArgAttr

      public boolean containsArgAttr(int key)
      map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
      Specified by:
      containsArgAttr in interface FunctionDefOrBuilder
    • getArgAttr

      Deprecated.
      Use getArgAttrMap() instead.
      Specified by:
      getArgAttr in interface FunctionDefOrBuilder
    • getArgAttrMap

      public Map<Integer,FunctionDef.ArgAttrs> getArgAttrMap()
      map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
      Specified by:
      getArgAttrMap in interface FunctionDefOrBuilder
    • getArgAttrOrDefault

      public FunctionDef.ArgAttrs getArgAttrOrDefault(int key, FunctionDef.ArgAttrs defaultValue)
      map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
      Specified by:
      getArgAttrOrDefault in interface FunctionDefOrBuilder
    • getArgAttrOrThrow

      public FunctionDef.ArgAttrs getArgAttrOrThrow(int key)
      map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
      Specified by:
      getArgAttrOrThrow in interface FunctionDefOrBuilder
    • getResourceArgUniqueIdCount

      public int getResourceArgUniqueIdCount()
      Description copied from interface: FunctionDefOrBuilder
       Unique IDs for each resource argument, used to track aliasing resources. If
       Argument A and Argument B alias each other, then
       resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
      
       If this field is empty, none of the arguments could alias; otherwise, every
       resource argument should have an entry in this field.
      
       When instantiated, the unique IDs will be attached to the _Arg nodes'
       "_resource_arg_unique_id" attribute.
       
      map<uint32, uint32> resource_arg_unique_id = 8;
      Specified by:
      getResourceArgUniqueIdCount in interface FunctionDefOrBuilder
    • containsResourceArgUniqueId

      public boolean containsResourceArgUniqueId(int key)
       Unique IDs for each resource argument, used to track aliasing resources. If
       Argument A and Argument B alias each other, then
       resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
      
       If this field is empty, none of the arguments could alias; otherwise, every
       resource argument should have an entry in this field.
      
       When instantiated, the unique IDs will be attached to the _Arg nodes'
       "_resource_arg_unique_id" attribute.
       
      map<uint32, uint32> resource_arg_unique_id = 8;
      Specified by:
      containsResourceArgUniqueId in interface FunctionDefOrBuilder
    • getResourceArgUniqueId

      @Deprecated public Map<Integer,Integer> getResourceArgUniqueId()
      Deprecated.
      Specified by:
      getResourceArgUniqueId in interface FunctionDefOrBuilder
    • getResourceArgUniqueIdMap

      public Map<Integer,Integer> getResourceArgUniqueIdMap()
       Unique IDs for each resource argument, used to track aliasing resources. If
       Argument A and Argument B alias each other, then
       resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
      
       If this field is empty, none of the arguments could alias; otherwise, every
       resource argument should have an entry in this field.
      
       When instantiated, the unique IDs will be attached to the _Arg nodes'
       "_resource_arg_unique_id" attribute.
       
      map<uint32, uint32> resource_arg_unique_id = 8;
      Specified by:
      getResourceArgUniqueIdMap in interface FunctionDefOrBuilder
    • getResourceArgUniqueIdOrDefault

      public int getResourceArgUniqueIdOrDefault(int key, int defaultValue)
       Unique IDs for each resource argument, used to track aliasing resources. If
       Argument A and Argument B alias each other, then
       resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
      
       If this field is empty, none of the arguments could alias; otherwise, every
       resource argument should have an entry in this field.
      
       When instantiated, the unique IDs will be attached to the _Arg nodes'
       "_resource_arg_unique_id" attribute.
       
      map<uint32, uint32> resource_arg_unique_id = 8;
      Specified by:
      getResourceArgUniqueIdOrDefault in interface FunctionDefOrBuilder
    • getResourceArgUniqueIdOrThrow

      public int getResourceArgUniqueIdOrThrow(int key)
       Unique IDs for each resource argument, used to track aliasing resources. If
       Argument A and Argument B alias each other, then
       resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
      
       If this field is empty, none of the arguments could alias; otherwise, every
       resource argument should have an entry in this field.
      
       When instantiated, the unique IDs will be attached to the _Arg nodes'
       "_resource_arg_unique_id" attribute.
       
      map<uint32, uint32> resource_arg_unique_id = 8;
      Specified by:
      getResourceArgUniqueIdOrThrow in interface FunctionDefOrBuilder
    • 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
    • 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
    • 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
    • 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
    • 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
    • getRet

      @Deprecated public Map<String,String> getRet()
      Deprecated.
      Use getRetMap() instead.
      Specified by:
      getRet 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
    • getControlRetCount

      public int getControlRetCount()
      Description copied from interface: FunctionDefOrBuilder
       A mapping from control output names from `signature` to node names in
       `node_def` which should be control outputs of this function.
       
      map<string, string> control_ret = 6;
      Specified by:
      getControlRetCount in interface FunctionDefOrBuilder
    • containsControlRet

      public boolean containsControlRet(String key)
       A mapping from control output names from `signature` to node names in
       `node_def` which should be control outputs of this function.
       
      map<string, string> control_ret = 6;
      Specified by:
      containsControlRet in interface FunctionDefOrBuilder
    • getControlRet

      @Deprecated public Map<String,String> getControlRet()
      Deprecated.
      Use getControlRetMap() instead.
      Specified by:
      getControlRet in interface FunctionDefOrBuilder
    • getControlRetMap

      public Map<String,String> getControlRetMap()
       A mapping from control output names from `signature` to node names in
       `node_def` which should be control outputs of this function.
       
      map<string, string> control_ret = 6;
      Specified by:
      getControlRetMap in interface FunctionDefOrBuilder
    • getControlRetOrDefault

      public String getControlRetOrDefault(String key, String defaultValue)
       A mapping from control output names from `signature` to node names in
       `node_def` which should be control outputs of this function.
       
      map<string, string> control_ret = 6;
      Specified by:
      getControlRetOrDefault in interface FunctionDefOrBuilder
    • getControlRetOrThrow

      public String getControlRetOrThrow(String key)
       A mapping from control output names from `signature` to node names in
       `node_def` which should be control outputs of this function.
       
      map<string, string> control_ret = 6;
      Specified by:
      getControlRetOrThrow in interface FunctionDefOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static FunctionDef parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static FunctionDef parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FunctionDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

      public static FunctionDef parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FunctionDef parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FunctionDef parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FunctionDef parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FunctionDef parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public FunctionDef.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static FunctionDef.Builder newBuilder()
    • newBuilder

      public static FunctionDef.Builder newBuilder(FunctionDef prototype)
    • toBuilder

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

      protected FunctionDef.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static FunctionDef getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<FunctionDef> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public FunctionDef getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder