{"action":"created","issue":{"url":"https://api.github.com/repos/torch/nn/issues/814","repository_url":"https://api.github.com/repos/torch/nn","labels_url":"https://api.github.com/repos/torch/nn/issues/814/labels{/name}","comments_url":"https://api.github.com/repos/torch/nn/issues/814/comments","events_url":"https://api.github.com/repos/torch/nn/issues/814/events","html_url":"https://github.com/torch/nn/issues/814","id":154174377,"number":814,"title":"clearState destroy input","user":{"login":"iamalbert","id":4281586,"avatar_url":"https://avatars.githubusercontent.com/u/4281586?v=3","gravatar_id":"","url":"https://api.github.com/users/iamalbert","html_url":"https://github.com/iamalbert","followers_url":"https://api.github.com/users/iamalbert/followers","following_url":"https://api.github.com/users/iamalbert/following{/other_user}","gists_url":"https://api.github.com/users/iamalbert/gists{/gist_id}","starred_url":"https://api.github.com/users/iamalbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamalbert/subscriptions","organizations_url":"https://api.github.com/users/iamalbert/orgs","repos_url":"https://api.github.com/users/iamalbert/repos","events_url":"https://api.github.com/users/iamalbert/events{/privacy}","received_events_url":"https://api.github.com/users/iamalbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-11T07:07:14Z","updated_at":"2016-05-11T07:53:56Z","closed_at":null,"body":"```lua\r\n require 'nn'                  \r\n\r\n                               \r\n local a = torch.rand(2, 5)    \r\n                               \r\n local m = nn.SelectTable(1)   \r\n local out = m:forward({a})                                  \r\n print(a)                 \r\n\r\n m:clearState()                \r\n print(a)                 \r\n```\r\noutputs\r\n```\r\n 0.6709  0.2496  0.9766  0.6969  0.3582\r\n 0.6664  0.3344  0.4896  0.4498  0.9036\r\n[torch.DoubleTensor of size 2x5]\r\n\r\n[torch.DoubleTensor with no dimension]\r\n```\r\n\r\nthis bug is killing me .."},"comment":{"url":"https://api.github.com/repos/torch/nn/issues/comments/218387881","html_url":"https://github.com/torch/nn/issues/814#issuecomment-218387881","issue_url":"https://api.github.com/repos/torch/nn/issues/814","id":218387881,"user":{"login":"RuiShu","id":7140902,"avatar_url":"https://avatars.githubusercontent.com/u/7140902?v=3","gravatar_id":"","url":"https://api.github.com/users/RuiShu","html_url":"https://github.com/RuiShu","followers_url":"https://api.github.com/users/RuiShu/followers","following_url":"https://api.github.com/users/RuiShu/following{/other_user}","gists_url":"https://api.github.com/users/RuiShu/gists{/gist_id}","starred_url":"https://api.github.com/users/RuiShu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuiShu/subscriptions","organizations_url":"https://api.github.com/users/RuiShu/orgs","repos_url":"https://api.github.com/users/RuiShu/repos","events_url":"https://api.github.com/users/RuiShu/events{/privacy}","received_events_url":"https://api.github.com/users/RuiShu/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T07:53:56Z","updated_at":"2016-05-11T07:53:56Z","body":"How about manually resetting self.output to {} (or torch.Tensor) when calling clearState for those particular modules?"}}