A library for building scalable graph neural networks in TensorFlow.
Project description
TensorFlow GNN
This is an early (alpha) release to get community feedback. It's under active development and we may break API compatibility in the future.
TensorFlow GNN is a library to build Graph Neural Networks on the TensorFlow platform. It contains the following components:
-
A high-level Keras-style API to create GNN models that can easily be composed with other types of models. GNNs are often used in combination with ranking, deep-retrieval (dual-encoders) or mixed with other types of models (image, text, etc.)
-
GNN API for heterogeneous graphs. Many of the graph problems we approach at Google and in the real world contain different types of nodes and edges. Hence the emphasis in heterogeneous models.
-
A well-defined schema to declare the topology of a graph, and tools to validate it. It describes the shape of its training data and serves to guide other tools.
-
A GraphTensor composite tensor type which holds graph data, can be batched, and has efficient graph manipulation functionality available.
-
A library of operations on the GraphTensor structure:
-
Various efficient broadcast and pooling operations on nodes and edges, and related tools.
-
A library of standard baked convolutions, that can be easily extended by ML engineers/researchers.
-
A high-level API for product engineers to quickly build GNN models without necessarily worrying about its details.
-
-
A set of tools used to convert graph datasets and sample from large graphs.
-
An encoding of graph-shaped training data on file, as well as a library used to parse this data into a data structure your model can extract the various features.
This library is an OSS port of a Google internal library used in a broad variety of contexts, on homogeneous and heterogeneous graphs, and in conjunction with other scalable graph mining tools.
For more details, please see our documentation.
Installation Instructions
Latest available pip wheel.
pip install tensorflow_gnn --pre
Installation from source.
A virtual environment is highly recommended.
-
Clone tensorflow_gnn
$> git clone https://github.com/tensorflow/gnn.git tensorflow_gnn
-
Install TensorFlow
TF-GNN currently uses tf.ExtensionTypes, which is a feature of TensorFlow 2.7. As such, you will need to install TensorFlow build, following the instructions here: https://www.tensorflow.org/install/pip.
$> pip install tensorflow
-
Install Bazel
Bazel is required to build the source of this package. Follow the instructions here to install Bazel for your OS: https://docs.bazel.build/versions/main/install.html
-
Install tensorflow_gnn
$> cd tensorflow_gnn && python3 -m pip install .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tensorflow-gnn-0.2.0.tar.gz
.
File metadata
- Download URL: tensorflow-gnn-0.2.0.tar.gz
- Upload date:
- Size: 286.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e248062e1b6781fec6d3c2af1087961f317e4e096780dd29fabac43f10d1fa |
|
MD5 | bacceb24f85fe901069d94f9ba7e95c9 |
|
BLAKE2b-256 | 8cc879f5ba6ceb4ebc6d7efa12219fc3db9fc49ad721399e1625c2b760951122 |
File details
Details for the file tensorflow_gnn-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: tensorflow_gnn-0.2.0-py3-none-any.whl
- Upload date:
- Size: 364.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd8344d950589c9a43d3565d9648d69dec58f9a6d20a89cb040d6576072eb375 |
|
MD5 | ecb9c80865f195b9191429b7a7408c32 |
|
BLAKE2b-256 | 0525ab19ae0d1e35280568b701eabdb8fa6d6bd9200cd3e8f2200ee294bf907b |