Questions regarding the sampler
leehelenah opened this issue · comments
Hi,
In Configuration.md, you mentioned
sampler: If loss type is NCE, sampler is needed. Candidate: "fixed", "log", "learned", "uniform".
num_sampled: If loss type is NCE, need to sample negative labels.
Maybe I am wrong, but I cannot find the implementation of these samplers. Has it been finished yet?
What do you mean by NCE?
Would that be fine if I use BCEWithLogitsLoss with the sampler to 'uniform'?
Thank you very much for sharing this repo. It's very useful.
sorry, the sampler
and num_sampler
are hyper parameters for nce_loss, which not released in this version, we may consider support it lately.
NCE loss is not implemented in Pytorch ,you can refer by tensorflow nce_loss.