dgl.max_nodes

dgl.max_nodes(graph, feat)[source]

Take elementwise maximum over all the values of node field feat in graph

Parameters:
Returns:

The tensor obtained.

Return type:

tensor

Notes

If graph is a BatchedDGLGraph object, a stacked tensor is returned instead, i.e. having an extra first dimension. Each row of the stacked tensor contains the readout result of corresponding example in the batch. If an example has no nodes, a zero tensor with the same shape is returned at the corresponding row.