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

added support for running demos on CPU when no CUDA devices are found

Open glhr opened this issue 5 years ago • 1 comments

The current demo implementation gives an AssertionError when no NVidia driver is found. I replaced .cuda() with .to(device=torch.device('cuda' if torch.cuda.is_available() else 'cpu')) so that the image and webcam demos can be run on CPU when no CUDA device is found.

glhr avatar Sep 26 '20 11:09 glhr

Works great, thank you!!

HanClinto avatar Jun 07 '23 23:06 HanClinto