class_docstr: Base class for MLP classification and regression.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
  
  .. versionadded:: 0.18
docstr: Perform a forward pass on the network by computing the values
  of the neurons in the hidden layers and the output layer.
  
  Parameters
  ----------
  activations : list, length = n_layers - 1
      The ith element of the list holds the values of the ith layer.
docstr_tok: ["Perform","a","forward","pass","on","the","network","by","computing","the","values","of","the","neurons","in","the","hidden","layers","and","the","output","layer",".","Parameters","--","--","--","--","--","activations",":","list",",","length","=","n_layers","-","1","The","ith","element","of","the","list","holds","the","values","of","the","ith","layer","."]
code: def _forward_pass(self, activations):
      """Perform a forward pass on the network by computing the values
      of the neurons in the hidden layers and the output layer.
  
      Parameters
      ----------
      activations : list, length = n_layers - 1
          The ith element of the list holds the values of the ith layer.
      """
      hidden_activation = ACTIVATIONS[self.activation]
      # Iterate over the hidden layers
      for i in range(self.n_layers_ - 1):
          activations[i + 1] = safe_sparse_dot(
              activations[i], self.coefs_[i]
          )
          activations[i + 1] += self.intercepts_[i]
  
          # For the hidden layers
          if (i + 1) != (self.n_layers_ - 1):
              hidden_activation(activations[i + 1])
  
      # For the last layer
      output_activation = ACTIVATIONS[self.out_activation_]
      output_activation(activations[i + 1])
  
      return activations
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from itertools import chain
  from numbers import Integral, Real
  import numpy
  import scipy.optimize
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin, _fit_context, is_classifier
  from ..exceptions import ConvergenceWarning
  from ..metrics import accuracy_score, r2_score
  from ..model_selection import train_test_split
  from ..preprocessing import LabelBinarizer
  from ..utils import _safe_indexing, check_random_state, column_or_1d, gen_batches, shuffle
  from ..utils._param_validation import Interval, Options, StrOptions
  from ..utils.extmath import safe_sparse_dot
  from ..utils.metaestimators import available_if
  from ..utils.multiclass import _check_partial_fit_first_call, type_of_target, unique_labels
  from ..utils.optimize import _check_optimize_result
  from ..utils.validation import check_is_fitted
  from ._base import ACTIVATIONS, DERIVATIVES, LOSS_FUNCTIONS
  from ._stochastic_optimizers import AdamOptimizer, SGDOptimizer
label_desc: Use image node_id 3 for calling the BaseMultilayerPerceptron obj's underlying member method code with example usage: obj._forward_pass(activations) and returns: activations