seq2seq-attention icon indicating copy to clipboard operation
seq2seq-attention copied to clipboard

Is the result of test.th right { 1 : " no" 2 : " no for for" 3 : " no thanks" } ?

Open brandyaptx opened this issue 9 years ago • 3 comments

I update the code to latest. And train it on the wiki dataset, but the result of test.th is always { 1 : " no" 2 : " no for for" 3 : " no thanks" } despite I change the input text of test.th. why?

brandyaptx avatar Jul 11 '16 09:07 brandyaptx

can you show me your hyper-parameter?

rsarxiv avatar Jul 11 '16 12:07 rsarxiv

in train.th: cmd:option("-batch_size",20,"") cmd:option("-rnn_size",50,"") cmd:option("-learning_rate",2e-3,"") cmd:option("-decay_rate",0.95,"") cmd:option('-learning_rate_decay',0.97,'learning rate decay') cmd:option('-learning_rate_decay_after',10,'in number of epochs, when to start decaying the learning rate') cmd:option("-LSTM",true,"") cmd:option("-seed",123,"") cmd:option("-max_epochs",2,"") cmd:option("-print_every",1,"") cmd:option("-datafile","data/bot.hdf5","") cmd:option("-vocabfile","data/bot.dict","") cmd:option("-savefile","data/bot.t7","") cmd:option("-cuda",false,"") cmd:option("-save_every",1000,"") cmd:option("-seq2seq",false,"") cmd:option("-attn",true,"")

in test.th: cmd:option("-vocabfile","data/bot.dict","") cmd:option("-modelfile","data/bot.t7","") cmd:option("-seed",123,"") cmd:option("-text","what is your name","") cmd:option("-source_length",20,"") cmd:option("-target_length",20,"") cmd:option("-attn",true,"") cmd:option("-seq2seq",false,"") cmd:option("-sample",true,"") cmd:option("-beamsize",3,"beam size to generate the words")

brandyaptx avatar Jul 13 '16 00:07 brandyaptx

ok. I think you should make the -rnn_size larger e.g. 1000 or 500 and the -max_epochs larger than 5 in train.th file, then run it. The model file is saved in each 1000 iterations, at the beginning, you may not get a good result, after more and more iterations, the result will be better. Good luck!

And is your dataset in Chinese?

rsarxiv avatar Jul 13 '16 02:07 rsarxiv