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