Skip to main content

Graph Neural Network Tensorflow implementation

Project description

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

Install

Requirements

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

For additional details, please see Install.

Simple usage example

import gnn.GNN as GNN
import gnn.gnn_utils
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.txt):

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.7.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

gnn-1.1.7-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gnn-1.1.7.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for gnn-1.1.7.tar.gz
Algorithm Hash digest
SHA256 f662a6bb58e64e2af67e7af7e7834f4f676b43569ea05c32acced9284a9dbce7
MD5 2084922ad6bc9ab217c6345bd60397fd
BLAKE2b-256 2ad2b5291a28fd66081f385f2eed52bfeafe7d8f08bae5fb328cc56518417735

See more details on using hashes here.

File details

Details for the file gnn-1.1.7-py3-none-any.whl.

File metadata

  • Download URL: gnn-1.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for gnn-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e7df1abd5e3652359f796ebfd76b4ba3abed4097fcd02b454dd263f568569e91
MD5 c94b216cf396e9130efdba53976dd19d
BLAKE2b-256 76a941c7521f6c0839b7802d18f9f83f5b13db43c072ac9da5fe464b403e48e3

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