All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.framework.SignatureDef Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/protobuf/meta_graph.proto

package org.tensorflow.framework;

/**
 * 
 * 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 {@code tensorflow.SignatureDef} */ public final class SignatureDef extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.SignatureDef) SignatureDefOrBuilder { private static final long serialVersionUID = 0L; // Use SignatureDef.newBuilder() to construct. private SignatureDef(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SignatureDef() { methodName_ = ""; } @java.lang.Override public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private SignatureDef( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields = org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { inputs_ = org.nd4j.shade.protobuf.MapField.newMapField( InputsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } org.nd4j.shade.protobuf.MapEntry inputs__ = input.readMessage( InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); inputs_.getMutableMap().put( inputs__.getKey(), inputs__.getValue()); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = org.nd4j.shade.protobuf.MapField.newMapField( OutputsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } org.nd4j.shade.protobuf.MapEntry outputs__ = input.readMessage( OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); outputs_.getMutableMap().put( outputs__.getKey(), outputs__.getValue()); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); methodName_ = s; break; } } } } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; } @SuppressWarnings({"rawtypes"}) protected org.nd4j.shade.protobuf.MapField internalGetMapField( int number) { switch (number) { case 1: return internalGetInputs(); case 2: return internalGetOutputs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.SignatureDef.class, org.tensorflow.framework.SignatureDef.Builder.class); } private int bitField0_; public static final int INPUTS_FIELD_NUMBER = 1; private static final class InputsDefaultEntryHolder { static final org.nd4j.shade.protobuf.MapEntry< java.lang.String, org.tensorflow.framework.TensorInfo> defaultEntry = org.nd4j.shade.protobuf.MapEntry .newDefaultInstance( org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_InputsEntry_descriptor, org.nd4j.shade.protobuf.WireFormat.FieldType.STRING, "", org.nd4j.shade.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.framework.TensorInfo.getDefaultInstance()); } private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.TensorInfo> inputs_; private org.nd4j.shade.protobuf.MapField internalGetInputs() { if (inputs_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( InputsDefaultEntryHolder.defaultEntry); } return inputs_; } public int getInputsCount() { return internalGetInputs().getMap().size(); } /** *
   * Named input parameters.
   * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public boolean containsInputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetInputs().getMap().containsKey(key); } /** * Use {@link #getInputsMap()} instead. */ @java.lang.Deprecated public java.util.Map getInputs() { return getInputsMap(); } /** *
   * Named input parameters.
   * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public java.util.Map getInputsMap() { return internalGetInputs().getMap(); } /** *
   * Named input parameters.
   * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public org.tensorflow.framework.TensorInfo getInputsOrDefault( java.lang.String key, org.tensorflow.framework.TensorInfo defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetInputs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Named input parameters.
   * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public org.tensorflow.framework.TensorInfo getInputsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetInputs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int OUTPUTS_FIELD_NUMBER = 2; private static final class OutputsDefaultEntryHolder { static final org.nd4j.shade.protobuf.MapEntry< java.lang.String, org.tensorflow.framework.TensorInfo> defaultEntry = org.nd4j.shade.protobuf.MapEntry .newDefaultInstance( org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor, org.nd4j.shade.protobuf.WireFormat.FieldType.STRING, "", org.nd4j.shade.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.framework.TensorInfo.getDefaultInstance()); } private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.TensorInfo> outputs_; private org.nd4j.shade.protobuf.MapField internalGetOutputs() { if (outputs_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( OutputsDefaultEntryHolder.defaultEntry); } return outputs_; } public int getOutputsCount() { return internalGetOutputs().getMap().size(); } /** *
   * Named output parameters.
   * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public boolean containsOutputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetOutputs().getMap().containsKey(key); } /** * Use {@link #getOutputsMap()} instead. */ @java.lang.Deprecated public java.util.Map getOutputs() { return getOutputsMap(); } /** *
   * Named output parameters.
   * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public java.util.Map getOutputsMap() { return internalGetOutputs().getMap(); } /** *
   * Named output parameters.
   * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public org.tensorflow.framework.TensorInfo getOutputsOrDefault( java.lang.String key, org.tensorflow.framework.TensorInfo defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetOutputs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Named output parameters.
   * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public org.tensorflow.framework.TensorInfo getOutputsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetOutputs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int METHOD_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object methodName_; /** *
   * 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 java.lang.String getMethodName() { java.lang.Object ref = methodName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); methodName_ = s; return s; } } /** *
   * 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 org.nd4j.shade.protobuf.ByteString getMethodNameBytes() { java.lang.Object ref = methodName_; if (ref instanceof java.lang.String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); methodName_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) throws java.io.IOException { org.nd4j.shade.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetInputs(), InputsDefaultEntryHolder.defaultEntry, 1); org.nd4j.shade.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetOutputs(), OutputsDefaultEntryHolder.defaultEntry, 2); if (!getMethodNameBytes().isEmpty()) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 3, methodName_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (java.util.Map.Entry entry : internalGetInputs().getMap().entrySet()) { org.nd4j.shade.protobuf.MapEntry inputs__ = InputsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += org.nd4j.shade.protobuf.CodedOutputStream .computeMessageSize(1, inputs__); } for (java.util.Map.Entry entry : internalGetOutputs().getMap().entrySet()) { org.nd4j.shade.protobuf.MapEntry outputs__ = OutputsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += org.nd4j.shade.protobuf.CodedOutputStream .computeMessageSize(2, outputs__); } if (!getMethodNameBytes().isEmpty()) { size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(3, methodName_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.SignatureDef)) { return super.equals(obj); } org.tensorflow.framework.SignatureDef other = (org.tensorflow.framework.SignatureDef) obj; boolean result = true; result = result && internalGetInputs().equals( other.internalGetInputs()); result = result && internalGetOutputs().equals( other.internalGetOutputs()); result = result && getMethodName() .equals(other.getMethodName()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (!internalGetInputs().getMap().isEmpty()) { hash = (37 * hash) + INPUTS_FIELD_NUMBER; hash = (53 * hash) + internalGetInputs().hashCode(); } if (!internalGetOutputs().getMap().isEmpty()) { hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; hash = (53 * hash) + internalGetOutputs().hashCode(); } hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; hash = (53 * hash) + getMethodName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.SignatureDef parseFrom( java.nio.ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.SignatureDef parseFrom( java.nio.ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.SignatureDef parseFrom( org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.SignatureDef parseFrom( org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.SignatureDef parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.SignatureDef parseFrom( byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.SignatureDef parseFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.SignatureDef parseFrom( java.io.InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.SignatureDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.SignatureDef parseDelimitedFrom( java.io.InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.SignatureDef parseFrom( org.nd4j.shade.protobuf.CodedInputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.SignatureDef parseFrom( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.framework.SignatureDef prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return 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 {@code tensorflow.SignatureDef} */ public static final class Builder extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SignatureDef) org.tensorflow.framework.SignatureDefOrBuilder { public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; } @SuppressWarnings({"rawtypes"}) protected org.nd4j.shade.protobuf.MapField internalGetMapField( int number) { switch (number) { case 1: return internalGetInputs(); case 2: return internalGetOutputs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected org.nd4j.shade.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 1: return internalGetMutableInputs(); case 2: return internalGetMutableOutputs(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.SignatureDef.class, org.tensorflow.framework.SignatureDef.Builder.class); } // Construct using org.tensorflow.framework.SignatureDef.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (org.nd4j.shade.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); internalGetMutableInputs().clear(); internalGetMutableOutputs().clear(); methodName_ = ""; return this; } public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; } public org.tensorflow.framework.SignatureDef getDefaultInstanceForType() { return org.tensorflow.framework.SignatureDef.getDefaultInstance(); } public org.tensorflow.framework.SignatureDef build() { org.tensorflow.framework.SignatureDef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.SignatureDef buildPartial() { org.tensorflow.framework.SignatureDef result = new org.tensorflow.framework.SignatureDef(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.inputs_ = internalGetInputs(); result.inputs_.makeImmutable(); result.outputs_ = internalGetOutputs(); result.outputs_.makeImmutable(); result.methodName_ = methodName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) { if (other instanceof org.tensorflow.framework.SignatureDef) { return mergeFrom((org.tensorflow.framework.SignatureDef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.SignatureDef other) { if (other == org.tensorflow.framework.SignatureDef.getDefaultInstance()) return this; internalGetMutableInputs().mergeFrom( other.internalGetInputs()); internalGetMutableOutputs().mergeFrom( other.internalGetOutputs()); if (!other.getMethodName().isEmpty()) { methodName_ = other.methodName_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.SignatureDef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.SignatureDef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.TensorInfo> inputs_; private org.nd4j.shade.protobuf.MapField internalGetInputs() { if (inputs_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( InputsDefaultEntryHolder.defaultEntry); } return inputs_; } private org.nd4j.shade.protobuf.MapField internalGetMutableInputs() { onChanged();; if (inputs_ == null) { inputs_ = org.nd4j.shade.protobuf.MapField.newMapField( InputsDefaultEntryHolder.defaultEntry); } if (!inputs_.isMutable()) { inputs_ = inputs_.copy(); } return inputs_; } public int getInputsCount() { return internalGetInputs().getMap().size(); } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public boolean containsInputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetInputs().getMap().containsKey(key); } /** * Use {@link #getInputsMap()} instead. */ @java.lang.Deprecated public java.util.Map getInputs() { return getInputsMap(); } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public java.util.Map getInputsMap() { return internalGetInputs().getMap(); } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public org.tensorflow.framework.TensorInfo getInputsOrDefault( java.lang.String key, org.tensorflow.framework.TensorInfo defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetInputs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public org.tensorflow.framework.TensorInfo getInputsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetInputs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearInputs() { internalGetMutableInputs().getMutableMap() .clear(); return this; } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public Builder removeInputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableInputs().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableInputs() { return internalGetMutableInputs().getMutableMap(); } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public Builder putInputs( java.lang.String key, org.tensorflow.framework.TensorInfo value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableInputs().getMutableMap() .put(key, value); return this; } /** *
     * Named input parameters.
     * 
* * map<string, .tensorflow.TensorInfo> inputs = 1; */ public Builder putAllInputs( java.util.Map values) { internalGetMutableInputs().getMutableMap() .putAll(values); return this; } private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.TensorInfo> outputs_; private org.nd4j.shade.protobuf.MapField internalGetOutputs() { if (outputs_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( OutputsDefaultEntryHolder.defaultEntry); } return outputs_; } private org.nd4j.shade.protobuf.MapField internalGetMutableOutputs() { onChanged();; if (outputs_ == null) { outputs_ = org.nd4j.shade.protobuf.MapField.newMapField( OutputsDefaultEntryHolder.defaultEntry); } if (!outputs_.isMutable()) { outputs_ = outputs_.copy(); } return outputs_; } public int getOutputsCount() { return internalGetOutputs().getMap().size(); } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public boolean containsOutputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetOutputs().getMap().containsKey(key); } /** * Use {@link #getOutputsMap()} instead. */ @java.lang.Deprecated public java.util.Map getOutputs() { return getOutputsMap(); } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public java.util.Map getOutputsMap() { return internalGetOutputs().getMap(); } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public org.tensorflow.framework.TensorInfo getOutputsOrDefault( java.lang.String key, org.tensorflow.framework.TensorInfo defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetOutputs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public org.tensorflow.framework.TensorInfo getOutputsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetOutputs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearOutputs() { internalGetMutableOutputs().getMutableMap() .clear(); return this; } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public Builder removeOutputs( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableOutputs().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableOutputs() { return internalGetMutableOutputs().getMutableMap(); } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public Builder putOutputs( java.lang.String key, org.tensorflow.framework.TensorInfo value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableOutputs().getMutableMap() .put(key, value); return this; } /** *
     * Named output parameters.
     * 
* * map<string, .tensorflow.TensorInfo> outputs = 2; */ public Builder putAllOutputs( java.util.Map values) { internalGetMutableOutputs().getMutableMap() .putAll(values); return this; } private java.lang.Object methodName_ = ""; /** *
     * 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 java.lang.String getMethodName() { java.lang.Object ref = methodName_; if (!(ref instanceof java.lang.String)) { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); methodName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * 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 org.nd4j.shade.protobuf.ByteString getMethodNameBytes() { java.lang.Object ref = methodName_; if (ref instanceof String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); methodName_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } /** *
     * 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 Builder setMethodName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } methodName_ = value; onChanged(); return this; } /** *
     * 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 Builder clearMethodName() { methodName_ = getDefaultInstance().getMethodName(); onChanged(); return this; } /** *
     * 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 Builder setMethodNameBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); methodName_ = value; onChanged(); return this; } public final Builder setUnknownFields( final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.SignatureDef) } // @@protoc_insertion_point(class_scope:tensorflow.SignatureDef) private static final org.tensorflow.framework.SignatureDef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.SignatureDef(); } public static org.tensorflow.framework.SignatureDef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final org.nd4j.shade.protobuf.Parser PARSER = new org.nd4j.shade.protobuf.AbstractParser() { public SignatureDef parsePartialFrom( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return new SignatureDef(input, extensionRegistry); } }; public static org.nd4j.shade.protobuf.Parser parser() { return PARSER; } @java.lang.Override public org.nd4j.shade.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.SignatureDef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy