dgl.ops.copy_e_mean

dgl.ops.copy_e_mean(g, x)

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

Parameters
  • g (DGLHeteroGraph) – 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 mean function will return zero for nodes with no incoming messages.