Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

part2v3: CPU-only still supported or GPU is now mandatory? #87

Closed
cluePrints opened this issue Apr 15, 2019 · 1 comment
Closed

part2v3: CPU-only still supported or GPU is now mandatory? #87

cluePrints opened this issue Apr 15, 2019 · 1 comment

Comments

@cluePrints
Copy link

Would you be open to a PR allowing CPU-only people to run the code with no changes or that's out of scope and GPU is a prereq?

/content/exp/nb_08.py in <module>()
    205 _m = tensor([0.47, 0.48, 0.45])
    206 _s = tensor([0.29, 0.28, 0.30])
--> 207 norm_imagenette = partial(normalize_chan, mean=_m.cuda(), std=_s.cuda())
    208 
    209 import math

/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py in _lazy_init()
    160             "Cannot re-initialize CUDA in forked subprocess. " + msg)
    161     _check_driver()
--> 162     torch._C._cuda_init()
    163     _cudart = _load_cudart()
    164     _cudart.cudaGetErrorName.restype = ctypes.c_char_p

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:51
@jph00
Copy link
Member

jph00 commented May 19, 2019

Yes, we could replace that with .to(device) and have a place in the notebook to set the device.

@jph00 jph00 closed this as completed May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants