dgl.function.copy_e

dgl.function.copy_e(e, out)[源代码]

内置消息函数,使用边特征计算消息。

参数:
  • e (str) – 边特征字段。

  • out (str) – 输出消息字段。

示例

>>> import dgl
>>> message_func = dgl.function.copy_e('h', 'm')

上面的例子等同于以下用户定义的函数

>>> def message_func(edges):
>>>     return {'m': edges.data['h']}