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` andnum
is greater than the number of points, this option determines whether to add duplicated nodes to the output points or not. In caseallow_duplicates
isFalse
, the number of output points might be smaller thannum
. In caseallow_duplicates
isTrue
, the number of duplicated points are kept to a minimum. (default:False
)