torch_geometric.transforms.FixedPoints

class FixedPoints(num: int, replace: bool = True, allow_duplicates: bool = False)[source]

Bases: BaseTransform

Samples a fixed number of points and features from a point cloud (functional name: fixed_points).

Parameters:
  • num (int) – The number of points to sample.

  • replace (bool, optional) – If set to False, samples points without replacement. (default: True)

  • allow_duplicates (bool, optional) – In case replace is :obj`False` and num is greater than the number of points, this option determines whether to add duplicated nodes to the output points or not. In case allow_duplicates is False, the number of output points might be smaller than num. In case allow_duplicates is True, the number of duplicated points are kept to a minimum. (default: False)