开始使用
先进材料
API 参考
copy_u()
注释
杂项
内置消息函数,使用源节点特征计算消息。
u (str) – 源特征字段。
out (str) – The output message field.
示例
>>> import dgl >>> message_func = dgl.function.copy_u('h', 'm')
上面的例子等同于以下用户定义的函数:
>>> def message_func(edges): >>> return {'m': edges.src['h']}