floodsung / LearningToCompare_FSL

PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
MIT License
1.04k stars 267 forks source link

Question about training and testing using the same dataset. #28

Open LiXirong opened 5 years ago

LiXirong commented 5 years ago

In miniImagenet_train_few_shot.py and miniImagenet_test_few_shot.py line 15: import task_generator_test as tg

in task_generator_test.py line 28 and 29: train_folder = '../datas/miniImagenet/train' test_folder = '../datas/miniImagenet/test'

it seems that you training and testing on the same dataset, without using the 'val' dataset.

Is this right to train and test in this way???

If I train with train_set and val_set, can I get the same accuracy score in test_set?

Errorfinder commented 4 years ago

Hi, i think there is a misread about the code: in task_generator using train_folder = '../datas/miniImagenet/train' test_folder = '../datas/miniImagenet/val' and in task_generator_test using train_folder = '../datas/miniImagenet/train' test_folder = '../datas/miniImagenet/test' where in second part the training data is redundant, anyway it is not used.

chocoford commented 4 years ago

same question. It only imports task_generator_test both in miniimagenet_test_few_shot.py and miniimagenet_train_few_shot.py.