Class ov::op::v15::EmbeddingBagPacked#

class EmbeddingBagPacked : public ov::op::util::EmbeddingBagPackedBase#

Returns embeddings for given indices.

Public Functions

EmbeddingBagPacked() = default#

Constructs a EmbeddingBagPacked operation.

EmbeddingBagPacked(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &per_sample_weights, const Reduction &reduction = Reduction::SUM)#

Constructs a EmbeddingBagPacked operation.

EmbeddingBagPacked constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

  • emb_tableTensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • indicesTensor of shape [batch, indices_per_bag] and of type T_IND. Required.

  • per_sample_weigths – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.