wvangansbeke / Unsupervised-Classification

SCAN: Learning to Classify Images without Labels, incl. SimCLR. [ECCV 2020]
https://arxiv.org/abs/2005.12320
Other
1.37k stars 268 forks source link

Purpose of Memory Bank #98

Closed HenryPengZou closed 2 years ago

HenryPengZou commented 2 years ago

Hi, thanks for your great work!

I have a question regarding the usage of the memory bank when mining nearest neighbors in the following lines:

https://github.com/wvangansbeke/Unsupervised-Classification/blob/a1fecf288739d0dadde43f24328a8683813e386c/tutorial_nn.py#L54-L65

Can't we directly mine nearest neighbors from base_dataset and val_dataset? Why do we bother to use the memory bank?

Thanks a lot for your help in advance.

wvangansbeke commented 2 years ago

Hi @HenryPengZou,

The memory bank is used to store the features for all images and subsequently mine the nearest neighbors for each image (see MemoryBank.update method. The base_dataset is used to adopt a different set of augmentations (i.e. validation set augmentations).

HenryPengZou commented 2 years ago

I see, thank you~