RemoveSelfLoop¶
-
class
dgl.transforms.
RemoveSelfLoop
[source]¶ Bases:
dgl.transforms.module.BaseTransform
Remove self-loops for each node in the graph and return a new graph.
For heterogeneous graphs, this operation only applies to edge types with same source and destination node types.
Example
Case1: Remove self-loops for a homogeneous graph
Case2: Remove self-loops for a heterogeneous graph