Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Medium Twitter Linkedin

PyTorch Lightning: Build your models with PyTorch and train them with PyTorch Lightning

This repository shows a couple of examples to start using PyTorch Lightning right away. PyTorch Lightning provides several functionalities that allow to organize in a flexible, clean and understandable way each component of the training phase of a PyTorch model.

If you want to know more in detail how to structure each PyTorch Lightning component, I recommend the following blog: PyTorch Lightning: Making your Training Phase Cleaner and Easier

Table of Contents

1. Files

  • main_basic.py: This file contains a "basic" implementation of PyTorch Lighting.
  • main_tune.py: This file contains a "more advanced" implementation of PyTorch Lightning, essentially it covers the use of some specific functionalities such as: finding automatically the optimal learning rate as well as finding the optimal batch size.

2. How to use

You just need to type

python main_basic.py

or

python main_tune.py

however, I recommend you to work with a virtual environment, in this case I am using pipenv. So in order to install the dependencies located in the Pipfile you just need to type:

pipenv install

and then

pipenv shell

3. Contributing

Feel free to fork the model and add your own suggestiongs.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourGreatFeature)
  3. Commit your Changes (git commit -m 'Add some YourGreatFeature')
  4. Push to the Branch (git push origin feature/YourGreatFeature)
  5. Open a Pull Request

5. Contact

If you have any question, feel free to reach me out at:

6. License

Distributed under the MIT License. See LICENSE.md for more information.