PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
1.04k
stars
267
forks
source link
How to ensure each category in support set is the same as that in query set? #36
Closed
zhanyuanyang closed 3 years ago
Thanks for your code. as the title mentioned, codes at line 170/171 in _miniimagenet_train_fewshot.py and _miniimagenet_train_oneshot.py :
sample_dataloader = tg.get_mini_imagenet_data_loader(task,num_per_class=SAMPLE_NUM_PER_CLASS,split="train",shuffle=False) batch_dataloader = tg.get_mini_imagenet_data_loader(task,num_per_class=BATCH_NUM_PER_CLASS,split="test",shuffle=True)
confuse me a lot. It seems that these codes do not guarantee that the categories in the two sets are the same?