mlx.data.Buffer.image_random_h_flip

mlx.data.Buffer.image_random_h_flip#

Buffer.image_random_h_flip(self: mlx.data._c.Buffer, key: str, prob: float, output_key: str = '') mlx.data._c.Buffer#

Horizontally flip the image prob percent of the time.

Parameters:
  • key (str) – The sample key that contains the array we are operating on.

  • prob (float) – The probability to flip an image.

  • output_key (str) – If it is not empty then write the result to this key instead of overwriting key. (default: ‘’)