dgl.ops.u_div_e_meanο
- dgl.ops.u_div_e_mean(g, x, y)ο
Generalized SpMM function. It fuses two steps into one kernel.
Computes messages by div source node and edge features.
Aggregate the messages by mean as the features on destination nodes.
- Parameters:
g (DGLGraph) β The input graph
x (tensor) β The source node features.
y (tensor) β The edge features.
- Returns:
The result tensor.
- Return type:
tensor
Notes
This function supports autograd (computing input gradients given the output gradient). If the feature shape of two input operands do not match, we first broadcasts the features to a unified shape (note that the memory usage will not increase accordingly) and then performs the operation.
Broadcasting follows NumPy semantics. Please see https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html for more details about the NumPy broadcasting semantics.
The mean function will return zero for nodes with no incoming messages.