latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.nn.functional.embedding_bag
- tensorplay.nn.functional.embedding_bag(input: Tensor, weight: Tensor, offsets=None, max_norm=None, norm_type: float = 2, scale_grad_by_freq: bool = False, mode: str = 'mean', sparse: bool = False, per_sample_weights=None, include_last_offset: bool = False, padding_idx=None) Tensor[source]
Compute sums, means or maxes of
bagsof embeddings.1-D inputs with
offsets(incl.include_last_offset), fixed length 2-D inputs,per_sample_weights(sum mode),padding_idxexclusion andmax_normrenormalization. Seetensorplay.nn.EmbeddingBagfor details.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

