Pytorch color jitter

That’s weird, as I get the exact same outputs:

img = transforms.ToPILImage()(torch.randn(3, 224, 224))

color_jitter = transforms.ColorJitter(brightness=0.0, contrast=0., saturation=0., hue=0.)
transform = transforms.ColorJitter.get_params(
    color_jitter.brightness, color_jitter.contrast, color_jitter.saturation,
    color_jitter.hue)

img_trans1 = transform(img)
img_trans2 = transform(img)

print((np.array(img) == np.array(img_trans1)).all())
> True
print((np.array(img) == np.array(img_trans2)).all())
> True
print((np.array(img_trans1) == np.array(img_trans1)).all())
> True

Could you check your code for other transformations, which could change the output?