Shortcuts

mmedit.models.editors.pix2pix.pix2pix_modules

Module Contents

Classes

UnetSkipConnectionBlock

Construct a Unet submodule with skip connections, with the following.

class mmedit.models.editors.pix2pix.pix2pix_modules.UnetSkipConnectionBlock(outer_channels, inner_channels, in_channels=None, submodule=None, is_outermost=False, is_innermost=False, norm_cfg=dict(type='BN'), use_dropout=False)[源代码]

Bases: torch.nn.Module

Construct a Unet submodule with skip connections, with the following.

structure: downsampling - submodule - upsampling.

参数
  • outer_channels (int) – Number of channels at the outer conv layer.

  • inner_channels (int) – Number of channels at the inner conv layer.

  • in_channels (int) – Number of channels in input images/features. If is None, equals to outer_channels. Default: None.

  • submodule (UnetSkipConnectionBlock) – Previously constructed submodule. Default: None.

  • is_outermost (bool) – Whether this module is the outermost module. Default: False.

  • is_innermost (bool) – Whether this module is the innermost module. Default: False.

  • norm_cfg (dict) – Config dict to build norm layer. Default: dict(type=’BN’).

  • use_dropout (bool) – Whether to use dropout layers. Default: False.

forward(x)[源代码]

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.