dgl.ops.copy_e_max

dgl.ops.copy_e_max(g, x)

Generalized SpMM function. It regards edge feature as message. Then aggregates the message by max on destination nodes.

Parameters
  • g (DGLGraph) – The input graph

  • x (tensor) – The edge features.

Returns

The result tensor.

Return type

tensor

Notes

This function supports autograd (computing input gradients given the output gradient).

The max function will return zero for nodes with no incoming messages. This is implemented by replacing all negative infinity values to zero.