Thanks @albanD,



 albanD:

In particular .parameters() is the public API and ._parameters is an internal attribute that you should not use (that is why it is not documented as well).


This makes sense but I’ve seen a lot of code online that uses the non public API and if I’m not mistaken I’ve seen also some pytorch examples uses it as well.
On another note, if you wanted to loop over the params of a module, do some operation and then remove that param, how would you do that with module.parameters?
With module._parameters one could simply use module._parameters.pop(name). Here’s an example of that 3.