CUDA上数组越界
CUDA上是无法给出数组越界的报错的,切换到CPU跑就可以了:
you are giving an out of bounds index somewhere.
Can you reproduce this error with a small snippet?
Usually these device-side asserts are easier to debug if you run the same code on CPU (i.e. without .cuda()) and you know right away what the out of bounds indices are and where they’re coming from.
https://discuss.pytorch.org/t/solved-assertion-srcindex-srcselectdimsize-failed-on-gpu-for-torch-cat/1804/7