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

https://github.com/edisonleeeee/mooon

Graph Data Augmentation Library for PyTorch Geometric
https://github.com/edisonleeeee/mooon

graph-data-augmentation graph-neural-networks pytorch pytorch-geometric

Last synced: about 1 year ago
JSON representation

Graph Data Augmentation Library for PyTorch Geometric

Awesome Lists containing this project

README

          

# Mooon: Graph Data Augmentation Library


banner





[Documentation]

|

[Examples]



Python


pytorch


license


pypi


docs

> 人有*悲欢离合*,月有*阴晴圆缺*。 ———— 苏轼《水调歌头》

# Why "Mooon"?

*Graph* with data augmentations, is like the *moon*, now dark, now full.

# Quick Tour
+ Functional API
```python
from mooon import drop_edge

edge_index, edge_weight = drop_edge(edge_index, p=0.5)
edge_index, edge_weight = drop_edge(edge_index, edge_weight, p=0.5)
```
+ Module Layer
```python
from mooon import DropEdge

drop_edge = DropEdge(p=0.5)
edge_index, edge_weight = drop_edge(edge_index)
edge_index, edge_weight = drop_edge(edge_index, edge_weight)
```
# 🚀 Installation

Please make sure you have installed [PyTorch](https://pytorch.org) and [PyTorch Geometric (PyG)](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html).

```bash
# Coming soon
pip install -U mooon
```

or

```bash
# Recommended
git clone https://github.com/EdisonLeeeee/Mooon.git && cd Mooon
pip install -e . --verbose
```

where `-e` means "editable" mode so you don't have to reinstall every time you make changes.

# Roadmap

**Note:** this is an ongoing project, please feel free to contact me for collaboration.

- [ ] Based on PyTorch
- [ ] Support only PyG
- [ ] High-level class and low-level functional API
- [ ] Seamlessly integrated into existing code written by PyG