Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
koki0702 committed Jun 26, 2018
1 parent 2c89e94 commit 2de3dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch07/generate_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from rnnlm_gen import RnnlmGen
from dataset import ptb


corpus, word_to_id, id_to_word = ptb.load_data('train')
vocab_size = len(word_to_id)
corpus_size = len(corpus)
Expand All @@ -20,5 +21,4 @@
word_ids = model.generate(start_id, skip_ids)
txt = ' '.join([id_to_word[i] for i in word_ids])
txt = txt.replace(' <eos>', '.\n')

print(txt)

0 comments on commit 2de3dc9

Please sign in to comment.