orobix / Prototypical-Networks-for-Few-shot-Learning-PyTorch

Implementation of Prototypical Networks for Few Shot Learning (https://arxiv.org/abs/1703.05175) in Pytorch
MIT License
986 stars 210 forks source link

Testing Error #18

Closed ralphatobe closed 5 years ago

ralphatobe commented 5 years ago

When testing, the network calculates loss using the number of supports specified for the training regime. This appears to be an error, but perhaps I've missed something?

_, acc = loss_fn(model_output, target=y, n_support=opt.num_support_tr)

To me, this line should be

_, acc = loss_fn(model_output, target=y, n_support=opt.num_support_val)

dnlcrl commented 5 years ago

fixed in 5e18a5e5b369903092f683d434efb12c7c40a83c, thank you!