torch_geometric.transforms.RandomFlip

class RandomFlip(axis: int, p: float = 0.5)[source]

Bases: BaseTransform

Flips node positions along a given axis randomly with a given probability (functional name: random_flip).

Parameters:
  • axis (int) – The axis along the position of nodes being flipped.

  • p (float, optional) – Probability that node positions will be flipped. (default: 0.5)