Transfer tensor to CUDA


I’ve trained my model with CUDA, than trying to evaluate it and test 1 image. But when I’m trying to transfer img tensor to CUDA, happens nothing. What can it be?

CFG.device = ‘cuda:0’

print (img_tensor.is_cuda)
-False

Was your setup working before using the GPU?
Could you post the output of python -m torch.utis.collect_env?


here it is

Did you mix the pip wheels with conda binaries?
If so, either uninstall every torch-related package in your current environment and install a single binary or create a new and empty virtual environment and reinstall PyTorch there.


In such way?
Or pytorch-cuda and pytorch-mutex too?