operation, "self" is updated as:
  self[index[i][j][k]][j][k] *= src[i][j][k]  # if dim == 0
  self[i][index[i][j][k]][k] *= src[i][j][k]  # if dim == 1
  self[i][j][index[i][j][k]] *= src[i][j][k]  # if dim == 2

Reducing with the addition operation is the same as using
   "scatter_add_()".
Parameters:
      * dim (int) -- the axis along which to index
  * **index** (*LongTensor*) -- the indices of elements to
    scatter, can be either empty or of the same dimensionality as
    "src". When empty, the operation returns "self" unchanged.

  * **src** (*Tensor** or **float*) -- the source element(s) to
    scatter.

  * **reduce** (*str**, **optional*) -- reduction operation to
    apply, can be either "'add'" or "'multiply'".

Example:
  >>> src = torch.arange(1, 11).reshape((2, 5))
  >>> src
  tensor([[ 1,  2,  3,  4,  5],
          [ 6,  7,  8,  9, 10]])
  >>> index = torch.tensor([[0, 1, 2, 0]])
