dgl.function.e_dot_v

dgl.function.e_dot_v(lhs_field, rhs_field, out)

内置消息函数,通过在e和v的特征之间执行元素级点积来计算边上的消息 如果特征具有相同的形状;否则,它首先将特征广播到新形状并执行元素级操作。

Broadcasting follows NumPy semantics. Please see https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html for more details about the NumPy broadcasting semantics.

Parameters:
  • lhs_field (str) – The feature field of e.

  • rhs_field (str) – The feature field of v.

  • out (str) – The output message field.

示例

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