For example if i use scatter_add():
vocab_dist  = output_layer(hiddens)  # output layer is linear layer and output size: [batch_size, 50000]
scores = torch.randn(16, 400)   # [batch size, number of time steps]
indices = torch.randint(0, 50000, (16, 400))   # [batch_size, number of steps]
final_dist = vocab_dist.scatter_add(1, indices, scores)

Instead of adding up, I want to use max.