Closed zhhsf closed 4 years ago
hi, you can remove all the model.cuda() lines, then the model will run with CPU automatically. E.g.
model = SFCN()
model = torch.nn.DataParallel(model)
fp_ = './brain_age/run_20190719_00_epoch_best_mae.p'
model.load_statedict(torch.load(fp))
model.cuda()
Thanks for your reply. But the result of cpu vesion is not reproducible as cuda version.
model = SFCN() model = torch.nn.DataParallel(model) fp_ = './brain_age/run_20190719_00_epoch_bestmae.p' checkpoint = torch.load(fp,map_location='cpu') model.load_state_dict(checkpoint)
Could you please give more details about the issue? Do you mean the CPU version does not perform well in UK Biobank data? Or there are some error messages?
I assume it is the 'CPU tensor broadcasting' bug? Fixed now ;) https://github.com/ha-ha-ha-han/UKBiobank_deep_pretrain/blob/master/examples.ipynb
Hi, This toolbox is wonderful and really fast . Would you please provide a cpu version of it ?