seq2seq-attention
seq2seq-attention copied to clipboard
Is the result of test.th right { 1 : " no" 2 : " no for for" 3 : " no thanks" } ?
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?
can you show me your hyper-parameter?
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")
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?