# dgl.ops.u_sub_e¶

dgl.ops.u_sub_e(g, x, y)

Generalized SDDMM function. It computes edge features by sub source node features and edge features.

Parameters
• g (DGLHeteroGraph) – 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.