Open khushigupta opened 8 years ago
@khushigupta You can use torch.max or you can use torch.multinomial as in evaluate-rnnlm.lua script.
I don't think finalOutput.cat(decOut[1])
will work. Maybe :
local finalOutput = torch.Tensor(opt.maxSampleLength)
...
for i=1, opt.maxSampleLength do
...
finalOutput[i] = decOut[1]
Thanks. The code worked after your suggestion. I had another doubt.
I was trying to sample decoded responses from the sequence to sequence network.(https://github.com/Element-Research/rnn/blob/master/examples/encoder-decoder-coupling-seqLSTM.lua)
Can you tell me if the code is correct?