# tensorplay.nn.functional.embedding_bag Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.embedding_bag.html ```python 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 ``` Compute sums, means or maxes of bags of embeddings. 1-D inputs with offsets (incl. include_last_offset), fixed length 2-D inputs, per_sample_weights (sum mode), padding_idx exclusion and max_norm renormalization. See tensorplay.nn.EmbeddingBag for details.