入门
进阶内容
API 参考
copy_u()
说明
杂项
内置消息函数,使用源节点特征计算消息。
u (str) – 源特征字段。
out (str) – 输出消息字段。
示例
>>> import dgl >>> message_func = dgl.function.copy_u('h', 'm')
上述示例等价于以下用户自定义函数
>>> def message_func(edges): >>> return {'m': edges.src['h']}