use all_weights instead of _parameters in _flat_weights in rnn (#15766)
Summary:
Fixes #15749
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15766
Differential Revision: D13592320
Pulled By: soumith
fbshipit-source-id: 6c3805f576c3df5a2da8bef1e4305eda379718df
Author
Natalia Gimelshein