dgl.function.copy_src

dgl.function.copy_src(src, out)[source]

Builtin message function that computes message using source node feature.

Notes

This function is deprecated. Please use copy_u instead.

Parameters
  • src (str) – The source feature field.

  • out (str) – The output message field.

Examples

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

The above example is equivalent to the following user defined function:

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