correct_for_frame_skip¶
- torchrl.trainers.helpers.correct_for_frame_skip(cfg: DictConfig) DictConfig[原始碼]¶
更正 frame_skip 引數,透過將所有表示幀數的引數除以 frame_skip 來進行更正。
這旨在避免無意中過度取樣環境,即目標是收集 100 萬幀,但實際上收集了 frame_skip * 100 萬幀。
- 引數:
cfg (DictConfig) – 包含一些幀計數引數的 DictConfig,包括:“max_frames_per_traj”、“total_frames”、“frames_per_batch”、“record_frames”、“annealing_frames”、“init_random_frames”、“init_env_steps”
- 返回:
輸入 DictConfig,就地修改。