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

tensorflow.tpu.TpuEmbeddingConfiguration Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/contrib/tpu/proto/tpu_embedding_configuration.proto

package tensorflow.tpu;

public final class TpuEmbeddingConfiguration {
  private TpuEmbeddingConfiguration() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface TPUEmbeddingConfigurationOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.tpu.TPUEmbeddingConfiguration)
      com.google.protobuf.MessageOrBuilder {

    /**
     * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1;
     */
    java.util.List 
        getTableDescriptorList();
    /**
     * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1;
     */
    tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getTableDescriptor(int index);
    /**
     * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1;
     */
    int getTableDescriptorCount();
    /**
     * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1;
     */
    java.util.List 
        getTableDescriptorOrBuilderList();
    /**
     * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1;
     */
    tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder getTableDescriptorOrBuilder(
        int index);

    /**
     * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2;
     */
    int getModeValue();
    /**
     * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2;
     */
    tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode getMode();

    /**
     * 
     * Number of samples in each batch of embedding layer activations sent to
     * the TensorCore.
     * 
* * int32 batch_size_per_tensor_core = 3; */ int getBatchSizePerTensorCore(); /** *
     * Number of TPU hosts used for inference/training.
     * 
* * int32 num_hosts = 4; */ int getNumHosts(); /** *
     * Number of TensorCore used for inference/training.
     * 
* * int32 num_tensor_cores = 5; */ int getNumTensorCores(); /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ int getShardingStrategyValue(); /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy getShardingStrategy(); /** *
     * This parameter determines if the execution of the sparse core will be
     * pipelined with that of the TensorCore. This parameter only affects results
     * when mode=TRAINING. If mode=INFERENCE or BACKWARD_PASS_ONLY, this parameter
     * does not affect execution and hence, is a don't care value.
     * false: The execution of the sparse core is not pipelined with that of the
     * TensorCore. The forward pass of every step on the sparse core is executed
     * only after the backward pass of the previous step is complete. And the
     * backward pass on the sparse core is executed only after the embedding
     * gradients have been computed on the TensorCore on every step. This ensures
     * that the activations on every step observe the gradient updates from the
     * previous step on both the sparse core and the TensorCore.
     * true: The execution of the sparse core is pipelined with that of the
     * TensorCore. The forward pass of every step on the sparse core can be
     * executed after the forward pass of the previous step is complete without
     * waiting for the backward pass. This improves the utilization of the sparse
     * core allowing it to process step N+1 while the embedding gradients for step
     * N are computed on the TensorCore. The backward pass of every step on the
     * sparse core is executed directly after the forward pass for the next step
     * is complete. The drawback is that embedding activations for step N+1 do not
     * observe the embedding gradient updates from step N. This could affect model
     * quality if step N and N+1 involve the same set of embedding IDs. However,
     * since the embedding updates are sparse, this is generally not considered a
     * problem.
     * 
* * bool pipeline_execution_with_tensor_core = 7; */ boolean getPipelineExecutionWithTensorCore(); /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ boolean hasOutputLayout(); /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout getOutputLayout(); /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder getOutputLayoutOrBuilder(); } /** * Protobuf type {@code tensorflow.tpu.TPUEmbeddingConfiguration} */ public static final class TPUEmbeddingConfiguration extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.TPUEmbeddingConfiguration) TPUEmbeddingConfigurationOrBuilder { private static final long serialVersionUID = 0L; // Use TPUEmbeddingConfiguration.newBuilder() to construct. private TPUEmbeddingConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TPUEmbeddingConfiguration() { tableDescriptor_ = java.util.Collections.emptyList(); mode_ = 0; batchSizePerTensorCore_ = 0; numHosts_ = 0; numTensorCores_ = 0; shardingStrategy_ = 0; pipelineExecutionWithTensorCore_ = false; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TPUEmbeddingConfiguration( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { tableDescriptor_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } tableDescriptor_.add( input.readMessage(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.parser(), extensionRegistry)); break; } case 16: { int rawValue = input.readEnum(); mode_ = rawValue; break; } case 24: { batchSizePerTensorCore_ = input.readInt32(); break; } case 32: { numHosts_ = input.readInt32(); break; } case 40: { numTensorCores_ = input.readInt32(); break; } case 48: { int rawValue = input.readEnum(); shardingStrategy_ = rawValue; break; } case 56: { pipelineExecutionWithTensorCore_ = input.readBool(); break; } case 66: { tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder subBuilder = null; if (outputLayout_ != null) { subBuilder = outputLayout_.toBuilder(); } outputLayout_ = input.readMessage(tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(outputLayout_); outputLayout_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { tableDescriptor_ = java.util.Collections.unmodifiableList(tableDescriptor_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.class, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Builder.class); } /** *
     * Mode. Should the embedding layer program be run for inference (just forward
     * pass), training (both forward and backward pass) or just the backward_pass.
     * 
* * Protobuf enum {@code tensorflow.tpu.TPUEmbeddingConfiguration.Mode} */ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { /** * UNSPECIFIED = 0; */ UNSPECIFIED(0), /** * INFERENCE = 1; */ INFERENCE(1), /** * TRAINING = 2; */ TRAINING(2), /** * BACKWARD_PASS_ONLY = 3; */ BACKWARD_PASS_ONLY(3), UNRECOGNIZED(-1), ; /** * UNSPECIFIED = 0; */ public static final int UNSPECIFIED_VALUE = 0; /** * INFERENCE = 1; */ public static final int INFERENCE_VALUE = 1; /** * TRAINING = 2; */ public static final int TRAINING_VALUE = 2; /** * BACKWARD_PASS_ONLY = 3; */ public static final int BACKWARD_PASS_ONLY_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Mode valueOf(int value) { return forNumber(value); } public static Mode forNumber(int value) { switch (value) { case 0: return UNSPECIFIED; case 1: return INFERENCE; case 2: return TRAINING; case 3: return BACKWARD_PASS_ONLY; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Mode> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Mode findValueByNumber(int number) { return Mode.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.getDescriptor().getEnumTypes().get(0); } private static final Mode[] VALUES = values(); public static Mode valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Mode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:tensorflow.tpu.TPUEmbeddingConfiguration.Mode) } /** *
     * Sharding strategy of the embedding tables among the hosts.
     * If the sharding_strategy is "mod", each id is assigned to host
     * "id % num_hosts". For instance, 13 ids are split across 5 hosts as:
     * [[0, 5, 10], [1, 6, 11], [2, 7, 12], [3, 8], [4, 9]].
     * If the sharding_strategy is "div", ids are assigned to hosts in a
     * contiguous manner. In this case, 13 ids are split across 5 hosts as:
     * [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10], [11, 12]].
     * In both the strategies, if the id space does not evenly divide the number
     * of hosts, each of the first "table_descriptor.num_ids % num_hosts" hosts
     * will be assigned one more id.
     * This partitioning strategy exactly follows that in the embedding_lookup
     * TensorFlow function at tensorflow/python/ops/embedding_ops.py.
     * 
* * Protobuf enum {@code tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy} */ public enum ShardingStrategy implements com.google.protobuf.ProtocolMessageEnum { /** * DIV_DEFAULT = 0; */ DIV_DEFAULT(0), /** * MOD = 1; */ MOD(1), UNRECOGNIZED(-1), ; /** * DIV_DEFAULT = 0; */ public static final int DIV_DEFAULT_VALUE = 0; /** * MOD = 1; */ public static final int MOD_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ShardingStrategy valueOf(int value) { return forNumber(value); } public static ShardingStrategy forNumber(int value) { switch (value) { case 0: return DIV_DEFAULT; case 1: return MOD; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< ShardingStrategy> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public ShardingStrategy findValueByNumber(int number) { return ShardingStrategy.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.getDescriptor().getEnumTypes().get(1); } private static final ShardingStrategy[] VALUES = values(); public static ShardingStrategy valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private ShardingStrategy(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy) } public interface TableDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) com.google.protobuf.MessageOrBuilder { /** *
       * Name of the table.
       * 
* * string name = 1; */ java.lang.String getName(); /** *
       * Name of the table.
       * 
* * string name = 1; */ com.google.protobuf.ByteString getNameBytes(); /** *
       * Size of the vocabulary (i.e., number of rows) in the table.
       * 
* * int32 vocabulary_size = 2; */ int getVocabularySize(); /** *
       * The embedding dimension (i.e., the width of the embedding table).
       * 
* * int32 dimension = 3; */ int getDimension(); /** *
       * Number of features mapped to this table.
       * 
* * int32 num_features = 4; */ int getNumFeatures(); /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ boolean hasOptimizationParameters(); /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters getOptimizationParameters(); /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder getOptimizationParametersOrBuilder(); } /** *
     * Description of the various embedding tables.
     * 
* * Protobuf type {@code tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor} */ public static final class TableDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) TableDescriptorOrBuilder { private static final long serialVersionUID = 0L; // Use TableDescriptor.newBuilder() to construct. private TableDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TableDescriptor() { name_ = ""; vocabularySize_ = 0; dimension_ = 0; numFeatures_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TableDescriptor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { vocabularySize_ = input.readInt32(); break; } case 24: { dimension_ = input.readInt32(); break; } case 32: { numFeatures_ = input.readInt32(); break; } case 42: { tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder subBuilder = null; if (optimizationParameters_ != null) { subBuilder = optimizationParameters_.toBuilder(); } optimizationParameters_ = input.readMessage(tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(optimizationParameters_); optimizationParameters_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.class, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
       * Name of the table.
       * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
       * Name of the table.
       * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VOCABULARY_SIZE_FIELD_NUMBER = 2; private int vocabularySize_; /** *
       * Size of the vocabulary (i.e., number of rows) in the table.
       * 
* * int32 vocabulary_size = 2; */ public int getVocabularySize() { return vocabularySize_; } public static final int DIMENSION_FIELD_NUMBER = 3; private int dimension_; /** *
       * The embedding dimension (i.e., the width of the embedding table).
       * 
* * int32 dimension = 3; */ public int getDimension() { return dimension_; } public static final int NUM_FEATURES_FIELD_NUMBER = 4; private int numFeatures_; /** *
       * Number of features mapped to this table.
       * 
* * int32 num_features = 4; */ public int getNumFeatures() { return numFeatures_; } public static final int OPTIMIZATION_PARAMETERS_FIELD_NUMBER = 5; private tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters optimizationParameters_; /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public boolean hasOptimizationParameters() { return optimizationParameters_ != null; } /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters getOptimizationParameters() { return optimizationParameters_ == null ? tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.getDefaultInstance() : optimizationParameters_; } /** *
       * Details of the learning algorithm used to update the embedding
       * parameters.
       * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder getOptimizationParametersOrBuilder() { return getOptimizationParameters(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (vocabularySize_ != 0) { output.writeInt32(2, vocabularySize_); } if (dimension_ != 0) { output.writeInt32(3, dimension_); } if (numFeatures_ != 0) { output.writeInt32(4, numFeatures_); } if (optimizationParameters_ != null) { output.writeMessage(5, getOptimizationParameters()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (vocabularySize_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, vocabularySize_); } if (dimension_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, dimension_); } if (numFeatures_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, numFeatures_); } if (optimizationParameters_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getOptimizationParameters()); } 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 tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor)) { return super.equals(obj); } tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor other = (tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && (getVocabularySize() == other.getVocabularySize()); result = result && (getDimension() == other.getDimension()); result = result && (getNumFeatures() == other.getNumFeatures()); result = result && (hasOptimizationParameters() == other.hasOptimizationParameters()); if (hasOptimizationParameters()) { result = result && getOptimizationParameters() .equals(other.getOptimizationParameters()); } 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(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VOCABULARY_SIZE_FIELD_NUMBER; hash = (53 * hash) + getVocabularySize(); hash = (37 * hash) + DIMENSION_FIELD_NUMBER; hash = (53 * hash) + getDimension(); hash = (37 * hash) + NUM_FEATURES_FIELD_NUMBER; hash = (53 * hash) + getNumFeatures(); if (hasOptimizationParameters()) { hash = (37 * hash) + OPTIMIZATION_PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getOptimizationParameters().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * Description of the various embedding tables.
       * 
* * Protobuf type {@code tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.class, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder.class); } // Construct using tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; vocabularySize_ = 0; dimension_ = 0; numFeatures_ = 0; if (optimizationParametersBuilder_ == null) { optimizationParameters_ = null; } else { optimizationParameters_ = null; optimizationParametersBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getDefaultInstanceForType() { return tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor build() { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor buildPartial() { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor result = new tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor(this); result.name_ = name_; result.vocabularySize_ = vocabularySize_; result.dimension_ = dimension_; result.numFeatures_ = numFeatures_; if (optimizationParametersBuilder_ == null) { result.optimizationParameters_ = optimizationParameters_; } else { result.optimizationParameters_ = optimizationParametersBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor) { return mergeFrom((tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor other) { if (other == tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getVocabularySize() != 0) { setVocabularySize(other.getVocabularySize()); } if (other.getDimension() != 0) { setDimension(other.getDimension()); } if (other.getNumFeatures() != 0) { setNumFeatures(other.getNumFeatures()); } if (other.hasOptimizationParameters()) { mergeOptimizationParameters(other.getOptimizationParameters()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** *
         * Name of the table.
         * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Name of the table.
         * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Name of the table.
         * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
         * Name of the table.
         * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
         * Name of the table.
         * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private int vocabularySize_ ; /** *
         * Size of the vocabulary (i.e., number of rows) in the table.
         * 
* * int32 vocabulary_size = 2; */ public int getVocabularySize() { return vocabularySize_; } /** *
         * Size of the vocabulary (i.e., number of rows) in the table.
         * 
* * int32 vocabulary_size = 2; */ public Builder setVocabularySize(int value) { vocabularySize_ = value; onChanged(); return this; } /** *
         * Size of the vocabulary (i.e., number of rows) in the table.
         * 
* * int32 vocabulary_size = 2; */ public Builder clearVocabularySize() { vocabularySize_ = 0; onChanged(); return this; } private int dimension_ ; /** *
         * The embedding dimension (i.e., the width of the embedding table).
         * 
* * int32 dimension = 3; */ public int getDimension() { return dimension_; } /** *
         * The embedding dimension (i.e., the width of the embedding table).
         * 
* * int32 dimension = 3; */ public Builder setDimension(int value) { dimension_ = value; onChanged(); return this; } /** *
         * The embedding dimension (i.e., the width of the embedding table).
         * 
* * int32 dimension = 3; */ public Builder clearDimension() { dimension_ = 0; onChanged(); return this; } private int numFeatures_ ; /** *
         * Number of features mapped to this table.
         * 
* * int32 num_features = 4; */ public int getNumFeatures() { return numFeatures_; } /** *
         * Number of features mapped to this table.
         * 
* * int32 num_features = 4; */ public Builder setNumFeatures(int value) { numFeatures_ = value; onChanged(); return this; } /** *
         * Number of features mapped to this table.
         * 
* * int32 num_features = 4; */ public Builder clearNumFeatures() { numFeatures_ = 0; onChanged(); return this; } private tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters optimizationParameters_ = null; private com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder> optimizationParametersBuilder_; /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public boolean hasOptimizationParameters() { return optimizationParametersBuilder_ != null || optimizationParameters_ != null; } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters getOptimizationParameters() { if (optimizationParametersBuilder_ == null) { return optimizationParameters_ == null ? tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.getDefaultInstance() : optimizationParameters_; } else { return optimizationParametersBuilder_.getMessage(); } } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public Builder setOptimizationParameters(tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters value) { if (optimizationParametersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } optimizationParameters_ = value; onChanged(); } else { optimizationParametersBuilder_.setMessage(value); } return this; } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public Builder setOptimizationParameters( tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder builderForValue) { if (optimizationParametersBuilder_ == null) { optimizationParameters_ = builderForValue.build(); onChanged(); } else { optimizationParametersBuilder_.setMessage(builderForValue.build()); } return this; } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public Builder mergeOptimizationParameters(tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters value) { if (optimizationParametersBuilder_ == null) { if (optimizationParameters_ != null) { optimizationParameters_ = tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.newBuilder(optimizationParameters_).mergeFrom(value).buildPartial(); } else { optimizationParameters_ = value; } onChanged(); } else { optimizationParametersBuilder_.mergeFrom(value); } return this; } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public Builder clearOptimizationParameters() { if (optimizationParametersBuilder_ == null) { optimizationParameters_ = null; onChanged(); } else { optimizationParameters_ = null; optimizationParametersBuilder_ = null; } return this; } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder getOptimizationParametersBuilder() { onChanged(); return getOptimizationParametersFieldBuilder().getBuilder(); } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ public tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder getOptimizationParametersOrBuilder() { if (optimizationParametersBuilder_ != null) { return optimizationParametersBuilder_.getMessageOrBuilder(); } else { return optimizationParameters_ == null ? tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.getDefaultInstance() : optimizationParameters_; } } /** *
         * Details of the learning algorithm used to update the embedding
         * parameters.
         * 
* * .tensorflow.tpu.OptimizationParameters optimization_parameters = 5; */ private com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder> getOptimizationParametersFieldBuilder() { if (optimizationParametersBuilder_ == null) { optimizationParametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParameters.Builder, tensorflow.tpu.OptimizationParametersOuterClass.OptimizationParametersOrBuilder>( getOptimizationParameters(), getParentForChildren(), isClean()); optimizationParameters_ = null; } return optimizationParametersBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor) private static final tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor(); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TableDescriptor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TableDescriptor(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int TABLE_DESCRIPTOR_FIELD_NUMBER = 1; private java.util.List tableDescriptor_; /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public java.util.List getTableDescriptorList() { return tableDescriptor_; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public java.util.List getTableDescriptorOrBuilderList() { return tableDescriptor_; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public int getTableDescriptorCount() { return tableDescriptor_.size(); } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getTableDescriptor(int index) { return tableDescriptor_.get(index); } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder getTableDescriptorOrBuilder( int index) { return tableDescriptor_.get(index); } public static final int MODE_FIELD_NUMBER = 2; private int mode_; /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public int getModeValue() { return mode_; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode getMode() { @SuppressWarnings("deprecation") tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode result = tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.valueOf(mode_); return result == null ? tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.UNRECOGNIZED : result; } public static final int BATCH_SIZE_PER_TENSOR_CORE_FIELD_NUMBER = 3; private int batchSizePerTensorCore_; /** *
     * Number of samples in each batch of embedding layer activations sent to
     * the TensorCore.
     * 
* * int32 batch_size_per_tensor_core = 3; */ public int getBatchSizePerTensorCore() { return batchSizePerTensorCore_; } public static final int NUM_HOSTS_FIELD_NUMBER = 4; private int numHosts_; /** *
     * Number of TPU hosts used for inference/training.
     * 
* * int32 num_hosts = 4; */ public int getNumHosts() { return numHosts_; } public static final int NUM_TENSOR_CORES_FIELD_NUMBER = 5; private int numTensorCores_; /** *
     * Number of TensorCore used for inference/training.
     * 
* * int32 num_tensor_cores = 5; */ public int getNumTensorCores() { return numTensorCores_; } public static final int SHARDING_STRATEGY_FIELD_NUMBER = 6; private int shardingStrategy_; /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public int getShardingStrategyValue() { return shardingStrategy_; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy getShardingStrategy() { @SuppressWarnings("deprecation") tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy result = tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.valueOf(shardingStrategy_); return result == null ? tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.UNRECOGNIZED : result; } public static final int PIPELINE_EXECUTION_WITH_TENSOR_CORE_FIELD_NUMBER = 7; private boolean pipelineExecutionWithTensorCore_; /** *
     * This parameter determines if the execution of the sparse core will be
     * pipelined with that of the TensorCore. This parameter only affects results
     * when mode=TRAINING. If mode=INFERENCE or BACKWARD_PASS_ONLY, this parameter
     * does not affect execution and hence, is a don't care value.
     * false: The execution of the sparse core is not pipelined with that of the
     * TensorCore. The forward pass of every step on the sparse core is executed
     * only after the backward pass of the previous step is complete. And the
     * backward pass on the sparse core is executed only after the embedding
     * gradients have been computed on the TensorCore on every step. This ensures
     * that the activations on every step observe the gradient updates from the
     * previous step on both the sparse core and the TensorCore.
     * true: The execution of the sparse core is pipelined with that of the
     * TensorCore. The forward pass of every step on the sparse core can be
     * executed after the forward pass of the previous step is complete without
     * waiting for the backward pass. This improves the utilization of the sparse
     * core allowing it to process step N+1 while the embedding gradients for step
     * N are computed on the TensorCore. The backward pass of every step on the
     * sparse core is executed directly after the forward pass for the next step
     * is complete. The drawback is that embedding activations for step N+1 do not
     * observe the embedding gradient updates from step N. This could affect model
     * quality if step N and N+1 involve the same set of embedding IDs. However,
     * since the embedding updates are sparse, this is generally not considered a
     * problem.
     * 
* * bool pipeline_execution_with_tensor_core = 7; */ public boolean getPipelineExecutionWithTensorCore() { return pipelineExecutionWithTensorCore_; } public static final int OUTPUT_LAYOUT_FIELD_NUMBER = 8; private tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout outputLayout_; /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public boolean hasOutputLayout() { return outputLayout_ != null; } /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout getOutputLayout() { return outputLayout_ == null ? tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.getDefaultInstance() : outputLayout_; } /** *
     * Extended output layout information; if not provided, a compatibility mode
     * will use defaults that match the old layout. Providing a value for this
     * field is EXPERIMENTAL and most ways of filling it will probably break. Do
     * not set it unless you know what you are doing.
     * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder getOutputLayoutOrBuilder() { return getOutputLayout(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < tableDescriptor_.size(); i++) { output.writeMessage(1, tableDescriptor_.get(i)); } if (mode_ != tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.UNSPECIFIED.getNumber()) { output.writeEnum(2, mode_); } if (batchSizePerTensorCore_ != 0) { output.writeInt32(3, batchSizePerTensorCore_); } if (numHosts_ != 0) { output.writeInt32(4, numHosts_); } if (numTensorCores_ != 0) { output.writeInt32(5, numTensorCores_); } if (shardingStrategy_ != tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.DIV_DEFAULT.getNumber()) { output.writeEnum(6, shardingStrategy_); } if (pipelineExecutionWithTensorCore_ != false) { output.writeBool(7, pipelineExecutionWithTensorCore_); } if (outputLayout_ != null) { output.writeMessage(8, getOutputLayout()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < tableDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, tableDescriptor_.get(i)); } if (mode_ != tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, mode_); } if (batchSizePerTensorCore_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, batchSizePerTensorCore_); } if (numHosts_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, numHosts_); } if (numTensorCores_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(5, numTensorCores_); } if (shardingStrategy_ != tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.DIV_DEFAULT.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, shardingStrategy_); } if (pipelineExecutionWithTensorCore_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, pipelineExecutionWithTensorCore_); } if (outputLayout_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getOutputLayout()); } 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 tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration)) { return super.equals(obj); } tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration other = (tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration) obj; boolean result = true; result = result && getTableDescriptorList() .equals(other.getTableDescriptorList()); result = result && mode_ == other.mode_; result = result && (getBatchSizePerTensorCore() == other.getBatchSizePerTensorCore()); result = result && (getNumHosts() == other.getNumHosts()); result = result && (getNumTensorCores() == other.getNumTensorCores()); result = result && shardingStrategy_ == other.shardingStrategy_; result = result && (getPipelineExecutionWithTensorCore() == other.getPipelineExecutionWithTensorCore()); result = result && (hasOutputLayout() == other.hasOutputLayout()); if (hasOutputLayout()) { result = result && getOutputLayout() .equals(other.getOutputLayout()); } 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 (getTableDescriptorCount() > 0) { hash = (37 * hash) + TABLE_DESCRIPTOR_FIELD_NUMBER; hash = (53 * hash) + getTableDescriptorList().hashCode(); } hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; hash = (37 * hash) + BATCH_SIZE_PER_TENSOR_CORE_FIELD_NUMBER; hash = (53 * hash) + getBatchSizePerTensorCore(); hash = (37 * hash) + NUM_HOSTS_FIELD_NUMBER; hash = (53 * hash) + getNumHosts(); hash = (37 * hash) + NUM_TENSOR_CORES_FIELD_NUMBER; hash = (53 * hash) + getNumTensorCores(); hash = (37 * hash) + SHARDING_STRATEGY_FIELD_NUMBER; hash = (53 * hash) + shardingStrategy_; hash = (37 * hash) + PIPELINE_EXECUTION_WITH_TENSOR_CORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getPipelineExecutionWithTensorCore()); if (hasOutputLayout()) { hash = (37 * hash) + OUTPUT_LAYOUT_FIELD_NUMBER; hash = (53 * hash) + getOutputLayout().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code tensorflow.tpu.TPUEmbeddingConfiguration} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.TPUEmbeddingConfiguration) tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfigurationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.class, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Builder.class); } // Construct using tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTableDescriptorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (tableDescriptorBuilder_ == null) { tableDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { tableDescriptorBuilder_.clear(); } mode_ = 0; batchSizePerTensorCore_ = 0; numHosts_ = 0; numTensorCores_ = 0; shardingStrategy_ = 0; pipelineExecutionWithTensorCore_ = false; if (outputLayoutBuilder_ == null) { outputLayout_ = null; } else { outputLayout_ = null; outputLayoutBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TpuEmbeddingConfiguration.internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration getDefaultInstanceForType() { return tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration build() { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration buildPartial() { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration result = new tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (tableDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { tableDescriptor_ = java.util.Collections.unmodifiableList(tableDescriptor_); bitField0_ = (bitField0_ & ~0x00000001); } result.tableDescriptor_ = tableDescriptor_; } else { result.tableDescriptor_ = tableDescriptorBuilder_.build(); } result.mode_ = mode_; result.batchSizePerTensorCore_ = batchSizePerTensorCore_; result.numHosts_ = numHosts_; result.numTensorCores_ = numTensorCores_; result.shardingStrategy_ = shardingStrategy_; result.pipelineExecutionWithTensorCore_ = pipelineExecutionWithTensorCore_; if (outputLayoutBuilder_ == null) { result.outputLayout_ = outputLayout_; } else { result.outputLayout_ = outputLayoutBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration) { return mergeFrom((tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration other) { if (other == tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.getDefaultInstance()) return this; if (tableDescriptorBuilder_ == null) { if (!other.tableDescriptor_.isEmpty()) { if (tableDescriptor_.isEmpty()) { tableDescriptor_ = other.tableDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTableDescriptorIsMutable(); tableDescriptor_.addAll(other.tableDescriptor_); } onChanged(); } } else { if (!other.tableDescriptor_.isEmpty()) { if (tableDescriptorBuilder_.isEmpty()) { tableDescriptorBuilder_.dispose(); tableDescriptorBuilder_ = null; tableDescriptor_ = other.tableDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); tableDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTableDescriptorFieldBuilder() : null; } else { tableDescriptorBuilder_.addAllMessages(other.tableDescriptor_); } } } if (other.mode_ != 0) { setModeValue(other.getModeValue()); } if (other.getBatchSizePerTensorCore() != 0) { setBatchSizePerTensorCore(other.getBatchSizePerTensorCore()); } if (other.getNumHosts() != 0) { setNumHosts(other.getNumHosts()); } if (other.getNumTensorCores() != 0) { setNumTensorCores(other.getNumTensorCores()); } if (other.shardingStrategy_ != 0) { setShardingStrategyValue(other.getShardingStrategyValue()); } if (other.getPipelineExecutionWithTensorCore() != false) { setPipelineExecutionWithTensorCore(other.getPipelineExecutionWithTensorCore()); } if (other.hasOutputLayout()) { mergeOutputLayout(other.getOutputLayout()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List tableDescriptor_ = java.util.Collections.emptyList(); private void ensureTableDescriptorIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { tableDescriptor_ = new java.util.ArrayList(tableDescriptor_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder> tableDescriptorBuilder_; /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public java.util.List getTableDescriptorList() { if (tableDescriptorBuilder_ == null) { return java.util.Collections.unmodifiableList(tableDescriptor_); } else { return tableDescriptorBuilder_.getMessageList(); } } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public int getTableDescriptorCount() { if (tableDescriptorBuilder_ == null) { return tableDescriptor_.size(); } else { return tableDescriptorBuilder_.getCount(); } } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor getTableDescriptor(int index) { if (tableDescriptorBuilder_ == null) { return tableDescriptor_.get(index); } else { return tableDescriptorBuilder_.getMessage(index); } } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder setTableDescriptor( int index, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor value) { if (tableDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTableDescriptorIsMutable(); tableDescriptor_.set(index, value); onChanged(); } else { tableDescriptorBuilder_.setMessage(index, value); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder setTableDescriptor( int index, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder builderForValue) { if (tableDescriptorBuilder_ == null) { ensureTableDescriptorIsMutable(); tableDescriptor_.set(index, builderForValue.build()); onChanged(); } else { tableDescriptorBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder addTableDescriptor(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor value) { if (tableDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTableDescriptorIsMutable(); tableDescriptor_.add(value); onChanged(); } else { tableDescriptorBuilder_.addMessage(value); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder addTableDescriptor( int index, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor value) { if (tableDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTableDescriptorIsMutable(); tableDescriptor_.add(index, value); onChanged(); } else { tableDescriptorBuilder_.addMessage(index, value); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder addTableDescriptor( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder builderForValue) { if (tableDescriptorBuilder_ == null) { ensureTableDescriptorIsMutable(); tableDescriptor_.add(builderForValue.build()); onChanged(); } else { tableDescriptorBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder addTableDescriptor( int index, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder builderForValue) { if (tableDescriptorBuilder_ == null) { ensureTableDescriptorIsMutable(); tableDescriptor_.add(index, builderForValue.build()); onChanged(); } else { tableDescriptorBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder addAllTableDescriptor( java.lang.Iterable values) { if (tableDescriptorBuilder_ == null) { ensureTableDescriptorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, tableDescriptor_); onChanged(); } else { tableDescriptorBuilder_.addAllMessages(values); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder clearTableDescriptor() { if (tableDescriptorBuilder_ == null) { tableDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { tableDescriptorBuilder_.clear(); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public Builder removeTableDescriptor(int index) { if (tableDescriptorBuilder_ == null) { ensureTableDescriptorIsMutable(); tableDescriptor_.remove(index); onChanged(); } else { tableDescriptorBuilder_.remove(index); } return this; } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder getTableDescriptorBuilder( int index) { return getTableDescriptorFieldBuilder().getBuilder(index); } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder getTableDescriptorOrBuilder( int index) { if (tableDescriptorBuilder_ == null) { return tableDescriptor_.get(index); } else { return tableDescriptorBuilder_.getMessageOrBuilder(index); } } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public java.util.List getTableDescriptorOrBuilderList() { if (tableDescriptorBuilder_ != null) { return tableDescriptorBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(tableDescriptor_); } } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder addTableDescriptorBuilder() { return getTableDescriptorFieldBuilder().addBuilder( tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.getDefaultInstance()); } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder addTableDescriptorBuilder( int index) { return getTableDescriptorFieldBuilder().addBuilder( index, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.getDefaultInstance()); } /** * repeated .tensorflow.tpu.TPUEmbeddingConfiguration.TableDescriptor table_descriptor = 1; */ public java.util.List getTableDescriptorBuilderList() { return getTableDescriptorFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder> getTableDescriptorFieldBuilder() { if (tableDescriptorBuilder_ == null) { tableDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptor.Builder, tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.TableDescriptorOrBuilder>( tableDescriptor_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); tableDescriptor_ = null; } return tableDescriptorBuilder_; } private int mode_ = 0; /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public int getModeValue() { return mode_; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public Builder setModeValue(int value) { mode_ = value; onChanged(); return this; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode getMode() { @SuppressWarnings("deprecation") tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode result = tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.valueOf(mode_); return result == null ? tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode.UNRECOGNIZED : result; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public Builder setMode(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.Mode value) { if (value == null) { throw new NullPointerException(); } mode_ = value.getNumber(); onChanged(); return this; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.Mode mode = 2; */ public Builder clearMode() { mode_ = 0; onChanged(); return this; } private int batchSizePerTensorCore_ ; /** *
       * Number of samples in each batch of embedding layer activations sent to
       * the TensorCore.
       * 
* * int32 batch_size_per_tensor_core = 3; */ public int getBatchSizePerTensorCore() { return batchSizePerTensorCore_; } /** *
       * Number of samples in each batch of embedding layer activations sent to
       * the TensorCore.
       * 
* * int32 batch_size_per_tensor_core = 3; */ public Builder setBatchSizePerTensorCore(int value) { batchSizePerTensorCore_ = value; onChanged(); return this; } /** *
       * Number of samples in each batch of embedding layer activations sent to
       * the TensorCore.
       * 
* * int32 batch_size_per_tensor_core = 3; */ public Builder clearBatchSizePerTensorCore() { batchSizePerTensorCore_ = 0; onChanged(); return this; } private int numHosts_ ; /** *
       * Number of TPU hosts used for inference/training.
       * 
* * int32 num_hosts = 4; */ public int getNumHosts() { return numHosts_; } /** *
       * Number of TPU hosts used for inference/training.
       * 
* * int32 num_hosts = 4; */ public Builder setNumHosts(int value) { numHosts_ = value; onChanged(); return this; } /** *
       * Number of TPU hosts used for inference/training.
       * 
* * int32 num_hosts = 4; */ public Builder clearNumHosts() { numHosts_ = 0; onChanged(); return this; } private int numTensorCores_ ; /** *
       * Number of TensorCore used for inference/training.
       * 
* * int32 num_tensor_cores = 5; */ public int getNumTensorCores() { return numTensorCores_; } /** *
       * Number of TensorCore used for inference/training.
       * 
* * int32 num_tensor_cores = 5; */ public Builder setNumTensorCores(int value) { numTensorCores_ = value; onChanged(); return this; } /** *
       * Number of TensorCore used for inference/training.
       * 
* * int32 num_tensor_cores = 5; */ public Builder clearNumTensorCores() { numTensorCores_ = 0; onChanged(); return this; } private int shardingStrategy_ = 0; /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public int getShardingStrategyValue() { return shardingStrategy_; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public Builder setShardingStrategyValue(int value) { shardingStrategy_ = value; onChanged(); return this; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy getShardingStrategy() { @SuppressWarnings("deprecation") tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy result = tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.valueOf(shardingStrategy_); return result == null ? tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy.UNRECOGNIZED : result; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public Builder setShardingStrategy(tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration.ShardingStrategy value) { if (value == null) { throw new NullPointerException(); } shardingStrategy_ = value.getNumber(); onChanged(); return this; } /** * .tensorflow.tpu.TPUEmbeddingConfiguration.ShardingStrategy sharding_strategy = 6; */ public Builder clearShardingStrategy() { shardingStrategy_ = 0; onChanged(); return this; } private boolean pipelineExecutionWithTensorCore_ ; /** *
       * This parameter determines if the execution of the sparse core will be
       * pipelined with that of the TensorCore. This parameter only affects results
       * when mode=TRAINING. If mode=INFERENCE or BACKWARD_PASS_ONLY, this parameter
       * does not affect execution and hence, is a don't care value.
       * false: The execution of the sparse core is not pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core is executed
       * only after the backward pass of the previous step is complete. And the
       * backward pass on the sparse core is executed only after the embedding
       * gradients have been computed on the TensorCore on every step. This ensures
       * that the activations on every step observe the gradient updates from the
       * previous step on both the sparse core and the TensorCore.
       * true: The execution of the sparse core is pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core can be
       * executed after the forward pass of the previous step is complete without
       * waiting for the backward pass. This improves the utilization of the sparse
       * core allowing it to process step N+1 while the embedding gradients for step
       * N are computed on the TensorCore. The backward pass of every step on the
       * sparse core is executed directly after the forward pass for the next step
       * is complete. The drawback is that embedding activations for step N+1 do not
       * observe the embedding gradient updates from step N. This could affect model
       * quality if step N and N+1 involve the same set of embedding IDs. However,
       * since the embedding updates are sparse, this is generally not considered a
       * problem.
       * 
* * bool pipeline_execution_with_tensor_core = 7; */ public boolean getPipelineExecutionWithTensorCore() { return pipelineExecutionWithTensorCore_; } /** *
       * This parameter determines if the execution of the sparse core will be
       * pipelined with that of the TensorCore. This parameter only affects results
       * when mode=TRAINING. If mode=INFERENCE or BACKWARD_PASS_ONLY, this parameter
       * does not affect execution and hence, is a don't care value.
       * false: The execution of the sparse core is not pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core is executed
       * only after the backward pass of the previous step is complete. And the
       * backward pass on the sparse core is executed only after the embedding
       * gradients have been computed on the TensorCore on every step. This ensures
       * that the activations on every step observe the gradient updates from the
       * previous step on both the sparse core and the TensorCore.
       * true: The execution of the sparse core is pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core can be
       * executed after the forward pass of the previous step is complete without
       * waiting for the backward pass. This improves the utilization of the sparse
       * core allowing it to process step N+1 while the embedding gradients for step
       * N are computed on the TensorCore. The backward pass of every step on the
       * sparse core is executed directly after the forward pass for the next step
       * is complete. The drawback is that embedding activations for step N+1 do not
       * observe the embedding gradient updates from step N. This could affect model
       * quality if step N and N+1 involve the same set of embedding IDs. However,
       * since the embedding updates are sparse, this is generally not considered a
       * problem.
       * 
* * bool pipeline_execution_with_tensor_core = 7; */ public Builder setPipelineExecutionWithTensorCore(boolean value) { pipelineExecutionWithTensorCore_ = value; onChanged(); return this; } /** *
       * This parameter determines if the execution of the sparse core will be
       * pipelined with that of the TensorCore. This parameter only affects results
       * when mode=TRAINING. If mode=INFERENCE or BACKWARD_PASS_ONLY, this parameter
       * does not affect execution and hence, is a don't care value.
       * false: The execution of the sparse core is not pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core is executed
       * only after the backward pass of the previous step is complete. And the
       * backward pass on the sparse core is executed only after the embedding
       * gradients have been computed on the TensorCore on every step. This ensures
       * that the activations on every step observe the gradient updates from the
       * previous step on both the sparse core and the TensorCore.
       * true: The execution of the sparse core is pipelined with that of the
       * TensorCore. The forward pass of every step on the sparse core can be
       * executed after the forward pass of the previous step is complete without
       * waiting for the backward pass. This improves the utilization of the sparse
       * core allowing it to process step N+1 while the embedding gradients for step
       * N are computed on the TensorCore. The backward pass of every step on the
       * sparse core is executed directly after the forward pass for the next step
       * is complete. The drawback is that embedding activations for step N+1 do not
       * observe the embedding gradient updates from step N. This could affect model
       * quality if step N and N+1 involve the same set of embedding IDs. However,
       * since the embedding updates are sparse, this is generally not considered a
       * problem.
       * 
* * bool pipeline_execution_with_tensor_core = 7; */ public Builder clearPipelineExecutionWithTensorCore() { pipelineExecutionWithTensorCore_ = false; onChanged(); return this; } private tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout outputLayout_ = null; private com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder> outputLayoutBuilder_; /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public boolean hasOutputLayout() { return outputLayoutBuilder_ != null || outputLayout_ != null; } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout getOutputLayout() { if (outputLayoutBuilder_ == null) { return outputLayout_ == null ? tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.getDefaultInstance() : outputLayout_; } else { return outputLayoutBuilder_.getMessage(); } } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public Builder setOutputLayout(tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout value) { if (outputLayoutBuilder_ == null) { if (value == null) { throw new NullPointerException(); } outputLayout_ = value; onChanged(); } else { outputLayoutBuilder_.setMessage(value); } return this; } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public Builder setOutputLayout( tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder builderForValue) { if (outputLayoutBuilder_ == null) { outputLayout_ = builderForValue.build(); onChanged(); } else { outputLayoutBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public Builder mergeOutputLayout(tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout value) { if (outputLayoutBuilder_ == null) { if (outputLayout_ != null) { outputLayout_ = tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.newBuilder(outputLayout_).mergeFrom(value).buildPartial(); } else { outputLayout_ = value; } onChanged(); } else { outputLayoutBuilder_.mergeFrom(value); } return this; } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public Builder clearOutputLayout() { if (outputLayoutBuilder_ == null) { outputLayout_ = null; onChanged(); } else { outputLayout_ = null; outputLayoutBuilder_ = null; } return this; } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder getOutputLayoutBuilder() { onChanged(); return getOutputLayoutFieldBuilder().getBuilder(); } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ public tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder getOutputLayoutOrBuilder() { if (outputLayoutBuilder_ != null) { return outputLayoutBuilder_.getMessageOrBuilder(); } else { return outputLayout_ == null ? tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.getDefaultInstance() : outputLayout_; } } /** *
       * Extended output layout information; if not provided, a compatibility mode
       * will use defaults that match the old layout. Providing a value for this
       * field is EXPERIMENTAL and most ways of filling it will probably break. Do
       * not set it unless you know what you are doing.
       * 
* * .tensorflow.tpu.TPUEmbeddingOutputLayout output_layout = 8; */ private com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder> getOutputLayoutFieldBuilder() { if (outputLayoutBuilder_ == null) { outputLayoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayout.Builder, tensorflow.tpu.TpuEmbeddingOutputLayout.TPUEmbeddingOutputLayoutOrBuilder>( getOutputLayout(), getParentForChildren(), isClean()); outputLayout_ = null; } return outputLayoutBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.TPUEmbeddingConfiguration) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.TPUEmbeddingConfiguration) private static final tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration(); } public static tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TPUEmbeddingConfiguration parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TPUEmbeddingConfiguration(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TpuEmbeddingConfiguration.TPUEmbeddingConfiguration getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n>tensorflow/contrib/tpu/proto/tpu_embed" + "ding_configuration.proto\022\016tensorflow.tpu" + "\032:tensorflow/contrib/tpu/proto/optimizat" + "ion_parameters.proto\032>tensorflow/contrib" + "/tpu/proto/tpu_embedding_output_layout.p" + "roto\"\355\005\n\031TPUEmbeddingConfiguration\022S\n\020ta" + "ble_descriptor\030\001 \003(\01329.tensorflow.tpu.TP" + "UEmbeddingConfiguration.TableDescriptor\022" + "<\n\004mode\030\002 \001(\0162..tensorflow.tpu.TPUEmbedd" + "ingConfiguration.Mode\022\"\n\032batch_size_per_" + "tensor_core\030\003 \001(\005\022\021\n\tnum_hosts\030\004 \001(\005\022\030\n\020" + "num_tensor_cores\030\005 \001(\005\022U\n\021sharding_strat" + "egy\030\006 \001(\0162:.tensorflow.tpu.TPUEmbeddingC" + "onfiguration.ShardingStrategy\022+\n#pipelin" + "e_execution_with_tensor_core\030\007 \001(\010\022?\n\rou" + "tput_layout\030\010 \001(\0132(.tensorflow.tpu.TPUEm" + "beddingOutputLayout\032\252\001\n\017TableDescriptor\022" + "\014\n\004name\030\001 \001(\t\022\027\n\017vocabulary_size\030\002 \001(\005\022\021" + "\n\tdimension\030\003 \001(\005\022\024\n\014num_features\030\004 \001(\005\022" + "G\n\027optimization_parameters\030\005 \001(\0132&.tenso" + "rflow.tpu.OptimizationParameters\"L\n\004Mode" + "\022\017\n\013UNSPECIFIED\020\000\022\r\n\tINFERENCE\020\001\022\014\n\010TRAI" + "NING\020\002\022\026\n\022BACKWARD_PASS_ONLY\020\003\",\n\020Shardi" + "ngStrategy\022\017\n\013DIV_DEFAULT\020\000\022\007\n\003MOD\020\001b\006pr" + "oto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { tensorflow.tpu.OptimizationParametersOuterClass.getDescriptor(), tensorflow.tpu.TpuEmbeddingOutputLayout.getDescriptor(), }, assigner); internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor, new java.lang.String[] { "TableDescriptor", "Mode", "BatchSizePerTensorCore", "NumHosts", "NumTensorCores", "ShardingStrategy", "PipelineExecutionWithTensorCore", "OutputLayout", }); internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor = internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_descriptor.getNestedTypes().get(0); internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_TPUEmbeddingConfiguration_TableDescriptor_descriptor, new java.lang.String[] { "Name", "VocabularySize", "Dimension", "NumFeatures", "OptimizationParameters", }); tensorflow.tpu.OptimizationParametersOuterClass.getDescriptor(); tensorflow.tpu.TpuEmbeddingOutputLayout.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy