{"action":"created","issue":{"url":"https://api.github.com/repos/Element-Research/rnn/issues/215","repository_url":"https://api.github.com/repos/Element-Research/rnn","labels_url":"https://api.github.com/repos/Element-Research/rnn/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/Element-Research/rnn/issues/215/comments","events_url":"https://api.github.com/repos/Element-Research/rnn/issues/215/events","html_url":"https://github.com/Element-Research/rnn/issues/215","id":149607768,"number":215,"title":"Share parameters between LSTMs","user":{"login":"nmduc","id":2166977,"avatar_url":"https://avatars.githubusercontent.com/u/2166977?v=3","gravatar_id":"","url":"https://api.github.com/users/nmduc","html_url":"https://github.com/nmduc","followers_url":"https://api.github.com/users/nmduc/followers","following_url":"https://api.github.com/users/nmduc/following{/other_user}","gists_url":"https://api.github.com/users/nmduc/gists{/gist_id}","starred_url":"https://api.github.com/users/nmduc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmduc/subscriptions","organizations_url":"https://api.github.com/users/nmduc/orgs","repos_url":"https://api.github.com/users/nmduc/repos","events_url":"https://api.github.com/users/nmduc/events{/privacy}","received_events_url":"https://api.github.com/users/nmduc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-19T23:08:59Z","updated_at":"2016-04-21T16:51:26Z","closed_at":null,"body":"What is the correct way to share parameters between two LSTMs.\r\nThere is 'shared' function for sharing parameters between nn.Modules but I'm not sure whether using it on LSTM will work as expected or not? "},"comment":{"url":"https://api.github.com/repos/Element-Research/rnn/issues/comments/213010649","html_url":"https://github.com/Element-Research/rnn/issues/215#issuecomment-213010649","issue_url":"https://api.github.com/repos/Element-Research/rnn/issues/215","id":213010649,"user":{"login":"nicholas-leonard","id":3520613,"avatar_url":"https://avatars.githubusercontent.com/u/3520613?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholas-leonard","html_url":"https://github.com/nicholas-leonard","followers_url":"https://api.github.com/users/nicholas-leonard/followers","following_url":"https://api.github.com/users/nicholas-leonard/following{/other_user}","gists_url":"https://api.github.com/users/nicholas-leonard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholas-leonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholas-leonard/subscriptions","organizations_url":"https://api.github.com/users/nicholas-leonard/orgs","repos_url":"https://api.github.com/users/nicholas-leonard/repos","events_url":"https://api.github.com/users/nicholas-leonard/events{/privacy}","received_events_url":"https://api.github.com/users/nicholas-leonard/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T16:51:26Z","updated_at":"2016-04-21T16:51:26Z","body":"@nmduc Using [sharedClone](https://github.com/Element-Research/dpnn#clone-modulesharedcloneshareparams-sharegradparams) should be easier : \r\n```lua\r\nlstm1 = nn.FastLSTM(inputsize, outputsize)\r\nlstm2 = lstm1:sharedClone()\r\n```"}}