EnqueueTPUEmbeddingBatch

public final class EnqueueTPUEmbeddingBatch

An op that enqueues a list of input batch tensors to TPUEmbedding.

An op that enqueues a list of input batch tensors to TPUEmbedding.

Nested Classes

class EnqueueTPUEmbeddingBatch.Options Optional attributes for EnqueueTPUEmbeddingBatch  

Public Methods

static EnqueueTPUEmbeddingBatch.Options
combiners(List<String> combiners)
static EnqueueTPUEmbeddingBatch
create(Scope scope, Iterable<Operand<String>> batch, Operand<String> modeOverride, Options... options)
Factory method to create a class wrapping a new EnqueueTPUEmbeddingBatch operation.
static EnqueueTPUEmbeddingBatch.Options
deviceOrdinal(Long deviceOrdinal)

Inherited Methods

Public Methods

public static EnqueueTPUEmbeddingBatch.Options combiners (List<String> combiners)

Parameters
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 EnqueueTPUEmbeddingBatch create (Scope scope, Iterable<Operand<String>> batch, Operand<String> modeOverride, Options... options)

Factory method to create a class wrapping a new EnqueueTPUEmbeddingBatch operation.

Parameters
scope current scope
batch A list of 1D tensors, one for each embedding table, containing the batch inputs encoded as dist_belief.SparseFeatures protos. If the weight field in the SparseFeatures proto is not populated for an ID, a weight of 1.0 is assumed.
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 attributes values
Returns
  • a new instance of EnqueueTPUEmbeddingBatch

public static EnqueueTPUEmbeddingBatch.Options deviceOrdinal (Long deviceOrdinal)

Parameters
deviceOrdinal The TPU device to use. This should be -1 when the Op is running on a TPU device, and >= 0 when the Op is running on the CPU device.