torch_geometric.transforms.GridSampling
- class GridSampling(size: Union[float, List[float], Tensor], start: Optional[Union[float, List[float], Tensor]] = None, end: Optional[Union[float, List[float], Tensor]] = None)[source]
Bases:
BaseTransform
Clusters points into fixed-sized voxels (functional name:
grid_sampling
). Each cluster returned is a new point based on the mean of all points inside the given cluster.- Parameters:
size (float or [float] or Tensor) – Size of a voxel (in each dimension).
start (float or [float] or Tensor, optional) – Start coordinates of the grid (in each dimension). If set to
None
, will be set to the minimum coordinates found indata.pos
. (default:None
)end (float or [float] or Tensor, optional) – End coordinates of the grid (in each dimension). If set to
None
, will be set to the maximum coordinates found indata.pos
. (default:None
)