When I use torch.topk to get the index, I find that the program will stop quickly after several training iters because of Pyorch-CUDA error: device-side assert triggered, THCTensorScatterGather, Assertion indexValue failed.
I printed the index and found sometimes torch.topk will get a very large number such as tensor(9223372034707292159, device=‘cuda:0’) and as a results, the program cannot get the corresponeding data by this large index. How to solve this overlflow problem?