Skip to content

Commit

Permalink
Fix reset
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin committed Nov 25, 2024
1 parent 85e366b commit 8f59e8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbx/tqc/tqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def train(self, gradient_steps: int, batch_size: int) -> None:
data = self.replay_buffer.sample(batch_size * gradient_steps, env=self._vec_normalize_env)

# Maybe reset the parameters
if self.resets and self.reset_idx < len(self.resets) and self.resets[self.reset_idx] >= self.num_timesteps:
if self.resets and self.reset_idx < len(self.resets) and self.num_timesteps >= self.resets[self.reset_idx]:
# Note: we are not resetting the entropy coeff
assert isinstance(self.qf_learning_rate, float)
self.key = self.policy.build(self.key, self.lr_schedule, self.qf_learning_rate)
Expand Down

0 comments on commit 8f59e8e

Please sign in to comment.