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.