CyberZHG / keras-gcn

Graph convolutional layers

Home Page:https://pypi.org/project/keras-gcn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keras Graph Convolutional Network

Graph convolutional layers.

Install

pip install keras-gcn

Usage

GraphConv

from tensorflow import keras
from keras_gcn import GraphConv


DATA_DIM = 3

data_layer = keras.layers.Input(shape=(None, DATA_DIM))
edge_layer = keras.layers.Input(shape=(None, None))
conv_layer = GraphConv(
    units=32,
    step_num=1,
)([data_layer, edge_layer])

step_num is the maximum distance of two nodes that could be considered as neighbors. If step_num is greater than 1, then the inputs of edges must be 0-1 matrices.

GraphMaxPool & GraphAveragePool

Pooling layers with the step_num argument.

About

Graph convolutional layers

https://pypi.org/project/keras-gcn/

License:MIT License


Languages

Language:Python 98.3%Language:Shell 1.7%