It’s extremely strange for me. I just added a cuda check in the top of my code like that:
import ......

print(torch.cuda.is_available())

...
...
...

And the error vanished with my code running normally… Does anyone know what’s the matter? And I never add such a check before when it could still run normally.