Skip to content

Code for "MixMatch - A Holistic Approach to Semi-Supervised Learning"

License

Notifications You must be signed in to change notification settings

SachinLearns/MixMatch-pytorch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MixMatch

This is an unofficial PyTorch implementation of MixMatch: A Holistic Approach to Semi-Supervised Learning. The official Tensorflow implementation is here.

Experiments on just CIFAR-10 are available.

Requirements

  • python 3.10.11
  • pytorch 2.0.0
  • pytorch-cuda 11.7
  • torchvision 0.15.0
  • tensorboardX
  • progress
  • matplotlib
  • numpy

Usage

Train

Train the model by 250 labeled data of CIFAR-10 dataset:

python train.py --gpu <gpu_id> --n-labeled 250 --out cifar10@250

Train the model by 4000 labeled data of CIFAR-10 dataset:

python train.py --gpu <gpu_id> --n-labeled 4000 --out cifar10@4000

Running using nohup [It may run overnight]

nohup python train.py --gpu <gpu_id> --n-labeled 1000 --out cifar10@1000 1>[email protected] 2>[email protected] &

To check if it is running.

ps -aux | grep python | grep <username>

Results (Accuracy)

#Labels 80 90 100 250 500 1000 2000 4000
Paper - - - 88.92 ± 0.87 90.35 ± 0.94 92.25 ± 0.32 92.97 ± 0.15 93.76 ± 0.06
This code (mean) 76.166 80.245 81.9485 88.2325 89.299 91.113 92.545 93.562
This code (best) 80.6 82.12 83.3 89.28 90.3 91.96 93.24 94.2

References

@article{berthelot2019mixmatch,
  title={MixMatch: A Holistic Approach to Semi-Supervised Learning},
  author={Berthelot, David and Carlini, Nicholas and Goodfellow, Ian and Papernot, Nicolas and Oliver, Avital and Raffel, Colin},
  journal={arXiv preprint arXiv:1905.02249},
  year={2019}
}

About

Code for "MixMatch - A Holistic Approach to Semi-Supervised Learning"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%