'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.
with_output_activation : bool, default True
If True, the output passes through the output activation
function, which is either the softmax function or the
logistic function'

def _forward_pass(self, activations):

    hidden_activation = ACTIVATIONS[self.activation]
    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]
        if ((i + 1) != (self.n_layers_ - 1)):
            activations[(i + 1)] = hidden_activation(activations[(i + 1)])
    output_activation = ACTIVATIONS[self.out_activation_]
    activations[(i + 1)] = output_activation(activations[(i + 1)])
    return activations
