Skip to content

Latest commit

 

History

History
117 lines (107 loc) · 2.81 KB

homogeneous.md

File metadata and controls

117 lines (107 loc) · 2.81 KB

tfgnn.homogeneous

View source on GitHub

Constructs a homogeneous GraphTensor with node features and one edge_set.

tfgnn.homogeneous(
    source: tf.Tensor,
    target: tf.Tensor,
    *,
    node_features: Optional[FieldOrFields] = None,
    edge_features: Optional[FieldOrFields] = None,
    context_features: Optional[FieldOrFields] = None,
    node_set_name: Optional[FieldName] = const.NODES,
    edge_set_name: Optional[FieldName] = const.EDGES,
    node_set_sizes: Optional[Field] = None,
    edge_set_sizes: Optional[Field] = None
) -> GraphTensor

Args

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.

Returns

A scalar GraphTensor with a single node set and edge set.