dgl.readout

Graph Readout

sum_nodes(graph, feat[, weight]) Sums all the values of node field feat in graph, optionally multiplies the field by a scalar node field weight.
sum_edges(graph, feat[, weight]) Sums all the values of edge field feat in graph, optionally multiplies the field by a scalar edge field weight.
mean_nodes(graph, feat[, weight]) Averages all the values of node field feat in graph, optionally multiplies the field by a scalar node field weight.
mean_edges(graph, feat[, weight]) Averages all the values of edge field feat in graph, optionally multiplies the field by a scalar edge field weight.
max_nodes(graph, feat) Take elementwise maximum over all the values of node field feat in graph
max_edges(graph, feat) Take elementwise maximum over all the values of edge field feat in graph
topk_nodes(graph, feat, k[, descending, idx]) Return graph-wise top-k node features of field feat in graph ranked by keys at given index idx.
topk_edges(graph, feat, k[, descending, idx]) Return graph-wise top-k edge features of field feat in graph ranked by keys at given index idx.
softmax_nodes(graph, feat) Apply batch-wise graph-level softmax over all the values of node field feat in graph.
softmax_edges(graph, feat) Apply batch-wise graph-level softmax over all the values of edge field feat in graph.
broadcast_nodes(graph, feat_data) Broadcast feat_data to all nodes in graph, and return a tensor of node features.
broadcast_edges(graph, feat_data) Broadcast feat_data to all edges in graph, and return a tensor of edge features.