李飞飞的学生Karpathy博士写了一套实现RNN,LSTM的代码框架char-rnn(基于Torch),见以下链接
https://github.com/karpathy/char-rnn
附带一份他赞颂LSTM优美之处的博客,据说有人把python的tornado,flask,django框架的代码合成了一个30万行的文件喂给LSTM,然后它就能写出貌似正确的python代码了。
http://karpathy.github.io/2015/05/21/rnn-effectiveness/
训练过程:
训练出来的cv:
产生文本
实验截图1:
实验文本1:
glangy, sir. I has heat me
noter-hailless to the gentleman the ancient sounds,
My blind to be your partlimbod him, to make thee,
All the more that yet before the rough would all mosto--iggo's finger
to receive the northful-sily finder gave:
I know you for the rockety wife,
As we am rohed appeal to let the work sit.
KING RICHARD III:
The tidle's subjects' grace, how too much men shall.
I'ld see how barmous mudest; I will entrain them,
Lift bestricted me: I beseech you, with sades?
Be empty him; and these worldly ears
Our leftrer: bling it wear, my good queen is arm.
By slyes the venutus that dark again, or lose
Your fatherable. My lady, shall we tufle this love,
Which in this foul day have stirr'd the request,
Or profit to sensel'd: all soldiers, shall, my lord,
Im pach on when this is his dankboop Lord Hasese.
Third Servingman:
How sleepish time, I have heard content,
With Marguret five thee roak Norfolk men!
To satis an alse that nursed I shall never
A figst so kins.
CAAUSARAS:
O, gentle royal queen, though this issue!
LEONteLamereland:
So two thy good lad pardon, privon warm.
KING RICHARD III:
Good son, this hath knowlicistes, our several plass
Than thou hisgemble little impraudt:
I chorn me brother will be vowy sweet eyes;
Like ears against my few winders well forber'd,
Why sentented good signstary of itself:
I abities on the stone, coalless upon
The mind of suct controved: back!
No yound or boy to ready follows.
CLIFFORD:
Ha! keep your triboner, to Wallings, nothing in
Pereitiners. Where'y to the country whether they
affret you, farewell to believe thee and most
this another few, as they from my good foom outs.
How widows dry thee, by Edward's lord?
You cearesh it his hungry.
MERCUTIO:
That come to say 'What hath given to hay I told.
ISABELLA:
Get it not saint! I'll be: my lord,
Then must truar me can the father was he weebs ambives
marriever to the rest, and unhazing them,
I think our entermans bringst Pall ever.
LUCENTIO:
I newshand and bring to gain;
实验截图2:
实验文本2:
gland-storens,
That heard as our hands, petition, but filthier,
I have these less been sure of; if you shall affecting
him. O potce's false and prize meet's ribborn,
I'll see him most for sent good friar.
BUCKINGHAM:
If thou takest the volume, he was confreed:
Bely's, I keep with his name: small that thousand
here did both by to eat the place,
Or bear the too happy upon thy life.
LUCENTIO:
I say, I severame him, I say it made common
me,--
SLY:
No, may be black that hour? had sweed himself;
The joy! this nimperable my deed waves,
So kin what cornor's sun
ih that eyes shrunks is a younce!
The mood and the more worship up wit virtuo!
Shephant:
My Lord of Sonforden time, who, here comes with mostink!
PETRUCHIO:
Come on the first vouch sleep to thine away.
MENENIUS:
BAPTISTA:
She bear to be with a little are good to rebedon.
JULIET:
If to her in Warwick! I warrant them.
BALUSIO:
No, at him, was Blanopion, most of love?
Lord:
He myself I shall never accusion:
And yet a 'state; for I have strived
To mine eyes, the suitle poorliar,
For his meature are in state ality.
As you take up the tribunes night or tright!
O child? What voices or every doubless
Scalles, power them, soft, havid Tyous anriges,
And done: 'tis tutur'dry boot to me;
Be ere he must not yet a bawdly sake:
In it wevere wounds his own sword;
My inward than expecied till these ficte;
Who is more lordship.
Wearest with hand?
PETRUCHIO:
Country, England's sorrow.
DUKE VINCENTIO:
What, beheeply: I am quiet with her beast.
'I provile Powers, for that sayc't his church,--
Second Messenger:
It be repont me?
GONZALO:
My sin, duty scorns my book of their eyes?
PRINCE ENTER:
He hate. Farewell: he's true dram upon thyself.
Sirrah, they resolve your son to me water.
CLARENCE:
You shall be true, excell'd out their sister
As my patient princements man in this charge
Is help the sacred hoasest sword: he's play'd in theee;
One and may fit to inly so?
Fill'd not God and there--Though doity?
JULIET:
No, no, 'Glo