pytorch-meta icon indicating copy to clipboard operation
pytorch-meta copied to clipboard

Miniimagenet Results?

Open cinjon opened this issue 5 years ago • 3 comments

Have you successfully used this library to train Miniimagenet with Prototypical Nets? The highest test accuracy that I have gotten was .52, and that was changing the transforms to additionally Normalize the image tensors and add in a step size scheduler that advances every 20 epochs.

cinjon avatar Mar 22 '20 13:03 cinjon

For reference, I tried the same settings using this library https://github.com/cyvius96/prototypical-network-pytorch and got the expected results. Having a lot of trouble getting miniimagenet to work with this library.

cinjon avatar Mar 22 '20 20:03 cinjon

The training parameters for 5-shot, 5-way are different to what is reported in Snell et al. (2017):

For meta-training:

  • --num_ways 20
  • --batch_size 1 (higher batch size might improve results)
  • --num_batches 10000 (Snell does early stopping with patience 200)
  • 5 support_shots / 15 query_shots
  • learning rate of 0.001 decayed by factor 0.5 every 2000 episodes (/batches)

For meta-testing:

  • --num_ways 5
  • rest as for training

Does this work? It should give something around 66%, which is still a bit lower than the reported results.

carmete avatar Mar 29 '20 18:03 carmete

has anyone tried it with MAML?

brando90 avatar Oct 08 '20 16:10 brando90