RandomFlipLR#

class tonic.transforms.RandomFlipLR(sensor_size: Tuple[int, int, int], p: float = 0.5)[source]#

Flips events in x with probability p. Pixels map as:

x’ = width - x

Parameters:
  • sensor_size (Tuple[int, int, int]) – a 3-tuple of x,y,p for sensor_size

  • p (float) – probability of performing the flip

Example

>>> transform = tonic.transforms.RandomFlipLR(p=0.3)