Skip to main content

Graph Neural Networks with Keras and Tensorflow.

Project description



Welcome to Spektral

Spektral is a Python library for graph deep learning, based on the Keras API and TensorFlow 2. The main goal of this project is to provide a simple but flexible framework for creating graph neural networks (GNNs).

You can use Spektral for classifying the nodes of a network, predicting molecular properties, generating new graphs with GANs, clustering nodes, predicting links, and any other task where data is described by graphs.

Spektral implements some of the most popular layers for graph deep learning, including:

You can also find pooling layers, including:

Spektral also includes lots of utilities for your graph deep learning projects.

See how to get started with Spektral and have a look at the examples for some project templates.

The source code of the project is available on Github.
Read the documentation here.

Installation

Spektral is compatible with Python 3.5+, and is tested on Ubuntu 16.04+ and MacOS. Other Linux distros should work as well, but Windows is not supported for now.

To install the required dependencies on Ubuntu run:

sudo apt install graphviz libgraphviz-dev libcgraph6

Some optional features of Spektral also depend on RDKit, a library for cheminformatics and molecule manipulation (available through Anaconda);

The simplest way to install Spektral is from PyPi:

pip install spektral

To install Spektral from source, run this in a terminal:

git clone https://github.com/danielegrattarola/spektral.git
cd spektral
python setup.py install  # Or 'pip install .'

To install Spektral on Google Colab:

! apt install graphviz libgraphviz-dev libcgraph6
! pip install spektral

TensorFlow 1 and Keras

Starting from version 0.3, Spektral only supports TensorFlow 2 and tf.keras. The old version of Spektral, which is based on TensorFlow 1 and the stand-alone Keras library, is still available on the tf1 branch on GitHub and can be installed from source:

git clone https://github.com/danielegrattarola/spektral.git
cd spektral
git checkout tf1
python setup.py install  # Or 'pip install .'

In the future, the TF1-compatible version of Spektral (<0.2) will receive bug fixes, but all new features will only support TensorFlow 2.

Contributing

Spektral is an open source project available on Github, and contributions of all types are welcome. Feel free to open a pull request if you have something interesting that you want to add to the framework.

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

spektral-0.3.0.tar.gz (49.1 kB view details)

Uploaded Source

Built Distribution

spektral-0.3.0-py3-none-any.whl (77.1 kB view details)

Uploaded Python 3

File details

Details for the file spektral-0.3.0.tar.gz.

File metadata

  • Download URL: spektral-0.3.0.tar.gz
  • Upload date:
  • Size: 49.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.5.2

File hashes

Hashes for spektral-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bb9a9c97412fbd7f6fac5a501b76fa4c3ef98b07c7987eca2ebb9991b3ac283b
MD5 be04c5534c0569d74856ef972c558b9f
BLAKE2b-256 5acb8175ec1505226882e7cc6f2ed101e065e7833fb1da647c6fde2246e50d13

See more details on using hashes here.

Provenance

File details

Details for the file spektral-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: spektral-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 77.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.5.2

File hashes

Hashes for spektral-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f45c4b3ced87f33a69926dc8853a02dd754de5d123a72e06e62a4a3f28b2f7e
MD5 01ed404718238d17b65c5e66c5e9d436
BLAKE2b-256 b7c90b8b8bd27f9fa2096368f3f16aed5c45f7af139f5e7fafac8331d990e200

See more details on using hashes here.

Provenance

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