SignatureDef

public final class SignatureDef

 SignatureDef defines the signature of a computation supported by a TensorFlow
 graph.
 For example, a model with two loss computations, sharing a single input,
 might have the following signature_def map.
 Note that across the two SignatureDefs "loss_A" and "loss_B", the input key,
 output key, and method_name are identical, and will be used by system(s) that
 implement or rely upon this particular loss method. The output tensor names
 differ, demonstrating how different outputs can exist for the same method.
 signature_def {
   key: "loss_A"
   value {
     inputs {
       key: "input"
       value {
         name: "input:0"
         dtype: DT_STRING
         tensor_shape: ...
       }
     }
     outputs {
       key: "loss_output"
       value {
         name: "loss_output_A:0"
         dtype: DT_FLOAT
         tensor_shape: ...
       }
     }
   }
   ...
   method_name: "some/package/compute_loss"
 }
 signature_def {
   key: "loss_B"
   value {
     inputs {
       key: "input"
       value {
         name: "input:0"
         dtype: DT_STRING
         tensor_shape: ...
       }
     }
     outputs {
       key: "loss_output"
       value {
         name: "loss_output_B:0"
         dtype: DT_FLOAT
         tensor_shape: ...
       }
     }
   }
   ...
   method_name: "some/package/compute_loss"
 }
 
Protobuf type tensorflow.SignatureDef

Nested Classes

class SignatureDef.Builder
 SignatureDef defines the signature of a computation supported by a TensorFlow
 graph. 

Constants

int INPUTS_FIELD_NUMBER
int METHOD_NAME_FIELD_NUMBER
int OUTPUTS_FIELD_NUMBER

Public Methods

boolean
containsInputs(String key)
 Named input parameters.
boolean
containsOutputs(String key)
 Named output parameters.
boolean
equals(Object obj)
static SignatureDef
SignatureDef
final static com.google.protobuf.Descriptors.Descriptor
Map<String, TensorInfo>
getInputs()
Use getInputsMap() instead.
int
getInputsCount()
 Named input parameters.
Map<String, TensorInfo>
getInputsMap()
 Named input parameters.
TensorInfo
getInputsOrDefault(String key, TensorInfo defaultValue)
 Named input parameters.
TensorInfo
getInputsOrThrow(String key)
 Named input parameters.
String
getMethodName()
 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method.
com.google.protobuf.ByteString
getMethodNameBytes()
 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method.
Map<String, TensorInfo>
getOutputs()
Use getOutputsMap() instead.
int
getOutputsCount()
 Named output parameters.
Map<String, TensorInfo>
getOutputsMap()
 Named output parameters.
TensorInfo
getOutputsOrDefault(String key, TensorInfo defaultValue)
 Named output parameters.
TensorInfo
getOutputsOrThrow(String key)
 Named output parameters.
int
final com.google.protobuf.UnknownFieldSet
int
final boolean
static SignatureDef.Builder
static SignatureDef.Builder
SignatureDef.Builder
static SignatureDef
parseDelimitedFrom(InputStream input)
static SignatureDef
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static SignatureDef
parseFrom(ByteBuffer data)
static SignatureDef
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static SignatureDef
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static SignatureDef
parseFrom(com.google.protobuf.CodedInputStream input)
static SignatureDef
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static SignatureDef
parseFrom(com.google.protobuf.ByteString data)
static SignatureDef
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static SignatureDef
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static
parser()
SignatureDef.Builder
void
writeTo(com.google.protobuf.CodedOutputStream output)

Inherited Methods

Constants

public static final int INPUTS_FIELD_NUMBER

Constant Value: 1

public static final int METHOD_NAME_FIELD_NUMBER

Constant Value: 3

public static final int OUTPUTS_FIELD_NUMBER

Constant Value: 2

Public Methods

public boolean containsInputs (String key)

 Named input parameters.
 
map<string, .tensorflow.TensorInfo> inputs = 1;

public boolean containsOutputs (String key)

 Named output parameters.
 
map<string, .tensorflow.TensorInfo> outputs = 2;

public boolean equals (Object obj)

public static SignatureDef getDefaultInstance ()

public SignatureDef getDefaultInstanceForType ()

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

public Map<String, TensorInfo> getInputs ()

Use getInputsMap() instead.

public int getInputsCount ()

 Named input parameters.
 
map<string, .tensorflow.TensorInfo> inputs = 1;

public Map<String, TensorInfo> getInputsMap ()

 Named input parameters.
 
map<string, .tensorflow.TensorInfo> inputs = 1;

public TensorInfo getInputsOrDefault (String key, TensorInfo defaultValue)

 Named input parameters.
 
map<string, .tensorflow.TensorInfo> inputs = 1;

public TensorInfo getInputsOrThrow (String key)

 Named input parameters.
 
map<string, .tensorflow.TensorInfo> inputs = 1;

public String getMethodName ()

 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method. This enables producers and
 consumers of SignatureDefs, e.g. a model definition library and a serving
 library to have a clear hand-off regarding the semantics of a computation.
 Note that multiple SignatureDefs in a single MetaGraphDef may have the same
 method_name. This is commonly used to support multi-headed computation,
 where a single graph computation may return multiple results.
 
string method_name = 3;

public com.google.protobuf.ByteString getMethodNameBytes ()

 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method. This enables producers and
 consumers of SignatureDefs, e.g. a model definition library and a serving
 library to have a clear hand-off regarding the semantics of a computation.
 Note that multiple SignatureDefs in a single MetaGraphDef may have the same
 method_name. This is commonly used to support multi-headed computation,
 where a single graph computation may return multiple results.
 
string method_name = 3;

public Map<String, TensorInfo> getOutputs ()

Use getOutputsMap() instead.

public int getOutputsCount ()

 Named output parameters.
 
map<string, .tensorflow.TensorInfo> outputs = 2;

public Map<String, TensorInfo> getOutputsMap ()

 Named output parameters.
 
map<string, .tensorflow.TensorInfo> outputs = 2;

public TensorInfo getOutputsOrDefault (String key, TensorInfo defaultValue)

 Named output parameters.
 
map<string, .tensorflow.TensorInfo> outputs = 2;

public TensorInfo getOutputsOrThrow (String key)

 Named output parameters.
 
map<string, .tensorflow.TensorInfo> outputs = 2;

public getParserForType ()

public int getSerializedSize ()

public final com.google.protobuf.UnknownFieldSet getUnknownFields ()

public int hashCode ()

public final boolean isInitialized ()

public static SignatureDef.Builder newBuilder (SignatureDef prototype)

public static SignatureDef.Builder newBuilder ()

public SignatureDef.Builder newBuilderForType ()

public static SignatureDef parseDelimitedFrom (InputStream input)

Throws
IOException

public static SignatureDef parseDelimitedFrom (InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
IOException

public static SignatureDef parseFrom (ByteBuffer data)

Throws
InvalidProtocolBufferException

public static SignatureDef parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
IOException

public static SignatureDef parseFrom (ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
InvalidProtocolBufferException

public static SignatureDef parseFrom (com.google.protobuf.CodedInputStream input)

Throws
IOException

public static SignatureDef parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
InvalidProtocolBufferException

public static SignatureDef parseFrom (com.google.protobuf.ByteString data)

Throws
InvalidProtocolBufferException

public static SignatureDef parseFrom (InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
IOException

public static SignatureDef parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
InvalidProtocolBufferException

public static parser ()

public SignatureDef.Builder toBuilder ()

public void writeTo (com.google.protobuf.CodedOutputStream output)

Throws
IOException