def trainable_params_(m):
if isinstance(m, collections.Sequence):<EOL><INDENT>return [p for p in m if p.requires_grad]<EOL><DEDENT>else:<EOL><INDENT>return [p for p in m.parameters() if p.requires_grad]<EOL><DEDENT>
Returns a list of trainable parameters in the model m. (i.e., those that require gradients.)