public final class SignatureDef extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements SignatureDefOrBuilder
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| Modifier and Type | Class and Description |
|---|---|
static class |
SignatureDef.Builder
SignatureDef defines the signature of a computation supported by a TensorFlow
graph.
|
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable, org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
INPUTS_FIELD_NUMBER |
static int |
METHOD_NAME_FIELD_NUMBER |
static int |
OUTPUTS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsInputs(String key)
Named input parameters.
|
boolean |
containsOutputs(String key)
Named output parameters.
|
boolean |
equals(Object obj) |
static SignatureDef |
getDefaultInstance() |
SignatureDef |
getDefaultInstanceForType() |
static org.nd4j.shade.protobuf.Descriptors.Descriptor |
getDescriptor() |
Map<String,TensorInfo> |
getInputs()
Deprecated.
|
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.
|
org.nd4j.shade.protobuf.ByteString |
getMethodNameBytes()
Extensible method_name information enabling third-party users to mark a
SignatureDef as supporting a particular method.
|
Map<String,TensorInfo> |
getOutputs()
Deprecated.
|
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.
|
org.nd4j.shade.protobuf.Parser<SignatureDef> |
getParserForType() |
int |
getSerializedSize() |
org.nd4j.shade.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected org.nd4j.shade.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static SignatureDef.Builder |
newBuilder() |
static SignatureDef.Builder |
newBuilder(SignatureDef prototype) |
SignatureDef.Builder |
newBuilderForType() |
protected SignatureDef.Builder |
newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static SignatureDef |
parseDelimitedFrom(InputStream input) |
static SignatureDef |
parseDelimitedFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static SignatureDef |
parseFrom(byte[] data) |
static SignatureDef |
parseFrom(byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static SignatureDef |
parseFrom(ByteBuffer data) |
static SignatureDef |
parseFrom(ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static SignatureDef |
parseFrom(org.nd4j.shade.protobuf.ByteString data) |
static SignatureDef |
parseFrom(org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static SignatureDef |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) |
static SignatureDef |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static SignatureDef |
parseFrom(InputStream input) |
static SignatureDef |
parseFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static org.nd4j.shade.protobuf.Parser<SignatureDef> |
parser() |
SignatureDef.Builder |
toBuilder() |
void |
writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int INPUTS_FIELD_NUMBER
public static final int OUTPUTS_FIELD_NUMBER
public static final int METHOD_NAME_FIELD_NUMBER
protected Object newInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class org.nd4j.shade.protobuf.GeneratedMessageV3public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface org.nd4j.shade.protobuf.MessageOrBuildergetUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
protected org.nd4j.shade.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class org.nd4j.shade.protobuf.GeneratedMessageV3protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3public int getInputsCount()
SignatureDefOrBuilderNamed input parameters.
map<string, .tensorflow.TensorInfo> inputs = 1;getInputsCount in interface SignatureDefOrBuilderpublic boolean containsInputs(String key)
Named input parameters.
map<string, .tensorflow.TensorInfo> inputs = 1;containsInputs in interface SignatureDefOrBuilder@Deprecated public Map<String,TensorInfo> getInputs()
getInputsMap() instead.getInputs in interface SignatureDefOrBuilderpublic Map<String,TensorInfo> getInputsMap()
Named input parameters.
map<string, .tensorflow.TensorInfo> inputs = 1;getInputsMap in interface SignatureDefOrBuilderpublic TensorInfo getInputsOrDefault(String key, TensorInfo defaultValue)
Named input parameters.
map<string, .tensorflow.TensorInfo> inputs = 1;getInputsOrDefault in interface SignatureDefOrBuilderpublic TensorInfo getInputsOrThrow(String key)
Named input parameters.
map<string, .tensorflow.TensorInfo> inputs = 1;getInputsOrThrow in interface SignatureDefOrBuilderpublic int getOutputsCount()
SignatureDefOrBuilderNamed output parameters.
map<string, .tensorflow.TensorInfo> outputs = 2;getOutputsCount in interface SignatureDefOrBuilderpublic boolean containsOutputs(String key)
Named output parameters.
map<string, .tensorflow.TensorInfo> outputs = 2;containsOutputs in interface SignatureDefOrBuilder@Deprecated public Map<String,TensorInfo> getOutputs()
getOutputsMap() instead.getOutputs in interface SignatureDefOrBuilderpublic Map<String,TensorInfo> getOutputsMap()
Named output parameters.
map<string, .tensorflow.TensorInfo> outputs = 2;getOutputsMap in interface SignatureDefOrBuilderpublic TensorInfo getOutputsOrDefault(String key, TensorInfo defaultValue)
Named output parameters.
map<string, .tensorflow.TensorInfo> outputs = 2;getOutputsOrDefault in interface SignatureDefOrBuilderpublic TensorInfo getOutputsOrThrow(String key)
Named output parameters.
map<string, .tensorflow.TensorInfo> outputs = 2;getOutputsOrThrow in interface SignatureDefOrBuilderpublic 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;getMethodName in interface SignatureDefOrBuilderpublic org.nd4j.shade.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;getMethodNameBytes in interface SignatureDefOrBuilderpublic final boolean isInitialized()
isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilderisInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface org.nd4j.shade.protobuf.MessageLitewriteTo in class org.nd4j.shade.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface org.nd4j.shade.protobuf.MessageLitegetSerializedSize in class org.nd4j.shade.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface org.nd4j.shade.protobuf.Messageequals in class org.nd4j.shade.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface org.nd4j.shade.protobuf.MessagehashCode in class org.nd4j.shade.protobuf.AbstractMessagepublic static SignatureDef parseFrom(ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferExceptionpublic static SignatureDef parseFrom(InputStream input) throws IOException
IOExceptionpublic static SignatureDef parseFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SignatureDef parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static SignatureDef parseDelimitedFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SignatureDef parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static SignatureDef parseFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic SignatureDef.Builder newBuilderForType()
newBuilderForType in interface org.nd4j.shade.protobuf.MessagenewBuilderForType in interface org.nd4j.shade.protobuf.MessageLitepublic static SignatureDef.Builder newBuilder()
public static SignatureDef.Builder newBuilder(SignatureDef prototype)
public SignatureDef.Builder toBuilder()
toBuilder in interface org.nd4j.shade.protobuf.MessagetoBuilder in interface org.nd4j.shade.protobuf.MessageLiteprotected SignatureDef.Builder newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class org.nd4j.shade.protobuf.GeneratedMessageV3public static SignatureDef getDefaultInstance()
public static org.nd4j.shade.protobuf.Parser<SignatureDef> parser()
public org.nd4j.shade.protobuf.Parser<SignatureDef> getParserForType()
getParserForType in interface org.nd4j.shade.protobuf.MessagegetParserForType in interface org.nd4j.shade.protobuf.MessageLitegetParserForType in class org.nd4j.shade.protobuf.GeneratedMessageV3public SignatureDef getDefaultInstanceForType()
getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilderCopyright © 2021. All rights reserved.