Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
/ gnn_toy_example Public archive

Getting familiar with Graph Neural Nets and the pytorch_geometric library

License

Notifications You must be signed in to change notification settings

bentaculum/gnn_toy_example

Repository files navigation

GNN Toy Example

Getting familiar with Graph Neural Nets and the pytorch_geometric library

Instructions:

  1. Set up a python3 conda environment, then pip install -r requirements.txt
  2. Conda install pytorch as specified here
  3. Install pytorch_geometric with ./install_pytorch_geometric.sh, or one-by-one as specified here
  4. Run 'main.py' out of the directory ./source

This repo addresses the following problem:

For a given random geometric graph in a plane, predict the number of neighbors within a threshold distance θ. In particular:

  1. Randomly sample N nodes in a unit square.
  2. Connect nodes within a threshold distance θ_max.
  3. Label each node with the number of direct neighbors within distance θ < θ_max.
  4. Train a GNN to predict the label of each node.

Experiment tracking with Sacred

  1. To install MongoDB on MacOS, execute brew install mongodb, then start it as a service with brew services start mongodb
  2. Start mongodb with mongodb, you'll be in the MongoDB shell
  3. In there, set up a new database called sacred with use sacred
  4. Maybe: Insert a dummy entry with db.movie.insert({"name":"tutorials point"})
  5. To set up Omniboard, follow the steps here
  6. Execute omniboard -m <host>:27017:sacred to start up Omniboard at localhost:9000

About

Getting familiar with Graph Neural Nets and the pytorch_geometric library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published