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).
code: def forward(self, X):  # pylint: disable=arguments-differ
      X = self.sequential(X)
      if self.squeeze_output:
          X = X.squeeze(-1)
      return X
  
file_path: skorch/skorch/toy.py
imports: from functools import partial
  from torch import nn
label_desc: Use image node_id 3 for calling the MLPModule obj's underlying member method code with example usage: obj.forward(X) and returns: X