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
- Host: GitHub
- URL: https://github.com/edisonleeeee/mooon
- Owner: EdisonLeeeee
- License: mit
- Created: 2022-04-22T05:12:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T01:44:43.000Z (about 3 years ago)
- Last Synced: 2024-10-28T22:12:40.204Z (over 1 year ago)
- Topics: graph-data-augmentation, graph-neural-networks, pytorch, pytorch-geometric
- Language: Python
- Homepage:
- Size: 284 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Mooon: Graph Data Augmentation Library
> 人有*悲欢离合*,月有*阴晴圆缺*。 ———— 苏轼《水调歌头》
# 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