Shortcuts

EpochBasedTrainLoop

class mmengine.runner.EpochBasedTrainLoop(runner, dataloader, max_epochs, val_begin=1, val_interval=1, dynamic_intervals=None)[源代码]

Loop for epoch-based training.

参数
  • runner (Runner) – A reference of runner.

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

  • max_epochs (int) – Total training epochs.

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

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

  • 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.

返回类型

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

Launch training.

返回类型

torch.nn.modules.module.Module

run_epoch()[源代码]

Iterate one epoch.

返回类型

None

run_iter(idx, data_batch)[源代码]

Iterate one min-batch.

参数

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

返回类型

None

Read the Docs v: v0.10.0
Versions
latest
stable
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
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.