Values with the same index in a sparse tensor are accumulated when  use torch.cuda.sparse.FloatTensor(i, v, torch.Size([2,3])).to_dense().
How to only remain the max value when  convert the sparse tensor to an dense one.
Any tricks to implement this?
Specifically,
indices = torch.cuda.LongTensor([[0, 1, 0], [2, 0, 2]])
values = torch.cuda.FloatTensor([3, 4, 5])
t = torch.cuda.sparse.FloatTensor(i, v, torch.Size([2,3])).to_dense()
then
t’s values are [[ 0  0  5],[  4  0  0]] rather than [[ 0  0  8],[  4  0  0]].