Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Examples

Our most robust examples showing all sorts of implementations can be found in our sister library Lightning Bolts.


Note that some examples may rely on new features that are only available in the development branch and may be incompatible with any releases. If you see any errors, you might want to consider switching to a version tag you would like to run examples with. For example, if you're using pytorch-lightning==1.6.4 in your environment and seeing issues, run examples of the tag 1.6.4.


MNIST Examples

5 MNIST examples showing how to gradually convert from pure PyTorch to PyTorch Lightning.

The transition through LightningLite from pure PyTorch is optional, but it might be helpful to learn about it.


Basic Examples

In this folder, we have 2 simple examples:


Domain Examples

This folder contains older examples. You should instead use the examples in Lightning Bolts for advanced use cases.


Basic Examples

In this folder, we have 1 simple example:


Loop examples

Contains implementations leveraging loop customization to enhance the Trainer with new optimization routines.

  • K-fold Cross Validation Loop: Implementation of cross validation in a loop and special datamodule.
  • Yield Loop: Enables yielding from the training_step like in a Python generator. Useful for automatic optimization with multiple optimizers.