Skip to main content

Graph Neural Network Tensorflow implementation

Project description

Graph Neural Network Model

This repo contains a Tensorflow implementation of the Graph Neural Network model.

Install

Install the latest version of NetworkX:

$ pip install gnn

For additional details, please see INSTALL.rst.

Simple usage example

    import GNN
    import Net as n

    # Provide your own functions to generate input data
    inp, arcnode, nodegraph, labels = set_load()

    # Create the state transition function, output function, loss function and  metrics 
    net = n.Net(input_dim, state_dim, output_dim)

    # Create the graph neural network model
    g = GNN.GNN(net, input_dim, output_dim, state_dim)

    #Training

    for j in range(0, num_epoch):
        g.Train(inp, arcnode, labels, count, nodegraph)

        # Validate            
        print(g.Validate(inp_val, arcnode_val, labels_val, count, nodegraph_val))

License

Released under the 3-Clause BSD license (see LICENSE)

Copyright (C) 2004-2019 Matteo Tiezzi Matteo Tiezzi mtiezzi@diism.unisi.it Alberto Rossi alrossi@unifi.it

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnn-1.0.1.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

gnn-1.0.1-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page