Git Product home page Git Product logo

pytorch-template's Introduction

Pytorch-Project-Template

Features

  • (multi-node/gpu) (training/validation/test)
  • Weight and bias (Wandb) MLops
  • Easy Code Structure
  • CIFAR10/100 dataset, (*you can add your custom dataset easily)
  • Customizable configuration

Requirements and Setup

In your computer

  • Install Anaconda
wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
bash ~/Desktop/<anacondafile> -b -p 
source anaconda3/bin/activate
  • Create Environment
conda create -n torch python=3.9
conda activate torch
conda install pytorch==1.12.0 torchvision==0.13.0 -c pytorch
pip install tqdm easydict wandb imageio
cd canonicalSGD
python setup.py develop

Wandb

  1. create your account (you can use your Github account)
  2. in config/*****.yaml edit wandb setting
  3. run our script and type certification code.
  4. Done

Wandb implementation

스크린샷 2022-07-22 오후 5 02 54

** You can turn off the wandb log by editing the below line**

os.environ['WANDB_SILENT'] = "true"

in agents/mnist.py

Details:

Single-GPU

Training

python tools/main.py --config config/...yaml --resume (0 or 1)

Test

python tools/main.py --config config/...yaml --test 1

Multi-GPU

Training

sh tools/dist_train.sh <ConfigFile> <#GPUS> <1(optional for resume)>  

Test

sh tools/dist_test.sh <ConfigFile> <#GPUS>

Results

  • CIFAR100 dataset: 77%

License:

This project is licensed under MIT License - see the LICENSE file for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.