


input = torch.LongTensor([[0, 2, 0, 5]])
      >>> embedding(input)
      tensor([[[ 0.0000,  0.0000,  0.0000],
               [ 0.1535, -2.0309,  0.9315],
               [ 0.0000,  0.0000,  0.0000],
               [-0.1655,  0.9897,  0.0635]]])



  >>> # example of changing `pad` vector
  >>> padding_idx = 0
  >>> embedding = nn.Embedding(3, 3, padding_idx=padding_idx)
  >>> embedding.weight
  Parameter containing:
  tensor([[ 0.0000,  0.0000,  0.0000],
          [-0.7895, -0.7089, -0.0364],
          [ 0.6778,  0.5803,  0.2678]], requires_grad=True)
  >>> with torch.no_grad():
  ...     embedding.weight[padding_idx] = torch.ones(3)
  >>> embedding.weight
  Parameter containing:
  tensor([[ 1.0000,  1.0000,  1.0000],
          [-0.7895, -0.7089, -0.0364],
          [ 0.6778,  0.5803,  0.2678]], requires_grad=True)
