Group 25: Berta Céspedes Sarrias, Hadi Hammoud, Yung-Cheng Chiang
The project implements the few-shot learning algorithm proposed by Bertinetto et al., 2018 (arXiv, GitHub) on two biomedical datasets: SwissProt and Tabula Maris. The algorithm is runned under a hydra framework and the result is compared against other few-shot learning benchmark algorithms with the same backbone.
Two algorithm modules were added:
R2D2
: the "Ridge Regression Differentiable Discriminator".LRD2
: the "Logistic Regression Differentiable Discriminator".
For more mathematical details, please refer to the submitted project report.
To run the code, let's say training r2d2
on SwissProt dataset, you can use the following command:
# Activate the conda environment
conda activate fewshotbench
# Go to the fewshotbench folder
cd DL_Fewshot_Project/fewshotbench/
# Set up experiment name
exp_name="your_experiment_name"
# Run the experiment with selected method and hyperparameters
python run.py exp.name=${exp_name} method=r2d2 dataset=swissprot lr=0.0001 n_way=5 n_shot=5
Note that in our implementation, lr
, n_way
and n_shot
are set to be tunable from the configuration file. Thus it is necessary to specify them in the command line.