yinboc/prototypical-network-pytorch

Selecting support and query sets randomly

Closed this issue · 1 comments

Thank you for sharing your code.

If I understood correctly, you don't sample support and query sets randomly unlike the original paper of Protonet. Can this be the reason of overfitting on custom dataset?

data, _ = [_.cuda() for _ in batch] 
p = args.shot * args.train_way
data_shot, data_query = data[:p], data[p:]

Sorry, actually now I just noticed that you do select them randomly.
pos = torch.randperm(len(l))[:self.n_per]