framework.middleware.functional.trainer¶
trainer¶
trainer¶
- ding.framework.middleware.functional.trainer.trainer(cfg: EasyDict, policy: Policy, log_freq: int = 100) Callable[source]¶
- Overview:
The middleware that executes a single training process.
- Arguments:
cfg (
EasyDict): Config.policy (
Policy): The policy to be trained in step-by-step mode.log_freq (
int): The frequency (iteration) of showing log.
multistep_trainer¶
- ding.framework.middleware.functional.trainer.multistep_trainer(policy: Policy, log_freq: int = 100) Callable[source]¶
- Overview:
The middleware that executes training for a target num of steps.
- Arguments:
policy (
Policy): The policy specialized for multi-step training.log_freq (
int): The frequency (iteration) of showing log.