pytorch-sgns
pytorch-sgns copied to clipboard
Skipgram Negative Sampling implemented in PyTorch
In your code, you minimized `-(oloss + nloss).mean()` which means (oloss+nloss) should be large. So, "oloss become large and nloss become small " is expected. Although -(oloss+nloss) decrease, I got...
torch tqdm
![screenshot from 2018-06-28 19-07-42](https://user-images.githubusercontent.com/25350960/42046672-0e8c5364-7b07-11e8-9f26-dd972c459b31.png) In this formula we have an expectation of $w_i$. That means for each pair of $(w_I, w_O)$ we should calculate this expectation. But as I can...
Why code below, in the project, can be used as "loss". ` oloss = t.bmm(ovectors, ivectors).squeeze().sigmoid().log().mean(1) nloss = t.bmm(nvectors, ivectors).squeeze().sigmoid().log().view(-1, context_size, self.n_negs).sum(2).mean(1)` In my judgment, "loss" should be "prediction" -...
Hi, Can you please explain, what is the purpose of including the `` tokens in the `owords` vector produced by `skipgram` function? What should model learn by using these as...