public final class TPUEmbeddingActivations extends PrimitiveOp implements Operand<Float>
This op simply returns its first input, which is assumed to have been sliced from the Tensors returned by TPUEmbeddingDequeueActivations. The presence of this op, and its first argument being a trainable Variable, enables automatic differentiation of graphs containing embeddings via the TPU Embedding Python libraries.
operation
Modifier and Type | Method and Description |
---|---|
Output<Float> |
asOutput()
Returns the symbolic handle of a tensor.
|
static TPUEmbeddingActivations |
create(Scope scope,
Operand<Float> embeddingVariable,
Operand<Float> slicedActivations,
Long tableId,
Long lookupId)
Factory method to create a class wrapping a new TPUEmbeddingActivations operation.
|
Output<Float> |
output() |
equals, hashCode, op, toString
public static TPUEmbeddingActivations create(Scope scope, Operand<Float> embeddingVariable, Operand<Float> slicedActivations, Long tableId, Long lookupId)
scope
- current scopeembeddingVariable
- A trainable variable, enabling optimizers to find this op.slicedActivations
- The embedding activations Tensor to return.tableId
- The id of the table in the embedding layer configuration from which
these activations were computed.lookupId
- Identifier of the set of embedding indices which produced these
activations.public Output<Float> asOutput()
Operand
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput
in interface Operand<Float>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.