I solved that issue by putting inputs.to(device)
It ran fine for one time. But then it gives the error “RuntimeError: CUDA error: device-side assert triggered”. And it is pointing to where I put “inputs.to(device)”.