Shortcuts

mmagic.utils.sampler

Module Contents

Classes

ArgumentsSampler

Dummy sampler only return input args multiple times.

NoiseSampler

Noise sampler to by call models.noise_fn to generate noise.

DataSampler

Sampler loop the train_dataloader.

ValDataSampler

Sampler loop the val_dataloader.

Functions

_check_keys(→ None)

Check whether target key is in the sample_kwargs.

get_sampler(sample_kwargs, runner)

Get a sampler to loop input data.

mmagic.utils.sampler._check_keys(sample_kwargs: dict, key: str) None[源代码]

Check whether target key is in the sample_kwargs.

mmagic.utils.sampler.get_sampler(sample_kwargs: dict, runner: Optional[mmengine.runner.Runner])[源代码]

Get a sampler to loop input data.

参数
  • sample_kwargs (dict) – _description_

  • runner (Optional[Runner]) – _description_

返回

_description_

返回类型

_type_

class mmagic.utils.sampler.ArgumentsSampler(sample_kwargs: dict, runner: Optional[mmengine.runner.Runner] = None)[源代码]

Dummy sampler only return input args multiple times.

__iter__()[源代码]
__next__()[源代码]
class mmagic.utils.sampler.NoiseSampler(sample_kwargs: dict, runner: mmengine.runner.Runner)[源代码]

Noise sampler to by call models.noise_fn to generate noise.

__iter__()[源代码]
__next__()[源代码]
class mmagic.utils.sampler.DataSampler(sample_kwargs: dict, runner: mmengine.runner.Runner)[源代码]

Sampler loop the train_dataloader.

__iter__()[源代码]
__next__()[源代码]
class mmagic.utils.sampler.ValDataSampler(sample_kwargs: dict, runner: mmengine.runner.Runner)[源代码]

Sampler loop the val_dataloader.

__iter__()[源代码]
__next__()[源代码]
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.