Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crisostomi/metric-few-shot-graph

Few-Shot Graph Classification via distance metric learning.
https://github.com/crisostomi/metric-few-shot-graph

distance-metric-learning few-shot-classifcation few-shot-learning graph-classification graph-neural-networks graph-representation-learning

Last synced: 12 days ago
JSON representation

Few-Shot Graph Classification via distance metric learning.

Awesome Lists containing this project

README

        

# Metric Based Few-Shot Graph Classification


NN Template
Python
Code style: black

Codebase for the paper [Metric Based Few-Shot Graph Classification](https://proceedings.mlr.press/v198/crisostomi22a.html), published at Learning on Graphs (2022).

## Installation

Setup the development environment:

```bash
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
```bash
conda install pyg -c pyg
```

Install the project in edit mode:
```bash
pip install -e .
```

### Download data

Download the versioned datasets:
```bash
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:
```bash
python fs_grl/scripts/run_dml.py
```