Alternative(s) to scatter_nd when there are duplicate indices

Hi all,

I am looking for an MxNet solution to PyTorch’s scatter_add, for which I know there are similar threads on this Forum. My current solution after browsing through them was to use scatter_nd and then broadcast_add.

However, none of the solutions address the correctness of the gradient computation when using scatter_nd with duplicate indices. There are duplicate indices in my data, and I suspect this is one of reasons making my training so unstable.

Ultimately I am wondering what useful alternatives to scatter_nd there are in MxNet that can handle duplicate indices.