class_docstr: Residual Dense Block
  The core module of paper: (Residual Dense Network for Image Super-Resolution, CVPR 18)
  Modified options that can be used:
      - "Partial Convolution based Padding" arXiv:1811.11718
      - "Spectral normalization" arXiv:1802.05957
      - "ICASSP 2020 - ESRGAN+ : Further Improving ESRGAN" N. C.
          {Rakotonirina} and A. {Rasoanaivo}
class_docstr_tok: ["Residual","Dense","Block","The","core","module","of","paper",":","(","Residual","Dense","Network","for","Image","Super-Resolution",",","CVPR","18",")","Modified","options","that","can","be","used",":","-","``","Partial","Convolution","based","Padding","''","arXiv:1811.11718","-","``","Spectral","normalization","''","arXiv:1802.05957","-","``","ICASSP","2020","-","ESRGAN+",":","Further","Improving","ESRGAN","''","N.","C.","{","Rakotonirina","}","and","A",".","{","Rasoanaivo","}"]
code: def __init__(
      self,
      nf=64,
      kernel_size=3,
      gc=32,
      stride=1,
      bias=1,
      pad_type="zero",
      norm_type=None,
      act_type="leakyrelu",
      mode="CNA",
      convtype="Conv2D",
      spectral_norm=False,
      gaussian_noise=False,
      plus=False,
  ):
      super(ResidualDenseBlock_5C, self).__init__()
  
      self.noise = GaussianNoise() if gaussian_noise else None
      self.conv1x1 = conv1x1(nf, gc) if plus else None
  
      self.conv1 = conv_block(
          nf,
          gc,
          kernel_size,
          stride,
          bias=bias,
          pad_type=pad_type,
          norm_type=norm_type,
          act_type=act_type,
          mode=mode,
          convtype=convtype,
          spectral_norm=spectral_norm,
      )
      self.conv2 = conv_block(
          nf + gc,
          gc,
          kernel_size,
          stride,
          bias=bias,
          pad_type=pad_type,
          norm_type=norm_type,
          act_type=act_type,
          mode=mode,
          convtype=convtype,
          spectral_norm=spectral_norm,
      )
      self.conv3 = conv_block(
          nf + 2 * gc,
          gc,
          kernel_size,
          stride,
          bias=bias,
          pad_type=pad_type,
          norm_type=norm_type,
          act_type=act_type,
          mode=mode,
          convtype=convtype,
          spectral_norm=spectral_norm,
      )
      self.conv4 = conv_block(
          nf + 3 * gc,
          gc,
          kernel_size,
          stride,
          bias=bias,
          pad_type=pad_type,
          norm_type=norm_type,
          act_type=act_type,
          mode=mode,
          convtype=convtype,
          spectral_norm=spectral_norm,
      )
      if mode == "CNA":
          last_act = None
      else:
          last_act = act_type
      self.conv5 = conv_block(
          nf + 4 * gc,
          nf,
          3,
          stride,
          bias=bias,
          pad_type=pad_type,
          norm_type=norm_type,
          act_type=last_act,
          mode=mode,
          convtype=convtype,
          spectral_norm=spectral_norm,
      )
  
imports: from collections import OrderedDict
  import math
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new ResidualDenseBlock_5C object from inherited base classes: nn with example: obj = ResidualDenseBlock_5C(nf, kernel_size, gc, stride, bias, pad_type, norm_type, act_type, mode, convtype, spectral_norm, gaussian_noise, plus)