RuntimeError: CUDA error:device.side assert triggered(tensor形状有误)

报错如下:

RuntimeError: CUDA error:device.side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.

后面经过检查发现,是进行计算的时候维度弄错了,下次遇到这个问题可以试着回去检查数据形状是否正确。

你可能感兴趣的:(cuda)