Giter Site home page Giter Site logo

adanet's Introduction

ADA-Net

Tensorflow implementation

Semi-Supervised Learning by Augmented Distribution Alignment Qin Wang, Wen Li, Luc Van Gool (ICCV 2019 Oral)

Thesis: Distribution Aligned Semi-Supervised Learning 2018 August at ETH Zurich

Requirements

pip3 install tensorflow-gpu==1.13.1
pip3 install tensorpack==0.9.1
pip3 install scipy==1.2.1

Train and Eval ADA-Net on ConvLarge

Prepare dataset

cd convlarge
python3 cifar10.py --data_dir=./dataset/cifar10/ --dataset_seed=1

Train and Eval ADA-Net on Cifar10 ConvLarge

CUDA_VISIBLE_DEVICES=0 python3 train_cifar.py --dataset=cifar10 --data_dir=./dataset/cifar10/ --log_dir=./log/cifar10aug/ --num_epochs=2000 --epoch_decay_start=1500 --aug_flip=True --aug_trans=True --dataset_seed=1
CUDA_VISIBLE_DEVICES=0 python3 test_cifar.py --dataset=cifar10 --data_dir=./dataset/cifar10/ --log_dir=<path_to_log_dir> --dataset_seed=1

Here are the error rates we get using the above scripts :

Data Split Seed 1 Seed 2 Seed 3 Reported
8.61% 8.89% 8.65% 8.72+-0.12%

The dataset split seed controls the split between labeled and unlabeled samples. It does not affect the test set.

Train and Eval ADA-Net on ImageNet ResNet

Download our imagenet labeled/unlabeled split from this link, put them in ./resnet

cd resnet
python3 ./adanet-resnet.py --data <path_to_your_imagenet_files> -d 18  --mode resnet --batch 256 --gpu 0,1,2,3

Acknowledgement

  • ConvLarge code is based on Takeru Miyato's tf implementation.
  • ResNet code is based on Tensorpack's supervised imagenet training scripts.

License

MIT

Citing this work

@article{wang2019semi,
  title={Semi-Supervised Learning by Augmented Distribution Alignment},
  author={Wang, Qin and Li, Wen and Van Gool, Luc},
  journal={arXiv preprint arXiv:1905.08171},
  year={2019}
}

Reproduce Figure 4

To reproduce Figure 4 in the paper, we provide the plot script and extracted features here. Notice that we use sklearn==0.20.1 for TSNE calculation.

adanet's People

Contributors

qinenergy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

adanet's Issues

Some questions about this code“adanet”

I received an email regarding the code, but the email address was invalid to reply. I will just post it here.

Hello:
I'm sorry to bother you,Recently, I have read your article and felt enlightened. I'm interested in the t-SNE illustration in your article, but the connection after the code doesn't go in. If you have seen my letter, Would you mind sending me a related link? Thank you very much.
Wish you a happy life
xxxxxx(Graduate prospective graduate)

Question about the parameter gamma ($r$)

Hi, thanks for your contribution.
I have a question about the parameter gamma in your paper (5), how to set the value of gamma.
In your code, I think it corresponding to : loss = nll_loss + additional_loss.
Which means gamma equals to 1 ? @qinenergy

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.