huochaitiantang / pytorch-deep-image-matting

Pytorch implementation of deep image matting
294 stars 71 forks source link

Can I run this without CUDA? #38

Open codingdudecom opened 4 years ago

codingdudecom commented 4 years ago

Hi,

I'm trying to run this without CUDA. I got this error:

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.

But when I try to use it with map_location=torch.device('cpu') then I get RuntimeError: Error(s) in loading state_dict for VGG16: size mismatch for conv6_1.weight: copying a param with shape torch.Size([512, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]).

Am I going about this wrong? Please help