Error on a CPU-only machine
stg101 opened this issue · 1 comments
stg101 commented
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='cpu' to map your storages to the CPU.
According to the torch doc it is needed to provide a map_location
when a gpu saved model is loaded on a cpu.
Changing line 76 in trackers/tracker.py solves the problem :
model.load_state_dict(torch.load(model_path, map_location=('cpu'
if str(self.device) == 'cpu' else None)))
xl-sr commented
thanks! its updated now