zoogzog / chexnet

Implementation of the CheXNet network (PyTorch)
211 stars 94 forks source link

Is it possible to run on CPU only? (non-CUDA) #1

Closed taewookim closed 6 years ago

taewookim commented 6 years ago

which parts would I have to modify to run the model on CPU only? (Sorry, relatively new to pytorch)

zoogzog commented 6 years ago

I would assume, that it is possible to run on CPU only. I am not proficient in pytorch myself, but I think removing all model = torch.nn.DataParallel(model).cuda() and .cuda() in the code should do the trick.

zoumt1633 commented 6 years ago

just remove all .cuda(), and keep model = torch.nn.DataParallel(model).