Skip to content

ferretj/temporal-ensembling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temporal Ensembling (PyTorch)

This is the code to reproduce the experiments of my blog post, which explains and gives implementation details on Temporal Ensembling for Semi-Supervised Learning from ICLR 2017.

Accuracy on weakly-supervised MNIST (100 labels, 5 seed restarts) : 97.8% (+/- 0.6%).

Best seed accuracy : 98.38%.

Usage

Standard requirements

First, install the requirements in a virtual environment :

pip install -r requirements.txt

Regarding PyTorch and torchvision

I used PyTorch version 0.3.0.post4 and torchvision version 0.2.0, so these are the recommended versions.

If you want to run it using PyTorch 0.4+, see this issue.

Install PyTorch and torchvision as shown here according to your specs.

Training a model

You can launch a MNIST evaluation from the command line using :

python mnist_eval.py

You can tweak hyperparameters in the config.py file.

Misc

This code is not a 100% faithful reproduction of the original paper and should not be used as such.

The Theano-based code released by the paper authors can be found here.

Releases

No releases published

Packages

No packages published

Languages