torch_geometric.transforms.RemoveSelfLoops

class RemoveSelfLoops(attr: str = 'edge_weight')[source]

Bases: BaseTransform

移除给定同质或异质图中的所有自环(功能名称:remove_self_loops)。

Parameters:

attr (str, optional) – 传递给torch_geometric.utils.remove_self_loops()的边权重或多维边特征的属性名称。 (默认值: "edge_weight")