class_docstr: Module is a construction block of a computation model. Modules normally
  are constructed by lower level operators or other Modules, thus, nesting
  them in a tree-like structure may construct a more complex computation
  model.
  
  Example:
      User may construct his model by derived from this class. Like:
  
      .. code-block:: python
  
          import nnabla as nn
          import nnabla.parametric_functions as PF
          import nnabla.functions as F
  
          class ConvBn(nn.Module):
              def __init__(self, outmaps, kernel=1, stride=1, act=None):
                  self.outmaps = outmaps
                  self.kernel = kernel
                  self.stride = stride
                  self.act = act
  
              def call(self, x, training=True):
                  kernel = (self.kernel, self.kernel)
                  pad = (self.kernel // 2, self.kernel // 2)
                  stride = (self.stride, self.stride)
                  h = PF.convolution(x, self.outmaps, kernel,
                                     pad, stride, with_bias=False)
                  h = PF.batch_normalization(h, batch_stat=training)
                  if self.act is None:
                      return h
                  return self.act(h)
  
  
          class ResUnit(nn.Module):
              def __init__(self, channels, stride=1, skip_by_conv=True):
                  self.conv1 = ConvBn(channels // 4, 1, 1,
                                      act=lambda x: F.relu(x, inplace=True))
                  self.conv2 = ConvBn(channels // 4, 3, stride,
                                      act=lambda x: F.relu(x, inplace=True))
                  self.conv3 = ConvBn(channels, 1)
                  self.skip_by_conv = skip_by_conv
                  self.skip = ConvBn(channels, 1, stride)
  
              def call(self, x, training=True):
                  h = self.conv1(x)
                  h = self.conv2(h)
                  h = self.conv3(h)
  
                  s = x
                  if self.skip_by_conv:
                      s = self.skip(s)
                  h = F.relu(F.add2(h, s, inplace=True), inplace=True)
                  return h
  
  
      To use this model, user may do like the following code:
  
      .. code-block:: python
  
          res_unit = ResUnit(1024)
          x = nn.Variable((64, 3, 32, 32))
          x.d = np.random.random(x.shape)
          y = res_unit(x)
          y.forward(clear_buffer=True)
  
  
      For working with dynamic network, user may do like the following:
  
      .. code-block:: python
  
          res_unit = ResUnit(1024)
          with nn.auto_forward():
              x = nn.Variable.from_numpy_array(np.random.random((1, 3, 32, 32)))
              y = res_unit(x)
              print(y.d)
  
  
      For training, please set the parameters in module scope to optimizer. For example,
  
      .. code-block:: python
  
         import nnabla.solvers as S
  
         resnet = ResNet(18)
         loss = resnet(x, y_)
  
         solver = S.Sgd(lr=1e-3)
         solver.set_parameters(resnet.get_parameters())
  
         for _ in range(max_iter):
             x.d, y_.d = data.next()
             loss.forward()
             solver.zero_grad()
             loss.backward()
             solver.weight_decay(1e-5)
             solver.update()
  
      In this example, we supposed ResNet is a derived class of Module, x, y_ is :class:`~nn.Variable`,
      ``data`` is an instance of :class:`~DataIterator`, supposed it has already been attached to a DataSet.
  
      Note:
          From this example, we knew that model parameters are owned by model. Here it is variable `resnet`. These
          parameters will be referred when network is forward or backward or solve.update(). Hence, it is necessary
          to keep this module instance from being unexpectedly released, to ensure forward() or backward() can refer
          to these variables.
code: def __repr__(self):
      return self.__class__.__name__
  
imports: import re
  from collections import OrderedDict
  from functools import wraps
  import nnabla
  from nnabla.core.graph_def import module_scope, current_graph_builder
label_desc: Use image node_id 1 for calling the Module obj's underlying member method code with example usage: obj.__repr__() and returns: self