I am trying to run inference with a model on a device which only has access to CPU. I am loading the model in with:
gtf = torch.load(model_dir, map_location=torch.device(“cpu”))
But I get a Runtime Error saying:
RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu.
How do I get it to stop using Cuda for this operation?
My eventual goal is to run this on an android device using chaquopy so I will not be able to use Cuda at all.