jiangqy / ADSH-AAAI2018

source code for paper "Asymmetric Deep Supervised Hashing" on AAAI-2018
MIT License
81 stars 26 forks source link

where you load the train_img.txt about cifar10 dataset?? #10

Closed LiuChaoXD closed 3 years ago

LiuChaoXD commented 4 years ago

For the ADSH_pytorch, in the ADSH_CIFAR_10.py, I find you random sample the training set from database, the codes is as follows,

for iter in range(max_iter):
        iter_time = time.time()
        '''
        sampling and construct similarity matrix
        '''
        select_index = list(np.random.permutation(range(num_database)))[0: num_samples]
        _sampler = subsetsampler.SubsetSampler(select_index)
        trainloader = DataLoader(dset_database, batch_size=batch_size,
                                 sampler=_sampler,
                                 shuffle=False,
                                 num_workers=4)

However, follow your paper, the training set is randomly sample 500 images for each class. Such that there are 5000 training samples. so in your program there is a list "train_img.txt" with 5000 lines for training.

The problem is I cannot find any codes about loading the train_img.txt ?? can you introduce it clearly?

jiangqy commented 4 years ago

5000 samples are sampled from database_img.txt

https://github.com/jiangqy/ADSH-AAAI2018/blob/2e95574aaafa6ab139a142e5fb5020317384b338/ADSH_pytorch/ADSH_CIFAR_10.py#L196

zhangcheng-007 commented 3 years ago

I would like to ask whether each class of random sampling in the test set has an impact on MAP?And if it is completely random sampling, how will the results change?