mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-09-15 22:10:25 +00:00
Use normal sampling for SAC
This commit is contained in:
parent
809a3d3d38
commit
26ccf499b3
4 changed files with 5 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ Deprecations:
|
||||||
|
|
||||||
Others:
|
Others:
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
- SAC with SDE now sample only one matrix
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -47,7 +47,7 @@ setup(name='torchy_baselines',
|
||||||
license="MIT",
|
license="MIT",
|
||||||
long_description="",
|
long_description="",
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
version="0.2.0",
|
version="0.2.1",
|
||||||
)
|
)
|
||||||
|
|
||||||
# python setup.py sdist
|
# python setup.py sdist
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@ from torchy_baselines.ppo import PPO
|
||||||
from torchy_baselines.sac import SAC
|
from torchy_baselines.sac import SAC
|
||||||
from torchy_baselines.td3 import TD3
|
from torchy_baselines.td3 import TD3
|
||||||
|
|
||||||
__version__ = "0.2.0"
|
__version__ = "0.2.1"
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,8 @@ class SAC(OffPolicyRLModel):
|
||||||
# is lost and we cannot backpropagate through again
|
# is lost and we cannot backpropagate through again
|
||||||
# anyway, we need to sample because `log_std` may have changed between two gradient steps
|
# anyway, we need to sample because `log_std` may have changed between two gradient steps
|
||||||
if self.use_sde:
|
if self.use_sde:
|
||||||
self.actor.reset_noise(batch_size=batch_size)
|
# self.actor.reset_noise(batch_size=batch_size)
|
||||||
# self.actor.reset_noise()
|
self.actor.reset_noise()
|
||||||
|
|
||||||
# Action by the current actor for the sampled state
|
# Action by the current actor for the sampled state
|
||||||
action_pi, log_prob = self.actor.action_log_prob(obs)
|
action_pi, log_prob = self.actor.action_log_prob(obs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue