Skip to content

[Proposal] Max mode for EmbeddingBag #4762

@EthanSteinberg

Description

@EthanSteinberg

The EmbeddingBag interface is quite neat and efficient for dealing with large variable length sequences of embeddings. However, there is one issue with the class in that it doesn't support taking the max over the embeddings (currently only mean and sum are supported).

Would a PR that implements a max mode be appreciated? Are there any potential issues which would get in the way of implementing a max for EmbeddingBag? I assume the resulting API change would just be a new mode "max" for the EmbeddingBag constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions