{"action":"created","issue":{"url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/6","repository_url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression","labels_url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/6/comments","events_url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/6/events","html_url":"https://github.com/mouradmourafiq/tensorflow-lstm-regression/issues/6","id":170413262,"number":6,"title":"Timesteps vs Units","user":{"login":"exodaniel","id":1926730,"avatar_url":"https://avatars.githubusercontent.com/u/1926730?v=3","gravatar_id":"","url":"https://api.github.com/users/exodaniel","html_url":"https://github.com/exodaniel","followers_url":"https://api.github.com/users/exodaniel/followers","following_url":"https://api.github.com/users/exodaniel/following{/other_user}","gists_url":"https://api.github.com/users/exodaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/exodaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodaniel/subscriptions","organizations_url":"https://api.github.com/users/exodaniel/orgs","repos_url":"https://api.github.com/users/exodaniel/repos","events_url":"https://api.github.com/users/exodaniel/events{/privacy}","received_events_url":"https://api.github.com/users/exodaniel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-10T13:11:25Z","updated_at":"2016-08-10T14:16:01Z","closed_at":null,"body":"in lstm.py, you create BasicLSTMCells with layer['steps'] as the first argument.\r\nHowever, if I understand the tensorflow implementation correctly (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/rnn_cell.py#L179)\r\nthis argument (num_units in `BasicLSTMCell(num_units)`) refers to the number of units - i.e. memory cells in the LSTM cell.\r\n \r\n ``` python\r\n   def lstm_cells(layers):\r\n        if isinstance(layers[0], dict):\r\n            return [tf.nn.rnn_cell.DropoutWrapper(tf.nn.rnn_cell.BasicLSTMCell(layer['steps'],\r\n                                                                               state_is_tuple=True),\r\n                                                  layer['keep_prob'])\r\n                    if layer.get('keep_prob') else tf.nn.rnn_cell.BasicLSTMCell(layer['steps'],\r\n                                                                                state_is_tuple=True)\r\n                    for layer in layers]\r\n        return [tf.nn.rnn_cell.BasicLSTMCell(steps, state_is_tuple=True) for steps in layers]\r\n\r\n```\r\n\r\nAs a result, in your notebook the variable TIMESTEPS affects both the amount of timesteps used in truncated backpropagation through time, but also the size of the LSTM.\r\n\r\nIs this voluntary?"},"comment":{"url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/comments/238880139","html_url":"https://github.com/mouradmourafiq/tensorflow-lstm-regression/issues/6#issuecomment-238880139","issue_url":"https://api.github.com/repos/mouradmourafiq/tensorflow-lstm-regression/issues/6","id":238880139,"user":{"login":"mouradmourafiq","id":1261626,"avatar_url":"https://avatars.githubusercontent.com/u/1261626?v=3","gravatar_id":"","url":"https://api.github.com/users/mouradmourafiq","html_url":"https://github.com/mouradmourafiq","followers_url":"https://api.github.com/users/mouradmourafiq/followers","following_url":"https://api.github.com/users/mouradmourafiq/following{/other_user}","gists_url":"https://api.github.com/users/mouradmourafiq/gists{/gist_id}","starred_url":"https://api.github.com/users/mouradmourafiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouradmourafiq/subscriptions","organizations_url":"https://api.github.com/users/mouradmourafiq/orgs","repos_url":"https://api.github.com/users/mouradmourafiq/repos","events_url":"https://api.github.com/users/mouradmourafiq/events{/privacy}","received_events_url":"https://api.github.com/users/mouradmourafiq/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T14:16:01Z","updated_at":"2016-08-10T14:16:01Z","body":"Yes it's voluntary, you can tweak the model if you need to introduce the truncated backpropagation. Truncating backpropagation is connected with the learning and not with the length of the sequence, and this parameter can't be bigger than length of the sequence.\r\n\r\nI assume that this is a source of confusion to many people who tried my example, I will probably just add this option to the model when I have time."}}
{"actor":{"display_login":"mouradmourafiq"}}