{"action":"closed","issue":{"url":"https://api.github.com/repos/Element-Research/rnn/issues/16","labels_url":"https://api.github.com/repos/Element-Research/rnn/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Element-Research/rnn/issues/16/comments","events_url":"https://api.github.com/repos/Element-Research/rnn/issues/16/events","html_url":"https://github.com/Element-Research/rnn/issues/16","id":97111180,"number":16,"title":"Encoder-Decoder Architectures","user":{"login":"hannes-brt","id":323139,"avatar_url":"https://avatars.githubusercontent.com/u/323139?v=3","gravatar_id":"","url":"https://api.github.com/users/hannes-brt","html_url":"https://github.com/hannes-brt","followers_url":"https://api.github.com/users/hannes-brt/followers","following_url":"https://api.github.com/users/hannes-brt/following{/other_user}","gists_url":"https://api.github.com/users/hannes-brt/gists{/gist_id}","starred_url":"https://api.github.com/users/hannes-brt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannes-brt/subscriptions","organizations_url":"https://api.github.com/users/hannes-brt/orgs","repos_url":"https://api.github.com/users/hannes-brt/repos","events_url":"https://api.github.com/users/hannes-brt/events{/privacy}","received_events_url":"https://api.github.com/users/hannes-brt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-24T18:34:03Z","updated_at":"2015-09-04T15:30:50Z","closed_at":"2015-09-04T15:30:50Z","body":"Hi,\r\n\r\nI was looking to implement an encoder-decoder LSTM architecture (like http://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf). But the problem I have is that there doesn't seem to be a good way to pass the output of the encoder network to the decoder network as the hidden state.\r\n\r\nMore precisely, in `LSTM:updateOutput`, `prevOutput` is initialized to zero:\r\n```lua\r\n   if self.step == 1 then\r\n      prevOutput = self.zeroTensor\r\n```\r\nHowever, I would need a way to pass in `output[-1]` from the encoder network into the decoder network as `prevOutput`. Of course, I will also need the gradients to flow back into the encoder properly.\r\n\r\nIs there a way to achieve this setup with your current architecture?\r\n\r\nThanks a lot!"}}