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: Compute the gradient of loss with respect to coefs and intercept for
  specified layer.
  
  This function does backpropagation for the specified one layer.
docstr_tok: ["Compute","the","gradient","of","loss","with","respect","to","coefs","and","intercept","for","specified","layer",".","This","function","does","backpropagation","for","the","specified","one","layer","."]
code: def _compute_loss_grad(
      self,
      layer,
      n_samples,
      activations,
      deltas,
      coef_grads,
      intercept_grads,
  ):
      """Compute the gradient of loss with respect to coefs and intercept for
      specified layer.
  
      This function does backpropagation for the specified one layer.
      """
      coef_grads[layer] = safe_sparse_dot(
          activations[layer].T, deltas[layer]
      )
      coef_grads[layer] += self.alpha * self.coefs_[layer]
      coef_grads[layer] /= n_samples
  
      intercept_grads[layer] = np.mean(deltas[layer], 0)
  
      return coef_grads, intercept_grads
  
imports: import numpy
  from abc import ABCMeta, abstractmethod
  from scipy.optimize import fmin_l_bfgs_b
  import warnings
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
  from ._base import ACTIVATIONS, DERIVATIVES, LOSS_FUNCTIONS
  from ._stochastic_optimizers import SGDOptimizer, AdamOptimizer
  from ..model_selection import train_test_split
  from ..externals import six
  from ..preprocessing import LabelBinarizer
  from ..utils import gen_batches, check_random_state
  from ..utils import shuffle
  from ..utils import check_array, check_X_y, column_or_1d
  from ..exceptions import ConvergenceWarning
  from ..utils.extmath import safe_sparse_dot
  from ..utils.validation import check_is_fitted
  from ..utils.multiclass import _check_partial_fit_first_call, unique_labels
  from ..utils.multiclass import type_of_target
label_desc: Use image node_id 4 for calling the BaseMultilayerPerceptron obj's underlying member method code with example usage: obj._compute_loss_grad(layer, n_samples, activations, deltas, coef_grads, intercept_grads) and returns: coef_grads,  intercept_grads