Mephisto405 / Learning-Loss-for-Active-Learning

Reproducing experimental results of LL4AL [Yoo et al. 2019 CVPR]
215 stars 50 forks source link

uncertainty argsort wrong order #6

Closed sumukhaithal6 closed 4 years ago

sumukhaithal6 commented 4 years ago

Shouldn't we sort the uncertainty in descending order?(based on the paper) The most uncertain ones needs to be sent to the oracle. However in the code , np.argsort selects the sample in ascending order

Mephisto405 commented 4 years ago

See the following lines (268~267 of main.py);

# Update the labeled dataset and the unlabeled dataset, respectively
labeled_set += list(torch.tensor(subset)[arg][-ADDENDUM:].numpy())
unlabeled_set = list(torch.tensor(subset)[arg][:-ADDENDUM].numpy()) + unlabeled_set[SUBSET:]

I sorted the uncertainty in ascending order and append the "rightmost" elements to the labeled_set. So I actually put the most uncertain elements :)

sumukhaithal6 commented 4 years ago

Oh Okay, Thanks for your reply!