Coder Social home page Coder Social logo

swin-mesa's Introduction

Demo project for training Swin with Mesa

For more details, please checkout our paper: Mesa: A Memory-saving Training Framework for Transformers.

Usage

  1. Install Mesa from here.
  2. Install dependencies of Swin from here.
  3. To train a Swin model.
    conda activate mesa
    
    # Make sure you have the correct path to the dataset in the config file.
    python -m torch.distributed.launch --nproc_per_node [GPUs] --master_port 13235  main.py \
    --cfg [configs]
    
    # For example, to train Swin-Ti with Mesa on 1 GPU.
    python -m torch.distributed.launch --nproc_per_node 1 --master_port 13235  main.py \
    --cfg configs/swin_tiny_patch4_window7_224_mesa.yaml

Results on ImageNet

Model Param (M) FLOPs (G) Train Memory Top-1 (%)
Swin-Ti 29 4.5 11,812 81.3
Swin-Ti w/ Mesa 29 4.5 5,371 81.3

Acknowledgments

This repository has adopted codes from Swin Transformer, we thank the authors for their open-sourced code.

swin-mesa's People

Contributors

hubhop avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

cv-ip

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.