trinity.trainer.trainer module#
Trainer Class
- class trinity.trainer.trainer.Trainer(config: Config)[源代码]#
基类:
objectConsume the experience and train the model.
- async train_step(exps: List[Experience]) Dict[源代码]#
Train one step.
- 返回:
Whether to continue training. Dict: Metrics of the training step.
- 返回类型:
bool
- property train_step_num: int#
Get the current training step number.
- class trinity.trainer.trainer.TrainEngineWrapper[源代码]#
基类:
ABCA wrapper class to wrap various training engines.
- abstract property train_step_num: int#
Get the current training step number.
- abstractmethod async train_step(batch_exps: List[Experience]) Dict[源代码]#
Training one step.
- 参数:
batch_exps (List[Experience]) -- A batch of experiences to train.
- 返回:
Metrics of the training step.
- 返回类型:
Dict
- trinity.trainer.trainer.get_trainer_wrapper(config: Config) TrainEngineWrapper[源代码]#
Get a trainer wrapper.