torch_geometric.transforms.RandomScale
- class RandomScale(scales: Tuple[float, float])[source]
Bases:
BaseTransform
Scales node positions by a randomly sampled factor \(s\) within a given interval, e.g., resulting in the transformation matrix (functional name:
random_scale
).\[\begin{split}\begin{bmatrix} s & 0 & 0 \\ 0 & s & 0 \\ 0 & 0 & s \\ \end{bmatrix}\end{split}\]for three-dimensional positions.
- Parameters:
scales (tuple) – scaling factor interval, e.g.
(a, b)
, then scale is randomly sampled from the range \(a \leq \mathrm{scale} \leq b\).