Skip to main content

Graph Neural Network Tensorflow implementation

Project description

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

Install

The GNN framework requires the packages tensorflow, numpy, scipy

To install the requirements you can use the following command:

pip install -U -r requirements.txt

Install the latest version of GNN:

pip install gnn

Simple usage example

import gnn.GNN as 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.1.3.tar.gz (8.6 kB view details)

Uploaded Source

File details

Details for the file gnn-1.1.3.tar.gz.

File metadata

  • Download URL: gnn-1.1.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for gnn-1.1.3.tar.gz
Algorithm Hash digest
SHA256 ec7855e7ee0966430a6075eb5c3033ef7e202e40eb4cbb202eae44300d099d93
MD5 c11cae0d72d067b15baf4fcaa62705e6
BLAKE2b-256 1255a3a3eef1ac6ee808a4c9d29be02932999f377efd58ae1189c18e61b4431e

See more details on using hashes here.

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