sherjilozair / char-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for character-level language models in Python using Tensorflow
MIT License
2.64k stars 960 forks source link

Tuning the temperature #22

Open aamelegy opened 8 years ago

aamelegy commented 8 years ago

Is there a way to tune the temperature parameter ?

Temperature. An important parameter you may want to play with is -temperature, which takes a number in range (0, 1] (0 not included), default = 1. The temperature is dividing the predicted log probabilities before the Softmax, so lower temperature will cause the model to make more likely, but also more boring and conservative predictions. Higher temperatures cause the model to take more chances and increase diversity of results, but at a cost of more mistakes. https://github.com/karpathy/char-rnn

hunkim commented 8 years ago

I think it's a good feature to implement. Can you come up with a PR?