A very simple classifier example in PyTorch to illustrate some opinionated best practices. It is by no means perfect or exhaustive, the idea is to illustrate some key ideas that give you reproducible training with minimal effort. In practice this will be enough for many real world projects - or at least better what actually happens in most real world projects. It is the quintessential 80/20 solution.
To run it, you need the kaggle Vegetable Dataset:
https://www.kaggle.com/datasets/misrakahmed/vegetable-image-dataset
It is mainly meant as a template to extend and modify to your own needs.
Further documentation can be found in the files themselves, directly in the code.