class_docstr: Implementation of the Residual in Residual Dense Network for image super-scaling.
  
  The network is the one described in https://arxiv.org/abs/1809.00219 (Wang et al. 2018).
  
  Args:
      arch_params: dictionary, contains the network parameters C, D, G, G0, T, x.
      patch_size: integer or None, determines the input size. Only needed at
          training time, for prediction is set to None.
      beta: float <= 1, scaling parameter for the residual connections.
      c_dim: integer, number of channels of the input image.
      kernel_size: integer, common kernel size for convolutions.
      upscaling: string, 'ups' or 'shuffle', determines which implementation
          of the upscaling layer to use.
      init_val: extreme values for the RandomUniform initializer.
      weights: string, if not empty, download and load pre-trained weights.
          Overrides other parameters.
  
  Attributes:
      C: integer, number of conv layer inside each residual dense blocks (RDB).
      D: integer, number of RDBs inside each Residual in Residual Dense Block (RRDB).
      T: integer, number or RRDBs.
      G: integer, number of convolution output filters inside the RDBs.
      G0: integer, number of output filters of each RDB.
      x: integer, the scaling factor.
      model: Keras model of the RRDN.
      name: name used to identify what upscaling network is used during training.
      model._name: identifies this network as the generator network
          in the compound model built by the trainer class.
docstr: Implementation of the (Residual) Dense Block as in the paper
  Residual Dense Network for Image Super-Resolution (Zhang et al. 2018).
  
  Residuals are incorporated in the RRDB.
  d is an integer only used for naming. (d-th block)
docstr_tok: ["Implementation","of","the","(","Residual",")","Dense","Block","as","in","the","paper","Residual","Dense","Network","for","Image","Super-Resolution","(","Zhang","et","al",".","2018",")",".","Residuals","are","incorporated","in","the","RRDB",".","d","is","an","integer","only","used","for","naming",".","(","d-th","block",")"]
code: def _dense_block(self, input_layer, d, t):
      """
      Implementation of the (Residual) Dense Block as in the paper
      Residual Dense Network for Image Super-Resolution (Zhang et al. 2018).
  
      Residuals are incorporated in the RRDB.
      d is an integer only used for naming. (d-th block)
      """
  
      x = input_layer
      for c in range(1, self.C + 1):
          F_dc = Conv2D(
              self.G,
              kernel_size=self.kernel_size,
              padding="same",
              kernel_initializer=self.initializer,
              name="F_%d_%d_%d" % (t, d, c),
          )(x)
          F_dc = Activation("relu", name="F_%d_%d_%d_Relu" % (t, d, c))(
              F_dc
          )
          x = concatenate(
              [x, F_dc], axis=3, name="RDB_Concat_%d_%d_%d" % (t, d, c)
          )
  
      # DIFFERENCE: in RDN a kernel size of 1 instead of 3 is used here
      x = Conv2D(
          self.G0,
          kernel_size=3,
          padding="same",
          kernel_initializer=self.initializer,
          name="LFF_%d_%d" % (t, d),
      )(x)
      return x
  
imports: import tensorflow
  from tensorflow.keras.initializers import RandomUniform
  from tensorflow.keras.layers import concatenate, Input, Activation, Add, Conv2D, Lambda
  from tensorflow.keras.models import Model
  from ISR.models.imagemodel import ImageModel
label_desc: Use image node_id 2 for calling the RRDN obj's underlying member method code with example usage: obj._dense_block(input_layer, d, t) and returns: x