Hey,
Thanks for the reply 
But, it still throws the same error.

Traceback (most recent call last):
File “finetune.py”, line 253, in 
main()
File “finetune.py”, line 92, in main
checkpoint = torch.load(args.pretrained)
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 702, in _legacy_load
result = unpickler.load()
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 665, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 156, in default_restore_location
result = fn(storage, location)
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 132, in _cuda_deserialize
device = validate_cuda_device(location)
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/torch/serialization.py”, line 116, in validate_cuda_device
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.