SignatureDef.Builder

public static final class SignatureDef.Builder

 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

Public Methods

SignatureDef.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SignatureDef
build()
SignatureDef
SignatureDef.Builder
clear()
SignatureDef.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SignatureDef.Builder
SignatureDef.Builder
clearMethodName()
 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method.
SignatureDef.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SignatureDef.Builder
SignatureDef.Builder
clone()
boolean
containsInputs(String key)
 Named input parameters.
boolean
containsOutputs(String key)
 Named output parameters.
SignatureDef
final static com.google.protobuf.Descriptors.Descriptor
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>
getMutableInputs()
Use alternate mutation accessors instead.
Map<String, TensorInfo>
getMutableOutputs()
Use alternate mutation accessors instead.
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.
final boolean
SignatureDef.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SignatureDef.Builder
mergeFrom(com.google.protobuf.Message other)
final SignatureDef.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SignatureDef.Builder
putAllInputs(Map<String, TensorInfo> values)
 Named input parameters.
SignatureDef.Builder
putAllOutputs(Map<String, TensorInfo> values)
 Named output parameters.
SignatureDef.Builder
putInputs(String key, TensorInfo value)
 Named input parameters.
SignatureDef.Builder
putOutputs(String key, TensorInfo value)
 Named output parameters.
SignatureDef.Builder
removeInputs(String key)
 Named input parameters.
SignatureDef.Builder
removeOutputs(String key)
 Named output parameters.
SignatureDef.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SignatureDef.Builder
setMethodName(String value)
 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method.
SignatureDef.Builder
setMethodNameBytes(com.google.protobuf.ByteString value)
 Extensible method_name information enabling third-party users to mark a
 SignatureDef as supporting a particular method.
SignatureDef.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
final SignatureDef.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)

Inherited Methods

Public Methods

public SignatureDef.Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, Object value)

public SignatureDef build ()

public SignatureDef buildPartial ()

public SignatureDef.Builder clear ()

public SignatureDef.Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)

public SignatureDef.Builder clearInputs ()

public SignatureDef.Builder clearMethodName ()

 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 SignatureDef.Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)

public SignatureDef.Builder clearOutputs ()

public SignatureDef.Builder clone ()

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 SignatureDef getDefaultInstanceForType ()

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

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()

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> getMutableInputs ()

Use alternate mutation accessors instead.

public Map<String, TensorInfo> getMutableOutputs ()

Use alternate mutation accessors instead.

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 final boolean isInitialized ()

public SignatureDef.Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Throws
IOException

public SignatureDef.Builder mergeFrom (com.google.protobuf.Message other)

public final SignatureDef.Builder mergeUnknownFields (com.google.protobuf.UnknownFieldSet unknownFields)

public SignatureDef.Builder putAllInputs (Map<String, TensorInfo> values)

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

public SignatureDef.Builder putAllOutputs (Map<String, TensorInfo> values)

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

public SignatureDef.Builder putInputs (String key, TensorInfo value)

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

public SignatureDef.Builder putOutputs (String key, TensorInfo value)

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

public SignatureDef.Builder removeInputs (String key)

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

public SignatureDef.Builder removeOutputs (String key)

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

public SignatureDef.Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, Object value)

public SignatureDef.Builder setMethodName (String value)

 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 SignatureDef.Builder setMethodNameBytes (com.google.protobuf.ByteString value)

 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 SignatureDef.Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)

public final SignatureDef.Builder setUnknownFields (com.google.protobuf.UnknownFieldSet unknownFields)