Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

R RNN API fixes and Optimizer clip gradient on NDArray #9022

Merged
merged 5 commits into from
Dec 21, 2017
Merged

R RNN API fixes and Optimizer clip gradient on NDArray #9022

merged 5 commits into from
Dec 21, 2017

Conversation

jeremiedb
Copy link
Contributor

@jeremiedb jeremiedb commented Dec 11, 2017

Description

Rework of the RNN API:

  • Change the input to be of shape seq_len X batch.size, this will ease the use of existing arrayIter on NLP models.
  • Add support for inference on explicit unrolled models (used when training on CPU rather than the symbol.RNN)
  • Inference support for both one-to-one (language model, time-series) and seq-to-one (classification).

Optimizers:
For all optimizers, gradient clipping is now performed by mx.nd.clip, avoiding to back and forth with R array resulting in some speedup.

Following comments on lack of exmaples supporting the R package, exemples have been added:
https://jeremiedb.github.io/mxnet_R_bucketing/index.html
If there's interest, idea to is add other examples, in the spirit of the gluon.mxnet.io notebooks

Checklist

Essentials

  • Changes are complete (i.e. I finished coding on this PR)
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@jeremiedb
Copy link
Contributor Author

@thirdwing : I think these changes should bring a broader usability of the RNN API.

@thirdwing
Copy link
Contributor

I will look into this now. Sorry for the late reply. Too busy with the thesis.

@thirdwing thirdwing self-assigned this Dec 18, 2017
@thirdwing thirdwing self-requested a review December 18, 2017 14:58
@thirdwing
Copy link
Contributor

@jeremiedb
Copy link
Contributor Author

Yes, just created the pull requests on dmlc.github.io and web-data repos.

@thirdwing thirdwing merged commit ddec3cc into apache:master Dec 21, 2017
meissnereric pushed a commit to meissnereric/incubator-mxnet that referenced this pull request Jan 2, 2018
* NDArray optimizer gradient clip and RNN shapes rework

* typo bucketIter

* R RNN fix typos and example
yuxiangw pushed a commit to yuxiangw/incubator-mxnet that referenced this pull request Jan 25, 2018
* NDArray optimizer gradient clip and RNN shapes rework

* typo bucketIter

* R RNN fix typos and example
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* NDArray optimizer gradient clip and RNN shapes rework

* typo bucketIter

* R RNN fix typos and example
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* NDArray optimizer gradient clip and RNN shapes rework

* typo bucketIter

* R RNN fix typos and example
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants