I had similar RuntimeError, but when I changed the device to “CPU” the error became " Expected float got double", which means that the model and inputs weren’t the same type, after I changed this. The problem is solved and I got back to cuda again.