{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/1820","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/1820/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1820/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/1820/events","html_url":"https://github.com/fchollet/keras/issues/1820","id":136430148,"number":1820,"title":"Does the stateful_lstm.py example make sense?","user":{"login":"yaringal","id":3817641,"avatar_url":"https://avatars.githubusercontent.com/u/3817641?v=3","gravatar_id":"","url":"https://api.github.com/users/yaringal","html_url":"https://github.com/yaringal","followers_url":"https://api.github.com/users/yaringal/followers","following_url":"https://api.github.com/users/yaringal/following{/other_user}","gists_url":"https://api.github.com/users/yaringal/gists{/gist_id}","starred_url":"https://api.github.com/users/yaringal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaringal/subscriptions","organizations_url":"https://api.github.com/users/yaringal/orgs","repos_url":"https://api.github.com/users/yaringal/repos","events_url":"https://api.github.com/users/yaringal/events{/privacy}","received_events_url":"https://api.github.com/users/yaringal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-25T16:03:29Z","updated_at":"2016-02-25T19:06:26Z","closed_at":null,"body":"I was going over the example in:\r\nhttps://github.com/fchollet/keras/blob/master/examples/stateful_lstm.py @fchollet\r\nand I'm a bit confused. The RNN assumes size (nb x 1 x 1). When cos (of size N x 1 x 1) is given as input, model._fit will randomly sample different mini-batches from the input at each iteration. How is the temporal dependency kept? I'm also confused about the propagation of derivatives with stateful RNNs -  how are the derivatives wrt the internal states propagated back in time?"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/188933618","html_url":"https://github.com/fchollet/keras/issues/1820#issuecomment-188933618","issue_url":"https://api.github.com/repos/fchollet/keras/issues/1820","id":188933618,"user":{"login":"yaringal","id":3817641,"avatar_url":"https://avatars.githubusercontent.com/u/3817641?v=3","gravatar_id":"","url":"https://api.github.com/users/yaringal","html_url":"https://github.com/yaringal","followers_url":"https://api.github.com/users/yaringal/followers","following_url":"https://api.github.com/users/yaringal/following{/other_user}","gists_url":"https://api.github.com/users/yaringal/gists{/gist_id}","starred_url":"https://api.github.com/users/yaringal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaringal/subscriptions","organizations_url":"https://api.github.com/users/yaringal/orgs","repos_url":"https://api.github.com/users/yaringal/repos","events_url":"https://api.github.com/users/yaringal/events{/privacy}","received_events_url":"https://api.github.com/users/yaringal/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T19:06:26Z","updated_at":"2016-02-25T19:06:26Z","body":"Cool. In the first question I meant that the final states from the previous batch will have nothing to do with the current batch if they are sampled at random. Or am I missing something?\r\n"}}