{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9934","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9934/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9934/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9934/events","html_url":"https://github.com/apache/incubator-mxnet/pull/9934","id":301247897,"number":9934,"title":"[MXNET-31] Support variable sequence length in gluon.RecurrentCell ","user":{"login":"sxjscience","id":5178350,"avatar_url":"https://avatars1.githubusercontent.com/u/5178350?v=4","gravatar_id":"","url":"https://api.github.com/users/sxjscience","html_url":"https://github.com/sxjscience","followers_url":"https://api.github.com/users/sxjscience/followers","following_url":"https://api.github.com/users/sxjscience/following{/other_user}","gists_url":"https://api.github.com/users/sxjscience/gists{/gist_id}","starred_url":"https://api.github.com/users/sxjscience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxjscience/subscriptions","organizations_url":"https://api.github.com/users/sxjscience/orgs","repos_url":"https://api.github.com/users/sxjscience/repos","events_url":"https://api.github.com/users/sxjscience/events{/privacy}","received_events_url":"https://api.github.com/users/sxjscience/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"szha","id":2626883,"avatar_url":"https://avatars2.githubusercontent.com/u/2626883?v=4","gravatar_id":"","url":"https://api.github.com/users/szha","html_url":"https://github.com/szha","followers_url":"https://api.github.com/users/szha/followers","following_url":"https://api.github.com/users/szha/following{/other_user}","gists_url":"https://api.github.com/users/szha/gists{/gist_id}","starred_url":"https://api.github.com/users/szha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szha/subscriptions","organizations_url":"https://api.github.com/users/szha/orgs","repos_url":"https://api.github.com/users/szha/repos","events_url":"https://api.github.com/users/szha/events{/privacy}","received_events_url":"https://api.github.com/users/szha/received_events","type":"User","site_admin":false},"assignees":[{"login":"szha","id":2626883,"avatar_url":"https://avatars2.githubusercontent.com/u/2626883?v=4","gravatar_id":"","url":"https://api.github.com/users/szha","html_url":"https://github.com/szha","followers_url":"https://api.github.com/users/szha/followers","following_url":"https://api.github.com/users/szha/following{/other_user}","gists_url":"https://api.github.com/users/szha/gists{/gist_id}","starred_url":"https://api.github.com/users/szha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szha/subscriptions","organizations_url":"https://api.github.com/users/szha/orgs","repos_url":"https://api.github.com/users/szha/repos","events_url":"https://api.github.com/users/szha/events{/privacy}","received_events_url":"https://api.github.com/users/szha/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-03-01T01:38:30Z","updated_at":"2018-03-08T05:30:02Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/9934","html_url":"https://github.com/apache/incubator-mxnet/pull/9934","diff_url":"https://github.com/apache/incubator-mxnet/pull/9934.diff","patch_url":"https://github.com/apache/incubator-mxnet/pull/9934.patch"},"body":"## Description ##\r\nWhen the input sequences have different lengths, the common approach is to pad them to the same length and feed the padded data into the recurrent neural network. To deal with this scenario, this PR adds a new `valid_length` option in `unroll`. `valid_length` refers to the real length of the sequences before padding. When the `valid_length` is given, the last valid state will be returned and the padded portion in the output will be masked to be zero. This feature is essential for implementing a NMT model.\r\n\r\n## Checklist ##\r\n### Essentials ###\r\n- [x] Passed code style checking (`make lint`)\r\n- [x] Changes are complete (i.e. I finished coding on this PR)\r\n- [x] All changes have test coverage:\r\n- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)\r\n- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)\r\n- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)\r\n- [x] Code is well-documented: \r\n- For user-facing API changes, API doc string has been updated. \r\n- For new C++ functions in header files, their functionalities and arguments are documented. \r\n- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable\r\n- [x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change\r\n\r\n### Changes ###\r\n- [x] valid_length option in unroll, tests\r\n- [x] replace `expand_dim + concat` with `stack`. This reduces the memory usage.\r\n\r\n### Comments ###\r\nThe ConvRNN cells do not support this feature."},"comment":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/comments/371383734","html_url":"https://github.com/apache/incubator-mxnet/pull/9934#issuecomment-371383734","issue_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9934","id":371383734,"user":{"login":"sxjscience","id":5178350,"avatar_url":"https://avatars1.githubusercontent.com/u/5178350?v=4","gravatar_id":"","url":"https://api.github.com/users/sxjscience","html_url":"https://github.com/sxjscience","followers_url":"https://api.github.com/users/sxjscience/followers","following_url":"https://api.github.com/users/sxjscience/following{/other_user}","gists_url":"https://api.github.com/users/sxjscience/gists{/gist_id}","starred_url":"https://api.github.com/users/sxjscience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxjscience/subscriptions","organizations_url":"https://api.github.com/users/sxjscience/orgs","repos_url":"https://api.github.com/users/sxjscience/repos","events_url":"https://api.github.com/users/sxjscience/events{/privacy}","received_events_url":"https://api.github.com/users/sxjscience/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T05:30:02Z","updated_at":"2018-03-08T05:30:02Z","author_association":"MEMBER","body":"@szha @piiswrong I've added the test of VariationalDropoutCell."}}
{"actor":{"display_login":"sxjscience"}}