I define a image flipping class. I am wondering whether this class will realize image flipping during training
#flip image
class HorizontallyFlipline(object):
def __call__(self, img, xx3,xx4):
    if abs(xx3[-1]-0.5)>0.1 or abs(xx4[-1]-0.5)>0.1:    
        return img.transpose(Image.FLIP_LEFT_RIGHT), 1-xx3,1-xx4
    return img, xx3,xx4

My dataset for pytorch is:
self.mytransforms=HorizontallyFlipline()
def __getitem__(self,index):
...
if self.mirror:
     img,lp3,lp4=self.mytransforms(img,lp3,lp4) #does it will flip image during training??????? 
...