class_docstr: Base class for MLP classification and regression.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
  
  .. versionadded:: 0.18
code: def _init_coef(self, fan_in, fan_out, dtype):
      # Use the initialization method recommended by
      # Glorot et al.
      factor = 6.0
      if self.activation == "logistic":
          factor = 2.0
      init_bound = np.sqrt(factor / (fan_in + fan_out))
  
      # Generate weights and bias:
      coef_init = self._random_state.uniform(
          -init_bound, init_bound, (fan_in, fan_out)
      )
      intercept_init = self._random_state.uniform(
          -init_bound, init_bound, fan_out
      )
      coef_init = coef_init.astype(dtype, copy=False)
      intercept_init = intercept_init.astype(dtype, copy=False)
      return coef_init, intercept_init
  
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 9 for calling the BaseMultilayerPerceptron obj's underlying member method code with example usage: obj._init_coef(fan_in, fan_out, dtype) and returns: coef_init,  intercept_init