Shortcuts

mmedit.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 train_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.

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

Check whether target key is in the sample_kwargs.

mmedit.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 mmedit.utils.sampler.ArgumentsSampler(sample_kwargs: dict, runner: Optional[mmengine.runner.Runner] = None)[源代码]

Dummy sampler only return input args multiple times.

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

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

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

Sampler loop the train_dataloader.

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

Sampler loop the train_dataloader.

__iter__()[源代码]
__next__()[源代码]
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.