Shortcuts

mmedit.models.editors.stylegan1.stylegan1_discriminator

Module Contents

Classes

StyleGAN1Discriminator

StyleGAN1 Discriminator.

class mmedit.models.editors.stylegan1.stylegan1_discriminator.StyleGAN1Discriminator(in_size, blur_kernel=[1, 2, 1], mbstd_cfg=dict(group_size=4))[源代码]

Bases: torch.nn.Module

StyleGAN1 Discriminator.

The architecture of this discriminator is proposed in StyleGAN1. More details can be found in: A Style-Based Generator Architecture for Generative Adversarial Networks CVPR2019.

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

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

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

forward(input, transition_weight=1.0, curr_scale=- 1)[源代码]

Forward function.

参数
  • input (torch.Tensor) – Input image tensor.

  • transition_weight (float, optional) – The weight used in resolution transition. Defaults to 1..

  • curr_scale (int, optional) – The resolution scale of image tensor. -1 means the max resolution scale of the StyleGAN1. Defaults to -1.

返回

Predict score for the input image.

返回类型

torch.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.