CountFramesLog¶
- class torchrl.trainers.CountFramesLog(*args, **kwargs)[來源]¶
一個影格計數器鉤子。
- 參數:
frame_skip (int) – 環境的影格跳過值。此參數對於追蹤影格總數非常重要,而非表面上的影格數。
log_pbar (bool, optional) – 如果
True
,獎勵值將記錄在進度條上。預設值為 False。
範例
>>> count_frames = CountFramesLog(frame_skip=frame_skip) >>> trainer.register_op("pre_steps_log", count_frames)