about the matrix 'all_image_batches' in load_data.py
JJ-res101 opened this issue · 3 comments
hello!
In the matrix 'all_image_batches', why don't all shots in the same class come from the same class?
For instance, if I print 'images[0, 0, 0].reshape((28,28))' and 'images[0, 1, 0].reshape((28,28))', I do expect them to be the similar picture form same class.Thanks!
Sorry for closing too soon, there's some problem with my implementation that I recently fixed
I do expect them to be the similar picture form same class
They might be different, because MANN is not permutation invariant . MANN uses RNN, so there's chance it can blindly remembers the order of labels appear in test set. We better shuffle the order of data points.
But another questions arise is that if naively shuffle data points before splitting, some images in test set will be new to train set
For example:
Train set : [1, 1, 3, 4] Test set [3, 2, 4, 2]
To address both this issue, I shuffle(train_set) and (test_set) before concatenate them together, to ensure that the order of data points won't affect the model performance.
I fixed my implementation of load_data
at c1d2dd9
[Warning] My implementation of hw1_pytorch
and hw1_pytorch_cnn
before 7b2e8de was all wrong 😢, I will fix it in the next commit