RandomChoice#

class torch_brain.transforms.RandomChoice(transforms, p=None)[source]#

Bases: object

Apply a single transformation randomly picked from a list.

Parameters:
  • transforms (List[Callable]) – list of transformations

  • p (list of floats, optional) – probability of each transform being picked. If p doesn’t sum to 1, it is automatically normalized. By default, all transforms have the same probability.