dgl.ops.copy_e_sum

dgl.ops.copy_e_sum(g, x)

广义SpMM函数。它将边特征视为消息。 然后在目标节点上通过求和来聚合消息。

Parameters:
  • g (DGLGraph) – The input graph

  • x (tensor) – The edge features.

Returns:

结果张量。

Return type:

张量

注释

此函数支持自动梯度(根据输出梯度计算输入梯度)。

对于没有传入消息的节点,sum函数将返回零。