Shortcuts

mmedit.models.editors.stylegan3.stylegan3

Module Contents

Classes

StyleGAN3

Impelmentation of Alias-Free Generative Adversarial Networks. # noqa.

Attributes

ModelType

mmedit.models.editors.stylegan3.stylegan3.ModelType[源代码]
class mmedit.models.editors.stylegan3.stylegan3.StyleGAN3(generator: ModelType, discriminator: Optional[ModelType] = None, data_preprocessor: Optional[Union[dict, mmengine.Config]] = None, generator_steps: int = 1, discriminator_steps: int = 1, forward_kwargs: Optional[Dict] = None, ema_config: Optional[Dict] = None, loss_config=dict())[源代码]

Bases: mmedit.models.editors.stylegan2.StyleGAN2

Impelmentation of Alias-Free Generative Adversarial Networks. # noqa.

Paper link: https://nvlabs-fi-cdn.nvidia.com/stylegan3/stylegan3-paper.pdf # noqa

Detailed architecture can be found in

StyleGAN3Generator and StyleGAN2Discriminator

test_step(data: dict) mmedit.utils.typing.SampleList[源代码]

Gets the generated image of given data. Same as val_step().

参数

data (dict) – Data sampled from metric specific sampler. More detials in Metrics and Evaluator.

返回

A list of EditDataSample contain generated results.

返回类型

SampleList

val_step(data: dict) mmedit.utils.typing.SampleList[源代码]

Gets the generated image of given data. Same as val_step().

参数

data (dict) – Data sampled from metric specific sampler. More detials in Metrics and Evaluator.

返回

A list of EditDataSample contain generated results.

返回类型

SampleList

train_discriminator(inputs: dict, data_samples: List[mmedit.structures.EditDataSample], optimizer_wrapper: mmengine.optim.OptimWrapper) Dict[str, torch.Tensor][源代码]

Train discriminator.

参数
  • inputs (dict) – Inputs from dataloader.

  • data_samples (List[EditDataSample]) – Data samples from dataloader.

  • optim_wrapper (OptimWrapper) – OptimWrapper instance used to update model parameters.

返回

A dict of tensor for logging.

返回类型

Dict[str, Tensor]

train_generator(inputs: dict, data_samples: List[mmedit.structures.EditDataSample], optimizer_wrapper: mmengine.optim.OptimWrapper) Dict[str, torch.Tensor][源代码]

Train generator.

参数
  • inputs (dict) – Inputs from dataloader.

  • data_samples (List[EditDataSample]) – Data samples from dataloader. Do not used in generator’s training.

  • optim_wrapper (OptimWrapper) – OptimWrapper instance used to update model parameters.

返回

A dict of tensor for logging.

返回类型

Dict[str, Tensor]

sample_equivarience_pairs(batch_size, sample_mode='ema', eq_cfg=dict(compute_eqt_int=False, compute_eqt_frac=False, compute_eqr=False, translate_max=0.125, rotate_max=1), sample_kwargs=dict())[源代码]
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.