Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Efficient and Friendly Graph Neural Network Library for TensorFlow 1.x and 2.x
| Date | Stars |
|---|---|
| 2026-07-24 | 509 |
| 2026-07-25 | 509 |
| 2026-07-28 | 509 |
| 2026-07-30 | 509 |
| 2026-07-31 | 508 |
| 2026-08-08 | 508 |
| 2026-08-09 | 508 |
| 2026-08-16 | 508 |
| 2026-08-17 | 508 |
| 2026-08-18 | 508 |
| 2026-09-20 | 508 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center">
<img src="TF_GEOMETRIC_LOGO.png" width="400"/>
</p>
# tf_geometric
Efficient and Friendly Graph Neural Network (GNN) Library for TensorFlow 1.x and 2.x.
Inspired by __rusty1s/pytorch_geometric__, we build a GNN library for TensorFlow.
## Homepage and Documentation
+ Homepage: [https://github.com/CrawlScript/tf_geometric](https://github.com/CrawlScript/tf_geometric)
+ Documentation: [https://tf-geometric.readthedocs.io](https://tf-geometric.readthedocs.io) ([中文版](https://tf-geometric.readthedocs.io/en/latest/index_cn.html))
+ Paper: [Efficient Graph Deep Learning in TensorFlow with tf_geometric](https://arxiv.org/abs/2101.11552)
## Efficient and Friendly
We use Message Passing mechanism to implement Graph Neural Networks (GNNs), which is way efficient than the dense matrix based implementations and more friendly than the sparse matrix based ones.
In addition, we provide easy and elegant APIs for complex GNN operations.
The following example constructs a graph and applies a Multi-head Graph Attention Network (GAT) on it:
```python
# coding=utf-8
import numpy as np
import tf_geometric as tfg
import tensorflow as tf
graph = tfg.Graph(
x=np.random.randn(5, 20), # 5 nodes, 20 features,
edge_index=[[0, 0, 1, 3],
[1, 2, 2, 1]] # 4 undirected edges
)
print("Graph Desc: \n", graph)
graph = graph.to_directed() # pre-process edges
print("Processed Graph Desc: \n", graph)
print("Processed Edge Index:\n", graph.edge_index)
# Multi-head Graph Attention Network (GAT)
gat_layer = tfg.layers.GAT(units=4, num_heads=4, activation=tf.nn.relu)
output = gat_layer([graph.x, graph.edge_index])
print("Output of GAT: \n", output)
```
Output:
```html
Graph Desc:
Graph Shape: x => (5, 20) edge_index => (2, 4) y => None
Processed Graph Desc:
Graph Shape: x => (5, 20) edge_index => (2, 8) y => None
Processed Edge Index:
[[0 0 1 1 1 2 2 3]
[1 2 0 2 3 0 1 1]]
Output of GAT:
tf.Tensor(
[[0.22443159 0. 0.58263206 0.32468423]
[0.29810357 0. 0.19403605 0.35630274]
[0.18071976 0. 0.58263206 0.32468423]
[0.36123228 0. 0.88897204 0.450244 ]
[0. 0. 0.8013462 0. ]], shape=(5, 4), dtype=float32)
```
## DEMO
We recommend you to get started with some demo.
### Node Classification
+ [Graph Convolutional Network (GCN)](demo/demo_gcn.py)
+ [Multi-head Graph Attention Network (GAT)](demo/demo_gat.py)
+ [Approximate Personalized Propagation of Neural Predictions (APPNP)](demo/demo_appnp.py)
+ [Inductive Representation Learning on Large Graphs (GraphSAGE)](demo/demo_graph_sage_func.py)
+ [Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering (ChebyNet)](demo/demo_chebynet.py)
+ [Simple Graph Convolution (SGC)](demo/demo_sgc.py)
+ [Topology Adaptive Graph Convolutional Network (TAGCN)](demo/demo_tagcn.py)
+ [Deep Graph Infomax (DGI)](demo/demo_dgi.py)
+ [DropEdge: Towards Deep Graph Convolutional Networks on Node Classification (DropEdge)](demo/demo_drop_edge_gcn.py)
+ [Graph Convolutional Networks for Text Classification (TextGCN)](https://github.com/CrawlScript/TensorFlow-TextGCN)
+ [Simple Spectral Graph Convolution (SSGC/S^2GC)](demo/demo_ssgc.py)
### Graph Classification
+ [MeanPooling](demo/demo_mean_pool.py)
+ [Graph Isomorphism Network (GIN)](demo/demo_gin.py)
+ [Self-Attention Graph Pooling (SAGPooling)](demo/demo_sag_pool_h.py)
+ [Hierarchical Graph Representation Learning with Differentiable Pooling (DiffPool)](demo/demo_diff_pool.py)
+ [Order Matters: Sequence to Sequence for Sets (Set2Set)](demo/demo_set2set.py)
+ [ASAP: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representations (ASAP)](demo/demo_asap.py)
+ [An End-to-End Deep Learning Architecture for Graph Classification (SortPool)](demo/demo_sort_pool.py)
+ [Spectral Clustering with Graph Neural Networks for Graph Pooling (MinCutPool)](demo/demo_min_cut_pool.py)
### Link Prediction
+ [Graph Auto-Encoder (GAE)](demo/demo_gae.pExcerpt of 14,423 characters
Read on GitHub271
21
8
3
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:ff3be5687939a143, topic:tensorflow