basicsr.archs.srresnet_arch

class basicsr.archs.srresnet_arch.MSRResNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=16, upscale=4)[source]

Bases: Module

Modified SRResNet.

A compacted version modified from SRResNet in “Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network” It uses residual blocks without BN, similar to EDSR. Currently, it supports x2, x3 and x4 upsampling scale factor.

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_block (int) – Block number in the body network. Default: 16.

  • upscale (int) – Upsampling factor. Support x2, x3 and x4. Default: 4.

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