Code Monkey home page Code Monkey logo

mega-image's Introduction

Mega: Moving Average Equipped Gated Attention

Mega for Image Classification

Implementation of Mega on Image Classification. This folder is based on the repos of Pytorch Image Models and DeiT

Requirements

Python 3.7, Pytorch 1.11.0 Cuda11.3

Installation

pip install --editable pytorch-image-models/  --user

Model Checkpoints

Task Description # params Download
ImageNet-1k Mega on ImageNet-1k 90M mega.imagenet.zip

Training Mega on ImageNet-1k

To train Mega-base on ImageNet on a single node with 8 gpus for 300 epochs with slurm:

srun --label python -u deit/main.py \
        --model mega_base_patch16_224 \
        --batch-size 128 \
        --lr 2e-3 \
        --seed 42 \
        --norm-type 'layernorm' \
        --drop-path 0.3 \
        --epochs 300 \
        --warmup-epochs 20 \
        --weight-decay 0.05 \
        --warmup-lr 1e-5 \
        --clip-grad 1.0 \
        --opt-betas 0.9 0.98 \
        --world_size 8 \
        --reprob 0.25 \
        --repeated-aug 3 \
        --data-path ${DATA_PATH} \
        --output_dir ${MODEL_PATH}

mega-image's People

Contributors

xuezhemax avatar violet-zct avatar

Watchers

 avatar

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.