public final class EnqueueTPUEmbeddingSparseBatch extends RawOp
The tensors at corresponding positions in the three input lists must have the same shape, i.e. rank 1 with dim_size() equal to the total number of lookups into the table described by the corresponding table_id.
Modifier and Type | Class and Description |
---|---|
static class |
EnqueueTPUEmbeddingSparseBatch.Inputs |
static class |
EnqueueTPUEmbeddingSparseBatch.Options
Optional attributes for
EnqueueTPUEmbeddingSparseBatch |
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME
The name of this op, as known by TensorFlow core engine
|
Constructor and Description |
---|
EnqueueTPUEmbeddingSparseBatch(Operation operation) |
Modifier and Type | Method and Description |
---|---|
static EnqueueTPUEmbeddingSparseBatch.Options |
combiners(List<String> combiners)
Sets the combiners option.
|
static EnqueueTPUEmbeddingSparseBatch.Options |
combiners(String... combiners)
Sets the combiners option.
|
static EnqueueTPUEmbeddingSparseBatch |
create(Scope scope,
Iterable<Operand<? extends TNumber>> sampleIndices,
Iterable<Operand<? extends TNumber>> embeddingIndices,
Iterable<Operand<? extends TNumber>> aggregationWeights,
Operand<TString> modeOverride,
EnqueueTPUEmbeddingSparseBatch.Options... options)
Factory method to create a class wrapping a new EnqueueTPUEmbeddingSparseBatch operation.
|
static EnqueueTPUEmbeddingSparseBatch.Options |
deviceOrdinal(Long deviceOrdinal)
Sets the deviceOrdinal option.
|
public static final String OP_NAME
public EnqueueTPUEmbeddingSparseBatch(Operation operation)
@Endpoint(describeByClass=true) public static EnqueueTPUEmbeddingSparseBatch create(Scope scope, Iterable<Operand<? extends TNumber>> sampleIndices, Iterable<Operand<? extends TNumber>> embeddingIndices, Iterable<Operand<? extends TNumber>> aggregationWeights, Operand<TString> modeOverride, EnqueueTPUEmbeddingSparseBatch.Options... options)
scope
- current scopesampleIndices
- A list of rank 1 Tensors specifying the training example and
feature to which the corresponding embedding_indices and aggregation_weights
values belong. sample_indices[i] must equal b * nf + f, where nf is the
number of features from the corresponding table, f is in [0, nf), and
b is in [0, batch size).embeddingIndices
- A list of rank 1 Tensors, indices into the embedding tables.aggregationWeights
- A list of rank 1 Tensors containing per sample -- i.e. per
(training example, feature) -- aggregation weights.modeOverride
- A string input that overrides the mode specified in the
TPUEmbeddingConfiguration. Supported values are {'unspecified', 'inference',
'training', 'backward_pass_only'}. When set to 'unspecified', the mode set
in TPUEmbeddingConfiguration is used, otherwise mode_override is used.options
- carries optional attribute valuespublic static EnqueueTPUEmbeddingSparseBatch.Options deviceOrdinal(Long deviceOrdinal)
deviceOrdinal
- The TPU device to use. Should be >= 0 and less than the number
of TPU cores in the task on which the node is placed.public static EnqueueTPUEmbeddingSparseBatch.Options combiners(List<String> combiners)
combiners
- A list of string scalars, one for each embedding table that specify
how to normalize the embedding activations after weighted summation.
Supported combiners are 'mean', 'sum', or 'sqrtn'. It is invalid to have
the sum of the weights be 0 for 'mean' or the sum of the squared weights be
0 for 'sqrtn'. If combiners isn't passed, the default is to use 'sum' for
all tables.public static EnqueueTPUEmbeddingSparseBatch.Options combiners(String... combiners)
combiners
- A list of string scalars, one for each embedding table that specify
how to normalize the embedding activations after weighted summation.
Supported combiners are 'mean', 'sum', or 'sqrtn'. It is invalid to have
the sum of the weights be 0 for 'mean' or the sum of the squared weights be
0 for 'sqrtn'. If combiners isn't passed, the default is to use 'sum' for
all tables.Copyright © 2015–2022. All rights reserved.