vis4d.engine.callbacks.yolox_callbacks

YOLOX-specific callbacks.

Functions

get_norm_states(module)

Get the state_dict of batch norms in the module.

Classes

YOLOXModeSwitchCallback(*args, switch_epoch, ...)

Callback for switching the mode of YOLOX training.

YOLOXSyncNormCallback([epoch_based, ...])

Callback for syncing the norm states of YOLOX training.

YOLOXSyncRandomResizeCallback(*args, ...)

Callback for syncing random resize during YOLOX training.

class YOLOXModeSwitchCallback(*args, switch_epoch, **kwargs)[source]

Callback for switching the mode of YOLOX training.

__init__(*args, switch_epoch, **kwargs)[source]

Init callback.

Parameters:

switch_epoch (int) – Epoch to switch the mode.

on_train_epoch_end(trainer, pl_module)[source]

Hook to run at the end of a training epoch.

Return type:

None

get_norm_states(module)[source]

Get the state_dict of batch norms in the module.

Parameters:

module (nn.Module) – Module to get batch norm states from.

Return type:

Dict[str, Any]

class YOLOXSyncNormCallback(epoch_based=True, train_connector=None, test_connector=None)[source]

Callback for syncing the norm states of YOLOX training.

on_test_epoch_start(trainer, pl_module)[source]

Hook to run at the beginning of a testing epoch.

Return type:

None

class YOLOXSyncRandomResizeCallback(*args, size_list, interval, **kwargs)[source]

Callback for syncing random resize during YOLOX training.

__init__(*args, size_list, interval, **kwargs)[source]

Init callback.

on_train_batch_start(trainer, pl_module, batch, batch_idx)[source]

Hook to run at the start of a training batch.

Return type:

None