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

Check whether target key is in the sample_kwargs.

mmagic.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 mmagic.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 mmagic.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 mmagic.utils.sampler.DataSampler(sample_kwargs: dict, runner: mmengine.runner.Runner)[source]

Sampler loop the train_dataloader.

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

Sampler loop the val_dataloader.

__iter__()[source]
__next__()[source]
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.