Default value is 1: sample at each character which leads to frequent neologisms in generated text,
Value 0 means always use the winner output which leads to loops in generated text since there is always the most frequent path (an attractor sequence),
My best empirical experience is with the (new) value 2, i.e.: Randomly sample only on the first character of a word and keep winner characters inside a word, thus breaking attractor loops but avoid neologisms by likely preserving correct word spelling.
The motivation of this pull request is to make minimal changes and keep the current code as much as possible -- of course this proposal can be optimized more.
Thank you for porting character language models to TensorFlow!
Pavel
Hello,
I have experimented a bit with several sampling methods and my proposal is to introduce the new command-line option similar to the original --sample option here: https://github.com/karpathy/char-rnn/blob/master/sample.lua#L29
The motivation of this pull request is to make minimal changes and keep the current code as much as possible -- of course this proposal can be optimized more.
Thank you for porting character language models to TensorFlow! Pavel