Skip to content

Jay4BioPZ/DL_Fewshot_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CS-502 Project - Fewshot-Benchmark: Differentiable Closed-Form and Iterative Solver

Group 25: Berta Céspedes Sarrias, Hadi Hammoud, Yung-Cheng Chiang

Project Description

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.

Implementation

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.

Instructions

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.

About

CS-502 fewshot learning project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published