basicsr.archs.srvgg_arch

class basicsr.archs.srvgg_arch.SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=16, upscale=4, act_type='prelu')[source]

Bases: Module

A compact VGG-style network structure for super-resolution.

It is a compact network structure, which performs upsampling in the last layer and no convolution is conducted on the HR feature space.

Parameters:
  • num_in_ch (int) – Channel number of inputs. Default: 3.

  • num_out_ch (int) – Channel number of outputs. Default: 3.

  • num_feat (int) – Channel number of intermediate features. Default: 64.

  • num_conv (int) – Number of convolution layers in the body network. Default: 16.

  • upscale (int) – Upsampling factor. Default: 4.

  • act_type (str) – Activation type, options: ‘relu’, ‘prelu’, ‘leakyrelu’. Default: prelu.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool