资源算法mixup_pytorch

mixup_pytorch

2019-09-18 | |  102 |   0 |   0

Mixup: Beyond Empirical Risk Minimization in PyTorch

This is an unofficial PyTorch implementation of mixup: Beyond Empirical Risk Minimization. The code is adapted from PyTorch CIFAR.

The results:

I only tested using CIFAR 10 and CIFAR 100. The network we used is PreAct ResNet-18. For mixup, we set alpha to be default value 1, meaning we sample the weight uniformly between zero and one. I trained 200 epochs for each setting. The learning rate is 0.1 (iter 1-100), 0.01 (iter 101-150) and 0.001 (iter 151-200). The batch size is 128.

| Dataset and Model | Acc. | | ----------------- | ----------- | | CIFAR 10 no mixup | 94.97% | | CIFAR 10 mixup | 95.53% | | CIFAR 100 no mixup | 76.53% | | CIFAR 100 mixup | 77.83% |

CIFAR 10 test accuracy evolution

cifar10

CIFAR 100 test accuracy evolution

cifar100

Usage

# Train and test CIFAR 10 with mixup.
python main_cifar10.py --mixup --exp='cifar10_nomixup'
# Train and test CIFAR 10 without mixup.
python main_cifar10.py --exp='cifar10_nomixup'
# Train and test CIFAR 100 with mixup.
python main_cifar100.py --mixup --exp='cifar100_mixup'
# Train and test CIFAR 100 without mixup.
python main_cifar100.py --exp='cifar100_nomixup'


上一篇:TDD

下一篇:SGCN

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...