Embedding bag with concatenation

Hi,

Imagine for a single data point you have a LongTensor e.g. [0, 1, 1, 2, 1, 3] of length k and you want to embed each of them (similar with a codebook) so that each entry contributes an embedding vector to the total representation.

For now EmbeddingBag allows you only to have max,mean or average of elements.
Why doesn’t it support concatenation, so that if each element outputs a vector of dimension d the whole output will be kd? (, k → *, k.d)

Is there an efficient workaround this?

Thanks,