torch_geometric.transforms.RemoveSelfLoops
- class RemoveSelfLoops(attr: str = 'edge_weight')[source]
Bases:
BaseTransform
Removes all self-loops in the given homogeneous or heterogeneous graph (functional name:
remove_self_loops
).- Parameters:
attr (str, optional) – The name of the attribute of edge weights or multi-dimensional edge features to pass to
torch_geometric.utils.remove_self_loops()
. (default:"edge_weight"
)