-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
Hi, I have some questions about this loss function because there are some differences between the paper and the code.
First of all, the paper:

The loss is the sum of the average logsoftmax between the query point and other prototypes and the average distance between the query point and the corresponding prototypes.
But in the code:
log_p_y = F.log_softmax(-dists, dim=1).view(n_class, n_query, -1)
loss_val = -log_p_y.gather(2, target_inds).squeeze().view(-1).mean()The loss in code is only the sum of LogSoftmax between the query point and the corresponding prototypes.
I'm confused. Is it my understanding of the code or my understanding of the paper?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels