Coder Social home page Coder Social logo

pytorch-randaugment's Introduction

pytorch-randaugment

Unofficial PyTorch Reimplementation of RandAugment. Most of codes are from Fast AutoAugment.

Introduction

Models can be trained with RandAugment for the dataset of interest with no need for a separate proxy task. By only tuning two hyperparameters(N, M), you can achieve competitive performances as AutoAugments.

Install

$ pip install git+https://github.com/ildoonet/pytorch-randaugment

Usage

from torchvision.transforms import transforms
from RandAugment import RandAugment

transform_train = transforms.Compose([
    transforms.RandomCrop(32, padding=4),
    transforms.RandomHorizontalFlip(),
    transforms.ToTensor(),
    transforms.Normalize(_CIFAR_MEAN, _CIFAR_STD),
])

# Add RandAugment with N, M(hyperparameter)
transform_train.transforms.insert(0, RandAugment(N, M))

Experiment

We use same hyperparameters as the paper mentioned. We observed similar results as reported.

You can run an experiment with,

$ python RandAugment/train.py -c confs/wresnet28x10_cifar10_b256.yaml --save cifar10_wres28x10.pth

CIFAR-10 Classification

Model Paper's Result Ours
Wide-ResNet 28x10 97.3 97.4
Shake26 2x96d 98.0 98.1
Pyramid272 98.5

CIFAR-100 Classification

Model Paper's Result Ours
Wide-ResNet 28x10 83.3 83.3

SVHN Classification

Model Paper's Result Ours
Wide-ResNet 28x10 98.9 98.8

ImageNet Classification

I have experienced some difficulties while reproducing paper's result.

Issue : ildoonet#9

Model Paper's Result Ours
ResNet-50 77.6 / 92.8 TODO
EfficientNet-B5 83.2 / 96.7 TODO
EfficientNet-B7 84.4 / 97.1 TODO

References

pytorch-randaugment's People

Contributors

ildoonet 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.