{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/763","labels_url":"https://api.github.com/repos/fchollet/keras/issues/763/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/763/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/763/events","html_url":"https://github.com/fchollet/keras/issues/763","id":109354441,"number":763,"title":"Stateful GRU example","user":{"login":"EderSantana","id":3902480,"avatar_url":"https://avatars.githubusercontent.com/u/3902480?v=3","gravatar_id":"","url":"https://api.github.com/users/EderSantana","html_url":"https://github.com/EderSantana","followers_url":"https://api.github.com/users/EderSantana/followers","following_url":"https://api.github.com/users/EderSantana/following{/other_user}","gists_url":"https://api.github.com/users/EderSantana/gists{/gist_id}","starred_url":"https://api.github.com/users/EderSantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EderSantana/subscriptions","organizations_url":"https://api.github.com/users/EderSantana/orgs","repos_url":"https://api.github.com/users/EderSantana/repos","events_url":"https://api.github.com/users/EderSantana/events{/privacy}","received_events_url":"https://api.github.com/users/EderSantana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-01T18:18:17Z","updated_at":"2015-10-13T12:21:16Z","closed_at":null,"body":"Guys, \r\n\r\nCheck this example of a stateful GRU (hidden stated is not wiped out after everybatch) on the text generation example. It makes the initial state a shared variable and updated after each batch:\r\n\r\nhttps://github.com/EderSantana/seya/blob/master/seya/layers/recurrent.py#L94-L96\r\n\r\nIt is also included a callback to reset it:\r\nhttps://github.com/EderSantana/seya/blob/master/seya/callbacks.py#L22-L40\r\n\r\nThe full example is here:\r\nhttps://github.com/EderSantana/seya/blob/master/examples/stateful_text_generation.py\r\n\r\nLet me know what you guys think. Specially if worked on your computer or not :D \r\nI'd also appreciate some feedback on the logic and how to improve it.\r\nNote one thing for instance, a `batch_size` is required when initializing the network. This forces a maximum value on the input batch length.\r\n"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/147699179","html_url":"https://github.com/fchollet/keras/issues/763#issuecomment-147699179","issue_url":"https://api.github.com/repos/fchollet/keras/issues/763","id":147699179,"user":{"login":"LeavesBreathe","id":14891677,"avatar_url":"https://avatars.githubusercontent.com/u/14891677?v=3","gravatar_id":"","url":"https://api.github.com/users/LeavesBreathe","html_url":"https://github.com/LeavesBreathe","followers_url":"https://api.github.com/users/LeavesBreathe/followers","following_url":"https://api.github.com/users/LeavesBreathe/following{/other_user}","gists_url":"https://api.github.com/users/LeavesBreathe/gists{/gist_id}","starred_url":"https://api.github.com/users/LeavesBreathe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeavesBreathe/subscriptions","organizations_url":"https://api.github.com/users/LeavesBreathe/orgs","repos_url":"https://api.github.com/users/LeavesBreathe/repos","events_url":"https://api.github.com/users/LeavesBreathe/events{/privacy}","received_events_url":"https://api.github.com/users/LeavesBreathe/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T12:21:16Z","updated_at":"2015-10-13T12:21:16Z","body":"@EderSantana , off topic, but just really want to say that I appreciate you creating this. "}}