[Update on 31/03/2020] This repository has been merged to Xfer.
This repo contains the implementation of the synthetic information bottleneck algorithm for few-shot classification on Mini-ImageNet, which is used in our ICLR 2020 paper Empirical Bayes Transductive Meta-Learning with Synthetic Gradients.
If our code is helpful for your research, please consider citing:
@inproceedings{
Hu2020Empirical,
title={Empirical Bayes Transductive Meta-Learning with Synthetic Gradients},
author={Shell Xu Hu and Pablo Moreno and Yang Xiao and Xi Shen and Guillaume Obozinski and Neil Lawrence and Andreas Damianou},
booktitle={International Conference on Learning Representations (ICLR)},
year={2020},
url={https://openreview.net/forum?id=Hkg-xgrYvH}
}
Shell Xu Hu, Xi Shen and Yang Xiao
The code is tested under Pytorch > 1.0 + Python 3.6 environment with extra packages:
pip install -r requirements.txt
cd data
bash download_miniimagenet.sh
cd ..
The weights of the feature network is downloaded in step 0, but you may also train from scracth by running
python main_feat.py --outDir miniImageNet_WRN_60Epoch --cuda --dataset miniImageNet --nbEpoch 60
python main.py --config config/miniImageNet_1shot.yaml --seed 100 --gpu 0
python main.py --config config/miniImageNet_1shot.yaml --seed 100 --gpu 0 --ckpt cache/miniImageNet_1shot_K3_seed100/outputs_xx.xxx/netSIBBestxx.xxx.pth
Setup | 5-way-1-shot | 5-way-5-shot |
---|---|---|
SIB (K=3) | 70.700% ± 0.585% | 80.045% ± 0.363% |
SIB (K=5) | 70.494 ± 0.619% | 80.192% ± 0.372% |
Setup | 5-way-1-shot | 5-way-5-shot |
---|---|---|
SIB (K=3) | 79.763% ± 0.577% | 85.721% ± 0.369% |
SIB (K=5) | 79.627 ± 0.593% | 85.590% ± 0.375% |