Open wilddylan opened 7 years ago
Fixed
Modified seq2seq.lua
:
--[[ Backward coupling: Copy decoder gradients to encoder LSTM ]]--
function Seq2Seq:backwardConnect()
-- self.encoderLSTM.userNextGradCell =--
-- nn.rnn.recursiveCopy(self.encoderLSTM.userNextGradCell, self.decoderLSTM.userGradPrevCell)
-- self.encoderLSTM.gradPrevOutput =
-- nn.rnn.recursiveCopy(self.encoderLSTM.gradPrevOutput, self.decoderLSTM.userGradPrevOutput)
if (self.encoderLSTM.userNextGradCell ~= nil) then
self.encoderLSTM.userNextGradCell =
nn.rnn.recursiveCopy(self.encoderLSTM.userNextGradCell, self.decoderLSTM.userGradPrevCell)
end
if (self.encoderLSTM.gradPrevOutput ~= nil) then
self.encoderLSTM.gradPrevOutput =
nn.rnn.recursiveCopy(self.encoderLSTM.gradPrevOutput, self.decoderLSTM.userGradPrevOutput)
end
end
But When training continued, Got this error:
-- Loading dataset
Loading vocabulary from data/vocab.t7 ...
Dataset stats:
Vocabulary size: 3830
Examples: 58852
dgk ending
-- Epoch 1 / 30
/Users/root1/torch/install/bin/lua: /Users/root1/torch/install/share/lua/5.2/torch/File.lua:375: unknown object
stack traceback:
[C]: in function 'error'
/Users/root1/torch/install/share/lua/5.2/torch/File.lua:375: in function 'readObject'
./dataset.lua:144: in function 'for iterator'
train.lua:77: in main chunk
[C]: in function 'dofile'
...oot1/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?
How to Fix this???
When I execute this command
th train.lua --dataset 20000 --hiddenSize 100
; I got this error:Before execute this command, I install nn, rnn and async use luarock.