[Solved] RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors

Error reporting reason:

Probably because: the code has a place where the array is out of bounds. The blind guess is in the cross entropy loss function. I’m here anyway.

Small probability is another reason. However, the following solutions are generic.

run device = “CPU” first. You can locate where the array is out of bounds and modify the code. Make sure it is correct before running on the GPU.

Read More: