Skip to content

Few-Shot Graph Classification via distance metric learning.

License

Notifications You must be signed in to change notification settings

crisostomi/metric-few-shot-graph

Repository files navigation

Metric Based Few-Shot Graph Classification

NN Template Python Code style: black

Codebase for the paper Metric Based Few-Shot Graph Classification, published at Learning on Graphs (2022).

Installation

Setup the development environment:

conda create --name fs-grl python=3.9
conda activate fs-grl

Install PyTorch with CUDA support according to https://pytorch.org/get-started/locally/.

Install PyG

conda install pyg -c pyg

Install the project in edit mode:

pip install -e .

Download data

Download the versioned datasets:

dvc pull
dvc checkout

Training a model

You can train and evaluate various families of models by running the corresponding script in the scripts folder. For example, to train a Distance Metric Learning model, you can run:

python fs_grl/scripts/run_dml.py