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

Something wrong when i set num_query_val to 1. #16

Closed P-DX closed 5 years ago

P-DX commented 5 years ago

Hello, thank you for the code provided. When I set num_query_val to 1, why val_acc and test_acc will not change, and it is always about num_query_val / classes_per_it_val, can you tell me what went wrong? Thank you! Looking forward to your reply.

d-li14 commented 5 years ago

Because function torch.eq here yields a 5x5 identity matrix.