oscarknagg / few-shot

Repository for few-shot learning machine learning projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could you please elaborate the following line? why not use the y coming from batch?

nooralahzadeh opened this issue · comments

y = create_nshot_task_label(k, q).cuda().repeat(meta_batch_size)

I think I figured it out. You consider the set of classes whose contribute in the n-shot task. However the 'y' coming from batch has all the classes. am I right?

Yes thats right. The y coming from the batch is the underlying class from the whole dataset (>1000 classes for Omniglot, 80 for miniImageNet). We don't want want to use the true class just the label of each sample within that particular n-shot task. Nicely figured out!

Yes thats right. The y coming from the batch is the underlying class from the whole dataset (>1000 classes for Omniglot, 80 for miniImageNet). We don't want want to use the true class just the label of each sample within that particular n-shot task. Nicely figured out!

But the predict of the model('logits') seems would be optimized like:
[[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]] because of the fixed label [0, 1, 2, 3, 4]. I'm so confused about that. Could you please explain this? @nooralahzadeh @oscarknagg , thanks a lot!!

I think I agree with @lyrgwlr here. Why can't the model learn to ignore the information and just output the correct answer depending on the position of the task?