class_docstr: A simple multi-layer perceptron module.
  
  This can be adapted for usage in different contexts, e.g. binary
  and multi-class classification, regression, etc.
  
  Parameters
  ----------
  input_units : int (default=20)
    Number of input units.
  
  output_units : int (default=2)
    Number of output units.
  
  hidden_units : int (default=10)
    Number of units in hidden layers.
  
  num_hidden : int (default=1)
    Number of hidden layers.
  
  nonlin : torch.nn.Module instance (default=torch.nn.ReLU())
    Non-linearity to apply after hidden layers.
  
  output_nonlin : torch.nn.Module instance or None (default=None)
    Non-linearity to apply after last layer, if any.
  
  dropout : float (default=0)
    Dropout rate. Dropout is applied between layers.
  
  squeeze_output : bool (default=False)
    Whether to squeeze output. Squeezing can be helpful if you wish
    your output to be 1-dimensional (e.g. for
    NeuralNetBinaryClassifier).
docstr: (Re)set all parameters.
code: def reset_params(self):
      """(Re)set all parameters."""
      units = [self.input_units]
      units += [self.hidden_units] * self.num_hidden
      units += [self.output_units]
  
      sequence = []
      for u0, u1 in zip(units, units[1:]):
          sequence.append(nn.Linear(u0, u1))
          sequence.append(self.nonlin)
          sequence.append(nn.Dropout(self.dropout))
  
      sequence = sequence[:-2]
      if self.output_nonlin:
          sequence.append(self.output_nonlin)
  
      self.sequential = nn.Sequential(*sequence)
  
file_path: skorch/skorch/toy.py
imports: from functools import partial
  from torch import nn
label_desc: Use image node_id 2 for calling the MLPModule obj's underlying member method code with example usage: obj.reset_params() without return types