mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-06-05 00:00:04 +00:00
Add sanity check for clip_range_vf
This commit is contained in:
parent
02b452a9f9
commit
271a0a7818
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,10 @@ class PPO(BaseRLModel):
|
|||
|
||||
self.clip_range = get_schedule_fn(self.clip_range)
|
||||
if self.clip_range_vf is not None:
|
||||
if isinstance(self.clip_range_vf, (float, int)):
|
||||
assert self.clip_range_vf > 0, ('`clip_range_vf` must be positive, '
|
||||
'pass `None` to deactivate vf clipping')
|
||||
|
||||
self.clip_range_vf = get_schedule_fn(self.clip_range_vf)
|
||||
|
||||
def collect_rollouts(self,
|
||||
|
|
|
|||
Loading…
Reference in a new issue