EpochBasedTrainLoop — mmengine 0.10.7 documentation (original) (raw)

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

Loop for epoch-based training.

Parameters:

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:

Module

run_epoch()[source]

Iterate one epoch.

Return type:

None

run_iter(idx, data_batch)[source]

Iterate one min-batch.

Parameters:

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

Return type:

None