dgl.function.maxο
- dgl.function.max(msg, out)ο
Builtin reduce function that aggregates messages by max.
Examples
>>> import dgl >>> reduce_func = dgl.function.max('m', 'h')
The above example is equivalent to the following user defined function (if using PyTorch):
>>> import torch >>> def reduce_func(nodes): >>> return {'h': torch.max(nodes.mailbox['m'], dim=1)}