attempting to deserialize object on a cuda device but torch.cuda.is_available() is false

raise RuntimeError('Attempting to deserialize object on a CUDA ’
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device(‘cpu’) to map your storages to the CPU.

Are you sure you have access to the GPU from Pytorch?
Try this short script to check it:

import torch
gpu_tensor = torch.ones((10)).cuda()

thank you a lot for your help. Let me try it.