Shortcuts

mmedit.models.editors.real_esrgan.unet_disc

Module Contents

Classes

UNetDiscriminatorWithSpectralNorm

A U-Net discriminator with spectral normalization.

class mmedit.models.editors.real_esrgan.unet_disc.UNetDiscriminatorWithSpectralNorm(in_channels, mid_channels=64, skip_connection=True)[source]

Bases: mmengine.model.BaseModule

A U-Net discriminator with spectral normalization.

Parameters
  • in_channels (int) – Channel number of the input.

  • mid_channels (int, optional) – Channel number of the intermediate features. Default: 64.

  • skip_connection (bool, optional) – Whether to use skip connection. Default: True.

forward(img)[source]

Forward function.

Parameters

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

Returns

Forward results.

Return type

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.