diff options
author | Alex Auvolat <alex@adnab.me> | 2016-03-08 13:26:28 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-03-08 13:26:28 +0100 |
commit | 2f479926c16d2911d0dd878c21de082abfc5b237 (patch) | |
tree | b399e9ad9af04a9449334dff1a47449808b7ca13 /gentext.py | |
parent | 23093608e0edc43477c3a2ed804ae1016790f7e4 (diff) | |
download | text-rnn-2f479926c16d2911d0dd878c21de082abfc5b237.tar.gz text-rnn-2f479926c16d2911d0dd878c21de082abfc5b237.zip |
Revive project
Diffstat (limited to 'gentext.py')
-rw-r--r-- | gentext.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -46,7 +46,7 @@ class GenText(SimpleExtension): sys.stdout.write(self.init_text) while v.shape[1] < self.max_bytes: prob = prob / 1.00001 - pred = numpy.random.multinomial(1, prob[0, :]).nonzero()[0][0] + pred = numpy.random.multinomial(1, prob[0, :]).nonzero()[0][0].astype('int16') v = numpy.concatenate([v, pred[None, None]], axis=1) sys.stdout.write(chr(int(pred))) |