facebookresearch / suncet

Code to reproduce the results in the FAIR research papers "Semi-Supervised Learning of Visual Features by Non-Parametrically Predicting View Assignments with Support Samples" https://arxiv.org/abs/2104.13963 and "Supervision Accelerates Pre-training in Contrastive Semi-Supervised Learning of Visual Representations" https://arxiv.org/abs/2006.10803
MIT License
486 stars 67 forks source link

Version of CIFAR to run the example #7

Closed Aivan2008 closed 3 years ago

Aivan2008 commented 3 years ago

I cloned the code and tried to run it, but now the issue is - which version of CIFAR10 are you use in example? No data was downloaded automatically by the code. No python neither matlab or C++ version from official cite seems to be suitable for paths presented in the config file. Thank you for your answer.

MidoAssran commented 3 years ago

Hi, we use the default python version (which is the same as torchvision.CIFAR10).

In the config:

Here is an example to fix your issue. First download the python version you mentioned, an unzip, you will get a cifar-10-batches-py directory. Then create the following directory structure: |- datasets/ |-- cifar10-data/ |---- cifar-10-batches-py/

In your config specify: root_path: datasets/ image_folder: cifar10-data

I will update the README and configs to make this more clear.

jmarrietar commented 3 years ago

Hi @MidoAssran Thanks for the update in the README very clear.

I assume the python version was 3.8 since there are some operators as return *[self.dataset.transform(img) for _ in range(self.supervised_views)], target that are invalid in python 3.7 (The one that Google Colab uses)