(self, img)
return img
Args:
            img (PIL Image or Tensor): Image to be flipped.

        Returns:
            PIL Image or Tensor: Randomly flipped image.
Args:
            img (PIL Image or Tensor): Image to be flipped.
Args : img ( PIL Image or Tensor ) : Image to be flipped .
def forward(self, img):
        """
        Args:
            img (PIL Image or Tensor): Image to be flipped.

        Returns:
            PIL Image or Tensor: Randomly flipped image.
        """
        if torch.rand(1) < self.p:
            return F.hflip(img)
        return img
def forward ( self , img ) : if torch . rand ( 1 ) < self . p : return F . hflip ( img ) return img