u/Adventurous_Salt

Guide to PyTorch Lightning, for a ML Instructor

I teach machine learning in college, and we cover neural network models. I recently switched the material over from using Keras/Tensorflow to using PyTorch, and it has been a little more annoying than I anticipated.

I have found with PyTorch, the amount of boilerplate-ish code makes things a bit muddy and confusing. I'm not teaching experts, this is an introductory course and the students are generally not great coders, with Keras I found I was able to hide a bunch of the complexity in the code, which let me teach the theory and the students could implement it pretty well. With PyTorch, the amount of stuff that they need to write - training loops, early stopping, tracking results, turning calculating gradients on/off, datasets, etc... kind of bogs them down. Students have a good grasp of ML basics at this point, but the code complexity compared to the sklearn models is a real hurdle, especially as they are trying to understand the theory parts at the same time.

I'm looking at switching things over to use Lightning this summer, but I haven't really used it much. Does anyone have a good guide that explains it simply, assuming I understand pytorch? Also, if anyone has opinions on if this is a good idea, I'd love to hear them.

reddit.com
u/Adventurous_Salt — 13 days ago