Class ov::op::v3::EmbeddingBagOffsetsSum#

class EmbeddingBagOffsetsSum : public ov::op::util::EmbeddingBagOffsetsBase#

Returns embeddings for given indices.

Public Functions

EmbeddingBagOffsetsSum() = default#

Constructs a EmbeddingBagOffsetsSum operation.

EmbeddingBagOffsetsSum(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &offsets, const Output<Node> &default_index, const Output<Node> &per_sample_weights)#

Constructs a EmbeddingBagOffsetsSum operation.

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

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

  • indices – tensor of shape [num_indices] and of type T_IND. Required

  • offsets – tensor of shape [batch] and of type T_IND containing the starting index positions of each “bag” in indices. Required.

  • default_index – scalar of type T_IND containing default index in embedding table to fill empty “bags”. If not provided empty “bags” are filled with zeros. Optional.

  • per_sample_weights – 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.