Shortcuts

mmedit.engine.hooks.pggan_fetch_data_hook

Module Contents

Classes

PGGANFetchDataHook

PGGAN Fetch Data Hook.

Attributes

DATA_BATCH

mmedit.engine.hooks.pggan_fetch_data_hook.DATA_BATCH[源代码]
class mmedit.engine.hooks.pggan_fetch_data_hook.PGGANFetchDataHook[源代码]

Bases: mmengine.hooks.Hook

PGGAN Fetch Data Hook.

参数

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: DATA_BATCH = None) None[源代码]

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

参数
  • 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][源代码]

Updata the data loader.

参数
  • dataloader (DataLoader) – The dataloader to be updated.

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

返回

The updated dataloader. If the dataloader do

not need to update, return None.

返回类型

Optional[DataLoader]

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.