torch:parameters
(torch:parameters module)
Returns every parameter reachable from the module, in registration order and deduplicated by identity: its own parameter fields, then those of its submodules and of any list of submodules it holds, recursively. A weight shared by two layers appears once. This is the list a training loop (and an optimizer) is built over -- reaching a parameter needs no declaration beyond putting it in the fields plist.