Shortcuts

IterBasedTrainLoop

class mmengine.runner.IterBasedTrainLoop(runner, dataloader, max_iters, val_begin=1, val_interval=1000, dynamic_intervals=None)[source]

Loop for iter-based training.

Parameters
  • runner (Runner) – A reference of runner.

  • dataloader (Dataloader or dict) – A dataloader object or a dict to build a dataloader.

  • max_iters (int) – Total training iterations.

  • val_begin (int) – The iteration that begins validating. Defaults to 1.

  • val_interval (int) – Validation interval. Defaults to 1000.

  • dynamic_intervals (List[Tuple[int, int]], optional) – The first element in the tuple is a milestone and the second element is a interval. The interval is used after the corresponding milestone. Defaults to None.

Return type

None

property epoch

Current epoch.

Type

int

property iter

Current iteration.

Type

int

property max_epochs

Total epochs to train model.

Type

int

property max_iters

Total iterations to train model.

Type

int

run()[source]

Launch training.

Return type

None

run_iter(data_batch)[source]

Iterate one mini-batch.

Parameters

data_batch (Sequence[dict]) – Batch of data from dataloader.

Return type

None

Read the Docs v: v0.3.0
Versions
latest
stable
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.