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

Context set doesn't check for presence of GPU in 0_handwriting_ocr.ipynb #31

Closed
fugumaki opened this issue Apr 23, 2020 · 1 comment
Closed

Comments

@fugumaki
Copy link

When setting the context in the denoising section of 0_handwriting_ocr.ipynb, the code doesn't check for the presence of GPUs and therefore fails when no GPUs are available.

Based on other context setting code in the example, I would suggest that this line...
ctx_nlp = mx.gpu(3)

Should read...
ctx_nlp = mx.gpu(3) if mx.context.num_gpus() > 0 else mx.cpu()

@jonomon
Copy link
Contributor

jonomon commented Apr 23, 2020

Hi @fugumaki Thank you for your comment.
Please submit a PR for this.

@jonomon jonomon closed this as completed May 5, 2020
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