Spektral是一个用Python构建并基于Keras API的关系表示学习框架

网友投稿 621 2022-11-04

Spektral是一个用Python构建并基于Keras API的关系表示学习框架

Spektral是一个用Python构建并基于Keras API的关系表示学习框架

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:

Graph Convolutional Networks (GCN)Chebyshev networks (ChebNets)GraphSAGEARMA convolutionsEdge-Conditioned Convolutions (ECC)Graph attention networks (GAT)APProximated Personalized Propagation of Neural Predictions (APPNP)Graph Isomorphism Networks (GIN)Diffusional Convolutions

and many others (see convolutional layers).

You can also find pooling layers, including:

DiffPoolMinCUT poolingTop-K poolingSelf-Attention Graph (SAG) poolingGlobal sum, average, and max poolingGlobal gated attention poolingSortPool

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 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.

Some optional features of Spektral 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.gitcd spektralpython setup.py install # Or 'pip install .'

To install Spektral on Google Colab:

! 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.gitcd spektralgit checkout tf1python 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.

The contribution guidelines are available here and a list of feature requests is available here.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:WS2818M是CPC8封装,是三通道LED驱动控制专用电路外置IC全彩双信号5V32灯可编程led灯带户外工程
下一篇:SwiftPlate:只要几秒钟执行时间,即可生成跨平台框架 Xcode 项目
相关文章

 发表评论

暂时没有评论,来抢沙发吧~