Comments (2)
Hi Tony,
Thanks for reporting, Here are the line-by-line replies.
It looks like --nce has been replaced by --loss nce and README.md should be updated.
Yes
firstly is the warning from rnn.py,
Here we use single-layer RNN so drop-out config is dismissed. Should be fixed later
secondly the perplexities are all zero.
Something must be wrong
Moving on to NCE, the reported train PPL is very low, the valid PPL very high.
Since the loss criterion is different during NCE training and evalutation, which is (NCE vs Cross-Entropy). The training PPL is just the perplexity between the noise samples and positive samples, it should be, by definition, lower than real Perplexity within the whole vocabulary.
Looking forward to further discussion!
from pytorch-nce.
Hey, thanks for getting back to me so quickly.
I'm not really concerned about argparse or dropout issues. This is the best public code for NCE in Language Modelling I could find, that's a great achievement.
Zero perplexities is not something I can easily look into, and is quite a blocker for someone like me just starting with the code.
I can help with the reported PPL under NCE. Firstly, for large tasks, NCE will self-normalise. That is \sum exp(x_i) will be about 1. When this happens you can report approx standard perplexity during training (dev/test sets are much smaller, it's good to report exact PPL by normalising).
It has been ten years since I really got into this, I hope I haven't forgotten too much.
from pytorch-nce.
Related Issues (14)
- main.py does not run 'as is' on penn data HOT 1
- Why need to sub math.log(self.noise_ratio) HOT 1
- Why the target index is not removed from noise samples? HOT 1
- Why the nec_linear output loss while output prob for testing? HOT 1
- why the labels in sampled_softmax_loss func are all zero? HOT 1
- Can I use this loss on my customization model ?
- Is the implementation batched NCE? HOT 1
- Error in NCE expression? HOT 1
- How to select negative samples for NCE loss HOT 1
- truncated bptt without padding? HOT 2
- num_layers does't work HOT 9
- why squeeze here? HOT 3
- Target Sample can be included in Noise sample HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-nce.