Skip to content

mmiller96/netgan_pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

NetGAN: Generating Graphs via Random Walks

Pytorch implementation of the method proposed in the paper: NetGAN: Generating Graphs via Random Walks
based on the tensorflow implementation: https://github.com/danielzuegner/netgan
There are two folders "netgan" and "netgan_modified". The first folder is the normal netgan implementation. It contains four different python files training.py, models.py, utils.py and demo_pytorch.ipynb. training.py is the main file. With this file you can train a graph and generate synthetic graphs afterwards. models.py contains the generator and the discriminator. utils.py has usefull functions and the demo_pytorch.ipynb is a demo version where training in done on the cora dataset. For better understanding the architectures of the models are shown as images below. The hyperparameters are defined respectively.

The folder "netgan_modified" is a modifed version of netgan. The generator has changed as the bottom picture shows. With the additional LSTM it is possible to generate graphs with an additional feature. demo_pytorch.ipynb is an example where synthetic graphs are created from an electrical grid. The structure and the conduction length are generated. branch.csv and bus.csv contain information from different electircal grids. They are created from https://electricgrids.engr.tamu.edu/electric-grid-test-cases/

How GANs work:

GAN

Generator model:

Generator

Discriminator model:

Discriminator

Generator model expanded with conductor length

Generator_expanded

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published