Shortcuts

mmedit.models.base_archs.sr_backbone

Module Contents

Classes

ResidualBlockNoBN

Residual block without BN.

class mmedit.models.base_archs.sr_backbone.ResidualBlockNoBN(mid_channels: int = 64, res_scale: float = 1.0)[源代码]

Bases: torch.nn.Module

Residual block without BN.

It has a style of:

---Conv-ReLU-Conv-+-
 |________________|
参数
  • mid_channels (int) – Channel number of intermediate features. Default: 64.

  • res_scale (float) – Used to scale the residual before addition. Default: 1.0.

init_weights() None[源代码]

Initialize weights for ResidualBlockNoBN.

Initialization methods like kaiming_init are for VGG-style modules. For modules with residual paths, using smaller std is better for stability and performance. We empirically use 0.1. See more details in “ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks”

forward(x: torch.Tensor) torch.Tensor[源代码]

Forward function.

参数

x (Tensor) – Input tensor with shape (n, c, h, w).

返回

Forward results.

返回类型

Tensor

Read the Docs v: latest
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.