refinenet-pytorch icon indicating copy to clipboard operation
refinenet-pytorch copied to clipboard

run example on CPU

Open rokopi-byte opened this issue 5 years ago • 1 comments

First of all thanks for the code. I'm just starting to play around with these things and find very useful. Just one thing.. to run on CPU I had to add this parameter map_location='cpu' to function load_state_dict of resnet.py, otherwise the notebook will give error on deserialization.(cell 5) and also removed ".cuda()" from here:

        segm = mnet.cuda()(img_inp)[0].data.cpu().numpy().transpose(1, 2, 0)

Is this correct or I miss something ?

rokopi-byte avatar Jul 16 '19 22:07 rokopi-byte

I want it runs on cpu using on Windows 10, and find the similar problems as @roccopietrini described above

hitbuyi avatar Nov 10 '21 02:11 hitbuyi