Closed leijue222 closed 4 years ago
My GPU is GTX 950M.
The memory is too small and needs to be switched to the CPU to predict.
https://github.com/poppinace/indexnet_matting/blob/867720dee1bc74212ec77bf2ad1c43af3bbc1c8f/scripts/demo.py#L45
change to:
checkpoint = torch.load(RESTORE_FROM, map_location='cpu')
https://github.com/poppinace/indexnet_matting/blob/867720dee1bc74212ec77bf2ad1c43af3bbc1c8f/scripts/demo.py#L91
change to:
inputs = inputs.cpu()
Question: when I run
demo.py
https://github.com/poppinace/indexnet_matting/blob/867720dee1bc74212ec77bf2ad1c43af3bbc1c8f/scripts/demo.py#L45 Error will be reported when loading the model. Reason The relative path of pretrained and example is wrong.