CountFramesLog¶
- class torchrl.trainers.CountFramesLog(*args, **kwargs)[source]¶
一个帧计数钩子。
- 参数:
frame_skip (int) – 环境的帧跳数。此参数对于跟踪总帧数(而非可见帧数)很重要。
log_pbar (bool, optional) – 如果为
True
,奖励值将记录在进度条上。默认为 False。
示例
>>> count_frames = CountFramesLog(frame_skip=frame_skip) >>> trainer.register_op("pre_steps_log", count_frames)