katerakelly / pytorch-maml

PyTorch implementation of MAML: https://arxiv.org/abs/1703.03400
MIT License
553 stars 129 forks source link

get_data_loader function gets same train samples #9

Open whcjb opened 6 years ago

whcjb commented 6 years ago

Hi kelly, I read the code and find that the get_data_loader function get the same batch samples every iteration, is that you want? (sorry, I'm not familiar with the maml algorithm.)

below is the samples got from the get_data_loader funtion.

('test train loader: ', ['../data/omniglot/images_evaluation/Kannada/character01/1205_20.png', '../data/omniglot/images_evaluation/Manipuri/character05/1323_07.png', '../data/omniglot/images_evaluation/Angelic/character06/0970_19.png', '../data/omniglot/images_evaluation/ULOG/character14/1611_15.png', '../data/omniglot/images_evaluation/Keble/character02/1247_11.png', '../data/omniglot/images_evaluation/Kannada/character05/1209_20.png', '../data/omniglot/images_evaluation/Sylheti/character05/1507_12.png', '../data/omniglot/images_evaluation/Manipuri/character15/1333_01.png', '../data/omniglot/images_evaluation/Kannada/character27/1231_08.png', '../data/omniglot/images_evaluation/Mongolian/character30/1388_20.png', '../data/omniglot/images_evaluation/Keble/character07/1252_12.png', '../data/omniglot/images_evaluation/Tibetan/character05/1560_19.png', '../data/omniglot/images_evaluation/Glagolitic/character14/1128_04.png', '../data/omniglot/images_evaluation/Ge_ez/character06/1094_07.png', '../data/omniglot/images_evaluation/Avesta/character05/1067_17.png', '../data/omniglot/images_evaluation/Malayalam/character05/1276_16.png', '../data/omniglot/images_evaluation/Aurek-Besh/character03/1039_18.png', '../data/omniglot/imagesevaluation/Syriac(Serto)/character14/1493_07.png', '../data/omniglot/images_evaluation/Keble/character16/1261_09.png', '../data/omniglot/images_evaluation/Aurek-Besh/character13/1049_15.png']) ('test train loader: ', ['../data/omniglot/imagesevaluation/Syriac(Serto)/character14/1493_07.png', '../data/omniglot/images_evaluation/Sylheti/character05/1507_12.png', '../data/omniglot/images_evaluation/Keble/character16/1261_09.png', '../data/omniglot/images_evaluation/Ge_ez/character06/1094_07.png', '../data/omniglot/images_evaluation/Tibetan/character05/1560_19.png', '../data/omniglot/images_evaluation/Manipuri/character05/1323_07.png', '../data/omniglot/images_evaluation/Kannada/character05/1209_20.png', '../data/omniglot/images_evaluation/Manipuri/character15/1333_01.png', '../data/omniglot/images_evaluation/Avesta/character05/1067_17.png', '../data/omniglot/images_evaluation/ULOG/character14/1611_15.png', '../data/omniglot/images_evaluation/Glagolitic/character14/1128_04.png', '../data/omniglot/images_evaluation/Malayalam/character05/1276_16.png', '../data/omniglot/images_evaluation/Aurek-Besh/character13/1049_15.png', '../data/omniglot/images_evaluation/Kannada/character01/1205_20.png', '../data/omniglot/images_evaluation/Keble/character02/1247_11.png', '../data/omniglot/images_evaluation/Angelic/character06/0970_19.png', '../data/omniglot/images_evaluation/Aurek-Besh/character03/1039_18.png', '../data/omniglot/images_evaluation/Mongolian/character30/1388_20.png', '../data/omniglot/images_evaluation/Kannada/character27/1231_08.png', '../data/omniglot/images_evaluation/Keble/character07/1252_12.png']) ('test train loader: ', ['../data/omniglot/images_evaluation/Kannada/character05/1209_20.png', '../data/omniglot/images_evaluation/Malayalam/character05/1276_16.png', '../data/omniglot/images_evaluation/Manipuri/character05/1323_07.png', '../data/omniglot/images_evaluation/Tibetan/character05/1560_19.png', '../data/omniglot/images_evaluation/Kannada/character27/1231_08.png', '../data/omniglot/images_evaluation/Ge_ez/character06/1094_07.png', '../data/omniglot/images_evaluation/Keble/character16/1261_09.png', '../data/omniglot/images_evaluation/Kannada/character01/1205_20.png', '../data/omniglot/images_evaluation/Glagolitic/character14/1128_04.png', '../data/omniglot/images_evaluation/Angelic/character06/0970_19.png', '../data/omniglot/images_evaluation/Aurek-Besh/character03/1039_18.png', '../data/omniglot/images_evaluation/ULOG/character14/1611_15.png', '../data/omniglot/images_evaluation/Aurek-Besh/character13/1049_15.png', '../data/omniglot/images_evaluation/Keble/character02/1247_11.png', '../data/omniglot/images_evaluation/Sylheti/character05/1507_12.png', '../data/omniglot/images_evaluation/Avesta/character05/1067_17.png', '../data/omniglot/images_evaluation/Manipuri/character15/1333_01.png', '../data/omniglot/imagesevaluation/Syriac(Serto)/character14/1493_07.png', '../data/omniglot/images_evaluation/Mongolian/character30/1388_20.png', '../data/omniglot/images_evaluation/Keble/character07/1252_12.png']) ('test train loader: ', ['../data/omniglot/images_evaluation/Keble/character02/1247_11.png', '../data/omniglot/images_evaluation/ULOG/character14/1611_15.png', '../data/omniglot/images_evaluation/Tibetan/character05/1560_19.png', '../data/omniglot/images_evaluation/Kannada/character27/1231_08.png', '../data/omniglot/images_evaluation/Kannada/character05/1209_20.png', '../data/omniglot/imagesevaluation/Syriac(Serto)/character14/1493_07.png', '../data/omniglot/images_evaluation/Aurek-Besh/character03/1039_18.png', '../data/omniglot/images_evaluation/Avesta/character05/1067_17.png', '../data/omniglot/images_evaluation/Glagolitic/character14/1128_04.png', '../data/omniglot/images_evaluation/Malayalam/character05/1276_16.png', '../data/omniglot/images_evaluation/Mongolian/character30/1388_20.png', '../data/omniglot/images_evaluation/Manipuri/character15/1333_01.png', '../data/omniglot/images_evaluation/Manipuri/character05/1323_07.png', '../data/omniglot/images_evaluation/Aurek-Besh/character13/1049_15.png', '../data/omniglot/images_evaluation/Sylheti/character05/1507_12.png', '../data/omniglot/images_evaluation/Kannada/character01/1205_20.png', '../data/omniglot/images_evaluation/Ge_ez/character06/1094_07.png', '../data/omniglot/images_evaluation/Keble/character07/1252_12.png', '../data/omniglot/images_evaluation/Keble/character16/1261_09.png', '../data/omniglot/images_evaluation/Angelic/character06/0970_19.png']) ('test train loader: ',

whcjb commented 6 years ago

is this a bug or is this the way of the maml algorithm?

katerakelly commented 6 years ago

What do you mean? These are not the same batches.

RAntonello commented 5 years ago

Aren't they? They are just shuffled versions of one another. Each batch contains the same set of images.