class_docstr: Gradient descent algorithm.
  
  Parameters
  ----------
  network : list, tuple or LayerConnection instance
      Network's architecture. There are a few ways
      to define it.
  
      - List of layers.
        For instance, ``[Input(2), Tanh(4), Relu(1)]``.
  
      - Constructed layers.
        For instance, ``Input(2) >> Tanh(4) >> Relu(1)``.
  
  regularizer : function or None
      Network's regularizer.
  
  loss : str or function
      Error/loss function. Defaults to ``mse``.
  
      - ``mae`` - Mean Absolute Error.
  
      - ``mse`` - Mean Squared Error.
  
      - ``rmse`` - Root Mean Squared Error.
  
      - ``msle`` - Mean Squared Logarithmic Error.
  
      - ``rmsle`` - Root Mean Squared Logarithmic Error.
  
      - ``categorical_crossentropy`` - Categorical cross entropy.
  
      - ``binary_crossentropy`` - Binary cross entropy.
  
      - ``binary_hinge`` - Binary hinge entropy.
  
      - ``categorical_hinge`` - Categorical hinge entropy.
  
      - Custom function which accepts two mandatory arguments.
        The first one is expected value and the second one is
        predicted value. Example:
  
      .. code-block:: python
  
          def custom_func(expected, predicted):
              return expected - predicted
  
  step : float, Variable
      Learning rate, defaults to ``0.1``.
  
  {BaseNetwork.show_epoch}
  
  {BaseNetwork.shuffle_data}
  
  {BaseNetwork.signals}
  
  {BaseNetwork.verbose}
  
  Attributes
  ----------
  {BaseNetwork.Attributes}
  
  Methods
  -------
  {BaseSkeleton.predict}
  
  train(X_train, y_train, X_test=None, y_test=None, epochs=100)
      Train network. You can control network's training procedure
      with ``epochs`` parameter. The ``X_test`` and ``y_test`` should
      be presented both in case network's validation required
      after each training epoch.
  
  {BaseSkeleton.fit}
code: def init_functions(self):
      loss = self.loss(self.target, self.network.outputs)
      val_loss = self.loss(self.target, self.network.training_outputs)
  
      if self.regularizer is not None:
          loss += self.regularizer(self.network)
  
      self.variables.update(
          step=self.step,
          loss=loss,
          val_loss=val_loss,
      )
  
      with tf.name_scope("training-updates"):
          update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
  
          with tf.control_dependencies(update_ops):
              training_updates = self.init_train_updates()
              training_updates.extend(update_ops)
  
      tf_utils.initialize_uninitialized_variables()
  
      with tf.name_scope("optimizer"):
          self.functions.update(
              predict=tf_utils.function(
                  inputs=as_tuple(self.network.inputs),
                  outputs=self.network.outputs,
                  name="predict",
              ),
              one_training_update=tf_utils.function(
                  inputs=as_tuple(self.network.inputs, self.target),
                  outputs=loss,
                  updates=training_updates,
                  name="one-update-step",
              ),
              score=tf_utils.function(
                  inputs=as_tuple(self.network.inputs, self.target),
                  outputs=val_loss,
                  name="score",
              ),
          )
  
imports: from __future__ import division
  import time
  import numpy
  import tensorflow
  from neupy import layers
  from neupy.core.properties import FunctionWithOptionsProperty, ScalarVariableProperty, IntProperty, Property
  from neupy.utils import AttributeKeyDict, format_data, as_tuple, iters, tf_utils
  from neupy.algorithms.gd import objectives
  from neupy.exceptions import InvalidConnection
  from neupy.algorithms.base import BaseNetwork
label_desc: Use image node_id 3 for calling the BaseOptimizer obj's underlying member method code with example usage: obj.init_functions() without return types