basicsr.archs.edsr_arch

class basicsr.archs.edsr_arch.EDSR(num_in_ch, num_out_ch, num_feat=64, num_block=16, upscale=4, res_scale=1, img_range=255.0, rgb_mean=(0.4488, 0.4371, 0.404))[source]

Bases: Module

EDSR network structure.

Paper: Enhanced Deep Residual Networks for Single Image Super-Resolution. Ref git repo: https://github.com/thstkdgus35/EDSR-PyTorch

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

  • num_out_ch (int) – Channel number of outputs.

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

  • num_block (int) – Block number in the trunk network. Default: 16.

  • upscale (int) – Upsampling factor. Support 2^n and 3. Default: 4.

  • res_scale (float) – Used to scale the residual in residual block. Default: 1.

  • img_range (float) – Image range. Default: 255.

  • rgb_mean (tuple[float]) – Image mean in RGB orders. Default: (0.4488, 0.4371, 0.4040), calculated from DIV2K dataset.

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