torch.nn.functional.embedding_bag
torch.nn.functional.embedding_bag(input, weight, offsets=None, max_norm=None, norm_type=2, scale_grad_by_freq=False, mode='mean', sparse=False, per_sample_weights=None, include_last_offset=False, padding_idx=None)
Computes sums, means or maxes of bags of embeddings, without
   instantiating the intermediate embeddings.
See "torch.nn.EmbeddingBag" for more details.
Note:
 This operation may produce nondeterministic gradients when given
 tensors on a CUDA device. See Reproducibility for more
 information.

Parameters:
      * input (LongTensor) -- Tensor containing bags of indices
        into the embedding matrix
  * **weight** (*Tensor*) -- The embedding matrix with number of
    rows equal to the maximum possible index + 1, and number of
    columns equal to the embedding size

  * **offsets** (*LongTensor**, **optional*) -- Only used when
