ayulockin / SwAV-TF

TensorFlow implementation of "Unsupervised Learning of Visual Features by Contrasting Cluster Assignments".
https://app.wandb.ai/authors/swav-tf/reports/Unsupervised-Visual-Representation-Learning-with-SwAV--VmlldzoyMjg3Mzg
Apache License 2.0
85 stars 12 forks source link

image loaders don't produce augmentations from the same image #11

Closed AmrKhalifa closed 3 years ago

AmrKhalifa commented 3 years ago

Hi, I was looking into the notebook initial_notebooks/MultiCropDataset_Architecture.ipynb

and I am curious, when visualizing the images from im1, im2, im3 tensors why do they contain different images, for instance, I would expect im1[0], im2[0], im3[0]. to be different augmentations from the same image, but this is not the case here. I am probably getting something wrong.

sayakpaul commented 3 years ago

Yes, that's a known issue. If you simply disable tf.data.Options it will go away.

AmrKhalifa commented 3 years ago

great, thanks !

yuvaramsingh94 commented 3 years ago

hi i tried to set options = None but this did not help in my case . i set the seed=1 on the shuffle(1024) (multicrop_dataset.py) and set options.experimental_deterministic=True . this helped me solve the issue . pls suggest if this is a correct method to do

sayakpaul commented 3 years ago

Yes, it's correct. You can also disable all the options that come from tf.data.Options().