CharRNNモデルのトレーニングと文章の生成
● 文章の生成
● トレーニングしたモデルを読み込み、出力文字数を指定して文章を生成する。
37
rnn= CharRNN(len(chars), sampling=True)
print(rnn.sample(ckpt_dir='./model-200/', output_length=500))
The spare and word in to in mine
ther so may.
Enter.
King. The werare the weard, and the soure they beought weakes will,
But the shall be things, this whale a man thought,
That wime hered one, it ald wards to the tree to the whine
Ham. Ild haue hould thy bin the sornes will be ow ere heate,
To bet an hather and thongile and as the Criust, that Ild deelath
they,
All to be is me wat my shall well heaue,
The King and was it on the the master, mont whine the
Treest stath of all the spalaino thele