torch_geometric.transforms.RadiusGraph
- class RadiusGraph(r: float, loop: bool = False, max_num_neighbors: int = 32, flow: str = 'source_to_target', num_workers: int = 1)[source]
- Bases: - BaseTransform- 根据节点位置 - data.pos创建边,连接到给定距离内的所有点(函数名称:- radius_graph)。- Parameters:
- r (float) – 距离。 
- loop (bool, optional) – If - True, the graph will contain self-loops. (default:- False)
- max_num_neighbors (int, optional) – 返回 - y中每个元素的最大邻居数。 此标志仅适用于CUDA张量。(默认值:- 32)
- flow (str, optional) – The flow direction when using in combination with message passing ( - "source_to_target"or- "target_to_source"). (default:- "source_to_target")
- num_workers (int) – 用于计算的工人数量。如果 - batch不是- None,或者输入位于 GPU 上,则此参数无效。(默认值:- 1)