[ 1.1306, -2.5798, -1.0044]])
  >>> # Example with padding_idx
  >>> embedding_sum = nn.EmbeddingBag(10, 3, mode='sum', padding_idx=2)
  >>> input = torch.tensor([2, 2, 2, 2, 4, 3, 2, 9], dtype=torch.long)
  >>> offsets = torch.tensor([0, 4], dtype=torch.long)
  >>> embedding_sum(input, offsets)
  tensor([[ 0.0000,  0.0000,  0.0000],
          [-0.7082,  3.2145, -2.6251]])

  >>> # An EmbeddingBag can be loaded from an Embedding like so
  >>> embedding = nn.Embedding(10, 3, padding_idx=2)
  >>> embedding_sum = nn.EmbeddingBag.from_pretrained(
          embedding.weight,
          padding_idx=embedding.padding_idx,
          mode='sum')

forward(input, offsets=None, per_sample_weights=None)
  Forward pass of EmbeddingBag.

  Parameters:
     * **input** (*Tensor*) -- Tensor containing bags of indices
       into the embedding matrix.

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