Shortcuts

mmedit.models.utils.get_valid_noise_size

mmedit.models.utils.get_valid_noise_size(noise_size: Optional[int], generator: Union[Dict, torch.nn.modules.module.Module]) Optional[int][source]

Get the value of noise_size from input, generator and check the consistency of these values. If no conflict is found, return that value.

Parameters
  • noise_size (Optional[int]) – noise_size passed to BaseGAN_refactor’s initialize function.

  • generator (ModelType) – The config or the model of generator.

Returns

The noise size feed to generator.

Return type

int | None

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.