Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oke-aditya/pytorch_cnn_trainer
A Simple but Powerful CNN Trainer For PyTorch
https://github.com/oke-aditya/pytorch_cnn_trainer
hacktoberfest torchvision transfer-learning
Last synced: 16 days ago
JSON representation
A Simple but Powerful CNN Trainer For PyTorch
- Host: GitHub
- URL: https://github.com/oke-aditya/pytorch_cnn_trainer
- Owner: oke-aditya
- License: gpl-3.0
- Created: 2020-07-19T11:52:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T08:34:29.000Z (almost 4 years ago)
- Last Synced: 2024-10-12T11:06:41.962Z (about 1 month ago)
- Topics: hacktoberfest, torchvision, transfer-learning
- Language: Python
- Homepage: https://oke-aditya.github.io/pytorch_cnn_trainer/
- Size: 561 KB
- Stars: 26
- Watchers: 2
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# PyTorch CNN Trainer
- Note that this PyPi package is no longer maintained. It will work fine upto this release, but I won't do bug fixes.
- The entire code and API is migrated to [Quickvison](https://github.com/Quick-AI/quickvision), it has similar API and is maintained actively.![Check Formatting](https://github.com/oke-aditya/pytorch_cnn_trainer/workflows/Check%20Formatting/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![CI Tests](https://github.com/oke-aditya/pytorch_cnn_trainer/workflows/CI%20Tests/badge.svg)
![PyPi Release](https://github.com/oke-aditya/pytorch_cnn_trainer/workflows/PyPi%20Release/badge.svg)
![Deploy mkdocs](https://github.com/oke-aditya/pytorch_cnn_trainer/workflows/Deploy%20mkdocs/badge.svg)
![Install Package](https://github.com/oke-aditya/pytorch_cnn_trainer/workflows/Install%20Package/badge.svg)
[![Downloads](https://pepy.tech/badge/pytorch-cnn-trainer)](https://pepy.tech/project/pytorch-cnn-trainer)
[![Downloads](https://pepy.tech/badge/pytorch-cnn-trainer/month)](https://pepy.tech/project/pytorch-cnn-trainer/month)
[![Downloads](https://pepy.tech/badge/pytorch-cnn-trainer/week)](https://pepy.tech/project/pytorch-cnn-trainer/week)## Train CNN for your task
A simple engine to fine tune CNNs from [torchvision](https://github.com/pytorch/vision) and [Pytorch Image models](https://github.com/rwightman/pytorch-image-models) from Ross Wightman.
![Example](images/example.png)
## Why This Package ?
It is very annoying to write training loop and training code for CNN training. Also to support all the training features it takes massive time.
Usually we don't need distributed training and it is very uncomfortable to use argparse and get the job done.
This simplifies the training. It provide you a powerful `engine.py` which can do lot of training functionalities.
Also a `dataset.py` to load dataset in common scenarios.Note: -
Pytorch Trainer is not a distributed training script.It will work good for single GPU machine for Google Colab / Kaggle.
But for distributed Training you can use the PyTorch Lightning Trainer (soon).
It will train on multiple GPUs just the way lightning supports (soon).
## To install
Install torch and torchvision from [PyTorch](https://pytorch.org/)
Run the following in terminal.```
pip install -q git+git://github.com/oke-aditya/pytorch_cnn_trainer.git
```
Or from PyPI now !!```
pip install pytorch_cnn_trainer
```## Docs: -
I have provided some example of how to use this trainer in multiple scenarios. Please check examples folder.
Some examples that are provided.
- [x] Fine Tune Torchvision models using fit().
- [x] Fine Tune Torchvision models using train_step() and validation_step().
- [x] Fine Tune Ross Wightman's models.
- [x] Quantization Aware Training head only.
- [x] Quantization Aware Training Fully.
- [ ] Mixed Precision Training
- [ ] Training with Stochastic Weighted Average (SWA)
- [ ] LR Finder implementation# Features: -
- [x] Support PyTorch image models (timm) training and transfer learning.
- [x] Quantization Aware training example.
- [x] Early stopping with patience.
- [x] Support torchvision models trainging and transfer learning.
- [x] Support torchvision quantized models transfer learning.
- [x] Support for Mixed Precision Training.
- [x] L2 Norm Gradient Penalty.
- [ ] LR Finder Implementation.
- [x] SWA Stochastic weighted Averaging support for training.
- [x] Add Keras Like fit method.
- [x] Sanity Check method.Hope this repo helps people to train models using transfer learning.
If you like it do give * and tell people about it.