Shortcuts

PGGANFetchDataHook

class mmedit.engine.hooks.PGGANFetchDataHook[source]

PGGAN Fetch Data Hook.

Parameters

interval (int, optional) – The interval of calling this hook. If set to -1, the visualization hook will not be called. Defaults to 1.

before_train_iter(runner, batch_idx: int, data_batch: Optional[Sequence[dict]] = None) None[source]

All subclasses should override this method, if they need any operations before each training iteration.

Parameters
  • runner (Runner) – The runner of the training process.

  • batch_idx (int) – The index of the current batch in the train loop.

  • data_batch (dict or tuple or list, optional) – Data from dataloader.

update_dataloader(dataloader: torch.utils.data.dataloader.DataLoader, curr_scale: int) Optional[torch.utils.data.dataloader.DataLoader][source]

Updata the data loader.

Parameters
  • dataloader (DataLoader) – The dataloader to be updated.

  • curr_scale (int) – The current scale of the generated image.

Returns

The updated dataloader. If the dataloader do

not need to update, return None.

Return type

Optional[DataLoader]

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.