pytorch
ffa422a8 - kill _parameter_list (#27399)

Commit
5 years ago
kill _parameter_list (#27399) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/27399 This was devised in a time when we didn't have module attributes. They are essentially just tensor lists, so represent them that way. This has the additional benefit of making the RNN forward pass faster because we effectively cache the flattened weights. The only complication part is that someone may come along and do: ``` my_rnn_mod.w_ih_l0 = torch.nn.Parameter(...) ``` This means we need to override setattr to keep the flattened weights cache up to date. Test Plan: Imported from OSS Differential Revision: D17785658 Pulled By: suo fbshipit-source-id: 7789cd1d0d4922bfd5eba1716976442fbf150766
Author
suo suo
Parents
Loading