class_docstr: Base module class with some basic additions to the pytorch Module class
      
docstr: This property is used to return the number of trainable parameters for a given layer
  It is useful for debugging and reproducibility.
docstr_tok: ["This","property","is","used","to","return","the","number","of","trainable","parameters","for","a","given","layer","It","is","useful","for","debugging","and","reproducibility","."]
code: def nb_params(self):
      """This property is used to return the number of trainable parameters for a given layer
      It is useful for debugging and reproducibility.
      """
      model_parameters = filter(
          lambda p: p.requires_grad, self.parameters()
      )
      self._nb_params = sum(
          [np.prod(p.size()) for p in model_parameters]
      )
      return self._nb_params
  
imports: import numpy
  import torch
  from torch import nn
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 1 for calling the BaseModule obj's underlying member method code with example usage: obj.nb_params() and returns: self