Char-RNN based Text generation
Tensorflow based implementation for char-RNN based text generation
Usage
usage: rnn_train.py [-h] [-s SEQLEN] [-b BATCHSIZE] [-hs HIDDENSIZE]
[-lr LEARNING_RATE] [-dr DROPOUT] [-nl {2,3,4}]
train character level GRU text_generation model
optional arguments:
-h, --help show this help message and exit
-s SEQLEN, --seqlen SEQLEN
sequence length
-b BATCHSIZE, --batchsize BATCHSIZE
batch size
-hs HIDDENSIZE, --hiddensize HIDDENSIZE
hidden state size of the GRU
-lr LEARNING_RATE, --learning_rate LEARNING_RATE
learning rate
-dr DROPOUT, --dropout DROPOUT
dropout value used in the GRU
-nl {2,3,4}, --num_layers {2,3,4}
number of GRU layers
Generated Outputs
Shakespeare
THE MERCHANT OF VENICE
ACT II
SCENE V The same and his son.
[Enter CLARENCE, and this shall hear thee for his head
to her a fire as he dost bear thy father in
him, the tribunes of the chamber of a more
of the court, and have the duke and honours
To say and see he was a fool, and he did speak
The sings of the content to him.
ALOMSO Why, then I say it is not so my fortune.
BRUTUS If your lords is no son, and you will be so many a fool
than you will never be that I have seen a father was a
charge. But I will see you are that you shall
be so made a man of your house as you shall be
to make your honour and my lord.
BASSANIO I am sure a word,
That will not say you shall be served and speek in
the word of your death in the world.
There were to mark my love, I say, that will you see thee,
I will be some and make the great one that we shall
be so fair as the masters of the day
To the world be some of the common cause of you are bound
The mare of your desires.
[Enter a March and all this arm and thine own parts are
to the carding of the wars, the trumpet of
the seat of the world, and his father shall
be thank of all the sense and they are a little fire,
And they will stay a father water to the sense
They will never be a fire on this day.
[Exit]
[They all that had to be the samish of the same.
[Enter a Marderer]
[Enter CLAUDIO, with the streets and the
servant of the world of the world]
[Enter CLEOPATRA] That with the senses of the state,
And when they say, the sea and seems of love
And some are more to say 'tis not the season to thy face,
The shadow of too seem that was an end,
And what thou say'st to see the world to the world
That thou wert noble but the devil to the warling, and they
should hear thee and here, that I was a son
That the world beat the seasons of my soul
That the world be thy fortune be a fool,
And to the stars, and to thy father's heart,
And what they shall be so that we shall see my father's
shame and hear me to thy face,
And to me the great office of thy sings,
And with the ways of this an earth and tears,
The time is seen to see the sea of many
As if a father's house, and thanks, and so many
than that I have seen a father was
to me an in the court of this armided
That they were so to see the sea of their best work.
[Exit]