Skip to content

bniepce/pytorch-lightning-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pytorch Lightning Boilerplate

This repository is a WIP.

Description

This repo contains a boilerplate of a Pytorch Lightning project based on the pytorch-template and the deep-learning-project-template.

Usage

First, install dependencies

# Clone project
git clone https://github.com/bniepce/pytorch-lightning-boilerplate.git

# Setup project
cd pytorch-lightning-boilerplate
pip install -e .   
pip install -r requirements.txt

# Run training
python train.py --config ./config/model.json

# Run inference
python inference.py --config ./config/model.json --model_checkpoint ./logs/logs_ligthning/checkpoint/version__0/model.ckpt

A --data_dir flag can be used for inference if your test data is not in

os.path.join(config['dataloader']['args']['data_dir'], 'test')

Use custom models

To train another model than the MNISTModel provided in this repo, one just has to provide the computational graph of that model and define a new configuration file under the config folder.

About

Pytorch Lightning boilerplate for neural network training

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages