Edge softmax on DGLHeteroGraph

Hi, I have a DGLHeteroGraph with 3 different types of edges. Each edge has a feature “attn_before_softmax”. For each node, I want to do softmax on all its incoming edges (3 types together). I tried the function group_apply_edges, but it seems that it can only be applied to one type of edge at a time (i.e. it cannot do softmax on 3 types of edge together). Is there an alternative way to do that? Any suggestions or tips would be appreciated.

Hi, you can first use our to_homo api to convert the heterograph to a homo graph, then apply edge_softmax api to compute the softmax value (normalized by destination nodes) and convert the homo graph to a heterograph with our to_hetero api.