Skip to content

Improving Few-Shot Learning with Auxiliary Self-Supervised Pretext Tasks

License

Notifications You must be signed in to change notification settings

nathanielsimard/improving-fs-ssl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fe84809 · Jan 26, 2021

History

69 Commits
Nov 17, 2020
Sep 27, 2020
Dec 22, 2020
Sep 27, 2020
Dec 22, 2020
Dec 19, 2020
Nov 26, 2020
Dec 3, 2020
Oct 19, 2020
Sep 22, 2020
Jan 26, 2021
Sep 22, 2020
Dec 1, 2020
Sep 22, 2020
Sep 22, 2020

Repository files navigation

Improving Few-Shot Learning with Auxiliary Self-Supervised Pretext Tasks

The paper is available on arxiv.

Installing

You need to have anaconda installed to run this repository. Miniconda does the job perfectly.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

We provided a file containing all dependencies required to run any experiments. We recommend using it inside a new virtual environment.

conda env create -n improving-fs-ssl
conda env update -f environement.yml

Some development libraries may also be useful.

conda env update -f environment-dev.yml

Finally you have to install the current project.

pip install -e .

Experiments

Notebook

It is possible to run experiments with collab by using the notebook notebook/improving-fs-ssl.ipynb.

Training

Experiments are launched via ./scripts/train.py. To reproduce some experiments, e.g CIFAR-FS - Sup. + BYOL, you can specified a combination of multiple configuration files that are provided under the config directory.

./scripts/train.py -c config/cifar_fs.yml config/supervised_byol.yml config/seed_1.yml -o /path/to/trained/experiment/

It is also possible to create your own configuration file to override some defaults, all defined in mcp/config/parser.py.

Evaluation

Evaluation are simply ran using the script ./scripts/eval.py. You simply need to provide the path to a trained experiment and the evaluation configuration will be read automatically.

./scripts/eval.py -r /path/to/trained/experiment/

Visualize

To plot some default visualizations and get some results, you may run the script ./scripts/viz.py similar to evaluation. The plots will be saved under the path provided.

./scripts/viz.py -r /path/to/trained/experiment/

About

Improving Few-Shot Learning with Auxiliary Self-Supervised Pretext Tasks

https://arxiv.org/abs/2101.09825

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published