tfgnn.homogeneous

December 14, 2023 ยท View on GitHub

View source on GitHub

Constructs a homogeneous GraphTensor with node features and one edge_set.

source A dense Tensor with the source indices for edges
target A dense Tensor with the target indices for edges
node_features A Tensor or mapping from feature name to Tensor of features corresponding to graph nodes.
edge_features Optional Tensor or mapping from feature name to Tensor of features corresponding to graph edges.
context_features Optional Tensor or mapping from name to Tensor for the context (entire graph)
node_set_name Optional name for the node set
edge_set_name Optional name for the edge set
node_set_sizes Optional Tensor with the number of nodes per component. If this is provided, edge_set_sizes should also be passed and it should be the same length.
edge_set_sizes Optional Tensor with the number of edges per component. If this is provided, node_set_sizes should also be passed and it should be the same length.
A scalar GraphTensor with a single node set and edge set.