I just finished learning the basics of Python and a bit of NumPy. I want to dive into Deep Learning. Should I start with raw PyTorch to understand the "guts" of the training loop, or is it better to jump straight into PyTorch Lightning to learn industry-standard practices from day one?
3 answers
As a mentor, I usually recommend a "hybrid" approach. It is valuable to write a raw PyTorch training loop once just to understand how gradients flow and how optimizers work. Once you grasp that, move to Lightning immediately. Why? Because in the real world, you won't be writing manual loops; you'll be using frameworks that prevent errors. Lightning teaches you "Best Practices" like separating your data logic from your model logic. This organization is a skill that will make you a much better Data Scientist. It's like learning to drive—you should know how the engine works, but you'll be using an automatic transmission most of the time.
Do you have a specific project in mind, or are you just trying to build a general portfolio to show to prospective employers?
I started with Lightning and I don't feel like I missed out on much. It actually helped me understand the "flow" of an AI project much better.
Anna, I totally agree. The "Step" functions in Lightning (training_step, validation_step) make the logic of what a neural network actually does during training much more intuitive for newcomers.
Scott, for a portfolio, Lightning is actually better. It shows a hiring manager that you write "clean" and "maintainable" code. A messy 500-line script in raw PyTorch is much harder for a lead developer to review than a structured Lightning module. If Logan wants to stand out in the Data Science job market, showing that he can use tools that scale to production (like Lightning) gives him a massive advantage over candidates who only know how to write scripts in Jupyter Notebooks.