SaoYan / DnCNN-PyTorch

PyTorch implementation of the TIP2017 paper "Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising"
http://ieeexplore.ieee.org/document/7839189/
GNU General Public License v3.0
407 stars 117 forks source link

Testing DnCNN on CPU #1

Closed TouqeerAhmad closed 6 years ago

TouqeerAhmad commented 6 years ago

Hi SaoYan,

Thank you for sharing your codes at GitHub! I was trying to test the model on my Mac machine -- but I am having issue with it, can you please advise as how to proceed with that. The models have been trained using GPU and I am trying on CPU -- so it is causing problem when I try to load the model. I am a newbie to PyTorch, any help in this regards will be great.

Thanks, Touqeer

TouqeerAhmad commented 6 years ago

got some help from elsewhere, thank you for your time, below is what I did -- in case if somebody had the same issue

model.load_state_dict(torch.load('logs/DnCNN-S-15/net.pth', map_location=lambda storage, loc: storage))