Add state dict for LSTM and RNNCell and helper functions for accessing weights and bias (#40333)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40333
Add state_dict support for dynamic quantized LSTM/GRU/RNNCell.
Add helper functions get_weight and get_bias for LSTM and RNNCells
ghstack-source-id: 106364749
(Note: this ignores all push blocking failures!)
Test Plan:
buck test caffe2/test:quantization -- 'test_lstm_api \(quantization\.test_quantized_module\.TestDynamicQuantizedModule\)' --print-passing-details
buck test caffe2/test:quantization -- 'test_cell_api \(quantization\.test_quantized_module\.TestDynamicQuantizedModule\)' --print-passing-details
Differential Revision: D22151020
fbshipit-source-id: 2eb54062f6c6a35ffe4dbe8e8cfbf7ede0e92ba1