Shortcuts

mmedit.models.editors.mspie.mspie_stylegan2_discriminator

Module Contents

Classes

MSStyleGAN2Discriminator

StyleGAN2 Discriminator.

class mmedit.models.editors.mspie.mspie_stylegan2_discriminator.MSStyleGAN2Discriminator(in_size, channel_multiplier=2, blur_kernel=[1, 3, 3, 1], mbstd_cfg=dict(group_size=4, channel_groups=1), with_adaptive_pool=False, pool_size=(2, 2))[source]

Bases: torch.nn.Module

StyleGAN2 Discriminator.

The architecture of this discriminator is proposed in StyleGAN2. More details can be found in: Analyzing and Improving the Image Quality of StyleGAN CVPR2020.

Parameters
  • in_size (int) – The input size of images.

  • channel_multiplier (int, optional) – The multiplier factor for the channel number. Defaults to 2.

  • blur_kernel (list, optional) – The blurry kernel. Defaults to [1, 3, 3, 1].

  • mbstd_cfg (dict, optional) – Configs for minibatch-stddev layer. Defaults to dict(group_size=4, channel_groups=1).

forward(x)[source]

Forward function.

Parameters

x (torch.Tensor) – Input image tensor.

Returns

Predict score for the input image.

Return type

torch.Tensor

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

Free document hosting provided by Read the Docs.