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[source]

Check whether target key is in the sample_kwargs.

mmedit.utils.sampler.get_sampler(sample_kwargs: dict, runner: Optional[mmengine.runner.Runner])[source]

Get a sampler to loop input data.

Parameters
  • sample_kwargs (dict) – _description_

  • runner (Optional[Runner]) – _description_

Returns

_description_

Return type

_type_

class mmedit.utils.sampler.ArgumentsSampler(sample_kwargs: dict, runner: Optional[mmengine.runner.Runner] = None)[source]

Dummy sampler only return input args multiple times.

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

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

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

Sampler loop the train_dataloader.

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

Sampler loop the train_dataloader.

__iter__()[source]
__next__()[source]
Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.