class_docstr: A compact VGG-style network structure for super-resolution.
  This class is copied from https://github.com/xinntao/Real-ESRGAN
class_docstr_tok: ["A","compact","VGG-style","network","structure","for","super-resolution",".","This","class","is","copied","from","https",":","\/\/github.com\/xinntao\/Real-ESRGAN"]
code: def __init__(
      self,
      num_in_ch=3,
      num_out_ch=3,
      num_feat=64,
      num_conv=16,
      upscale=4,
      act_type="prelu",
  ):
      super(SRVGGNetCompact, self).__init__()
      self.num_in_ch = num_in_ch
      self.num_out_ch = num_out_ch
      self.num_feat = num_feat
      self.num_conv = num_conv
      self.upscale = upscale
      self.act_type = act_type
  
      self.body = nn.ModuleList()
      # the first conv
      self.body.append(nn.Conv2d(num_in_ch, num_feat, 3, 1, 1))
      # the first activation
      if act_type == "relu":
          activation = nn.ReLU(inplace=True)
      elif act_type == "prelu":
          activation = nn.PReLU(num_parameters=num_feat)
      elif act_type == "leakyrelu":
          activation = nn.LeakyReLU(negative_slope=0.1, inplace=True)
      self.body.append(activation)
  
      # the body structure
      for _ in range(num_conv):
          self.body.append(nn.Conv2d(num_feat, num_feat, 3, 1, 1))
          # activation
          if act_type == "relu":
              activation = nn.ReLU(inplace=True)
          elif act_type == "prelu":
              activation = nn.PReLU(num_parameters=num_feat)
          elif act_type == "leakyrelu":
              activation = nn.LeakyReLU(
                  negative_slope=0.1, inplace=True
              )
          self.body.append(activation)
  
      # the last conv
      self.body.append(
          nn.Conv2d(num_feat, num_out_ch * upscale * upscale, 3, 1, 1)
      )
      # upsample
      self.upsampler = nn.PixelShuffle(upscale)
  
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 SRVGGNetCompact object from inherited base classes: nn with example: obj = SRVGGNetCompact(num_in_ch, num_out_ch, num_feat, num_conv, upscale, act_type)