MAML-Pytorch icon indicating copy to clipboard operation
MAML-Pytorch copied to clipboard

Re-sampling tasks after each epoch increases the performance

Open ShawnLixx opened this issue 5 years ago • 3 comments

The create_batch function is only called once when the MiniImagenet dataset object is created, which means the tasks sampled are the same in every epoch.

I changed the code to second-order (according to https://github.com/dragen1860/MAML-Pytorch/issues/32) and call create_batch in every epoch, the performance can achieve 47.17%.

ShawnLixx avatar Oct 22 '19 08:10 ShawnLixx

Lol. Thanks for your result. I think the author is busy making money... He does not care about this little bug. For those who want to implement maml. I recommend https://towardsdatascience.com/advances-in-few-shot-learning-reproducing-results-in-pytorch-aba70dee541d

Vampire-Vx avatar Oct 23 '19 02:10 Vampire-Vx

Lol. Thanks for your result. I think the author is busy making money... He does not care about this little bug. For those who want to implement maml. I recommend https://towardsdatascience.com/advances-in-few-shot-learning-reproducing-results-in-pytorch-aba70dee541d

Thanks, I'll check that.

ShawnLixx avatar Oct 23 '19 04:10 ShawnLixx

The create_batch function is only called once when the MiniImagenet dataset object is created, which means the tasks sampled are the same in every epoch.

I changed the code to second-order (according to #32) and call create_batch in every epoch, the performance can achieve 47.17%.

@ShawnLixx Hi! I have run this code on miniImageNet, I can get almost 47% accuracy on testing dataset. However, when I save the corresponding best model, and load it on my testing code, I can only get 44% accuracy, is there any insight you can provide to help me fix this problem? Or can you tell me the way of how you implement the test code?

zzpustc avatar Dec 09 '20 11:12 zzpustc