Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bias in augmented loss + fix perplexity #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drauh
Copy link

@drauh drauh commented Aug 7, 2017

  • removing bias in augmented loss calculation (needed to add a Bias layer for the weight tying model)
  • now the last layer of the augmented model is a softmax. We use the log to recover pre-activation
  • fix categorical crossentropy calculation for perplexity and augmented loss, it was the opposite ordering
  • fixing running average perplexity calculation by using a hacky callback which exponentiated a running average of the cross-entropy. This replicate this implementation here (however because of the convexity this will only make its value bigger)
  • removing explicit tensorflow dependency

Everything is running well but I couldn't check the performance for more than 2 epochs since I don't have a GPU so that training is very slow...

Fix perplexity calculation

From [there]{https://github.com/tensorflow/models/blob/3d792f935d652b2c7793b95aa3351a5551dc2401/tutorials/rnn/ptb/ptb_word_lm.py#L319}
Fix categorical_crossentropy argument ordering

* this was probably the main bug of the perplexity implementation, now it is much smaller
Fix categorical_crossentropy argument ordering

* Fix categorical_crossentropy argument ordering in augmented loss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant