Closed jwuphysics closed 1 year ago
Relates to Enhancement #8
Thanks, John! We'll review your notebook and get back to you soon!
Hi @jwuphysics! Thanks for your patience with this process. We've set up infrastructure for reviewing contributions, and I've added a commit with some output. The first issue I encountered was that pytorch was "not compiled with CUDA enabled". Would you be able to create a requirements file for this notebook (this is something we'll need to make anyway). Thanks!
Sure thing @cmurray-astro! Should I append requirements into the existing requirements.txt
file? I'm worried that we might encounter conflicts, i.e. the current one using Keras/TF might conflict with mine using Fastai/Pytorch. In any event I can give it a shot.
For now I think you can create your own requirements.txt file and we will keep the notebooks and requirements separate during the review stage.
Okay! I think I caught all of the dependencies here. Please note that fastai
and its dependencies can be installed via pip or conda, although the latter only works if you're using the custom fastai channel (i.e. conda install -c fastai fastai
).
Thanks, John! I'm working through the notebook and am still getting an error in the learning step that:
AssertionError: Torch not compiled with CUDA enabled
Then with some reading about PyTorch, it appears that CUDA is not supported on macOS: https://github.com/pytorch/pytorch#from-source
I wonder if it's possible to revise the notebook to not rely on CUDA (or perhaps I'm misreading the errors)?
Ah yeah, I didn't execute this locally as Pytorch (and Fastai) are not really meant to be run on macOS. In fact this was written and run on Google Colab.
Maybe I should close this PR and consider forking the project to something like Hello Universe in the cloud?
Yep I like that idea! Thanks, John!!
Opening a PR to incorporate a training example using Pytorch in a new notebook. I think this is a good idea because Pytorch is a highly relevant machine learning framework and Hello Universe users can benefit from seeing code in two flavors. Here I am using Fastai on top of Pytorch, which is analogous to using Keras as a high-level API for TensorFlow.
I've run the notebook in Colab, and if you want I can add one of those "Open in Colab" badges which will allow users to train these deeper (18-layer) CNNs using a GPU. I include two examples: one using the standard 18-layer residual neural network, and one using a custom version of the 18-layer residual neural network that I developed two years back.
Unfortunately I haven't done much documentation but I'd be happy to add more! Just let me know if there's any style guide I should conform to, and if there's any requirements I need to jot down (or whatever else for CI/CD).