mmagic.models.editors.pix2pix.pix2pix_modules
¶
Module Contents¶
Classes¶
Construct a Unet submodule with skip connections, with the following. |
- class mmagic.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)[source]¶
Bases:
torch.nn.Module
Construct a Unet submodule with skip connections, with the following.
structure: downsampling - submodule - upsampling.
- Parameters
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.