(self, img)
return img
Args:
            img (PIL Image or Tensor): Input image.

        Returns:
            PIL Image or Tensor: Color jittered image.
Args:
            img (PIL Image or Tensor): Input image.
Args : img ( PIL Image or Tensor ) : Input image .
def forward(self, img):
        """
        Args:
            img (PIL Image or Tensor): Input image.

        Returns:
            PIL Image or Tensor: Color jittered image.
        """
        fn_idx, brightness_factor, contrast_factor, saturation_factor, hue_factor = \
            self.get_params(self.brightness, self.contrast, self.saturation, self.hue)

        for fn_id in fn_idx:
            if fn_id == 0 and brightness_factor is not None:
                img = F.adjust_brightness(img, brightness_factor)
            elif fn_id == 1 and contrast_factor is not None:
                img = F.adjust_contrast(img, contrast_factor)
            elif fn_id == 2 and saturation_factor is not None:
                img = F.adjust_saturation(img, saturation_factor)
            elif fn_id == 3 and hue_factor is not None:
                img = F.adjust_hue(img, hue_factor)

        return img
def forward ( self , img ) : fn_idx , brightness_factor , contrast_factor , saturation_factor , hue_factor = self . get_params ( self . brightness , self . contrast , self . saturation , self . hue ) for fn_id in fn_idx : if fn_id == 0 and brightness_factor is not None : img = F . adjust_brightness ( img , brightness_factor ) elif fn_id == 1 and contrast_factor is not None : img = F . adjust_contrast ( img , contrast_factor ) elif fn_id == 2 and saturation_factor is not None : img = F . adjust_saturation ( img , saturation_factor ) elif fn_id == 3 and hue_factor is not None : img = F . adjust_hue ( img , hue_factor ) return img