mirror of
https://github.com/wassname/pytorch-soft-actor-critic.git
synced 2026-06-27 19:00:26 +08:00
Update normalized_actions.py
This commit is contained in:
@@ -3,7 +3,7 @@ import gym
|
||||
|
||||
class NormalizedActions(gym.ActionWrapper):
|
||||
|
||||
def _action(self, action):
|
||||
def action(self, action):
|
||||
action = (action + 1) / 2 # [-1, 1] => [0, 1]
|
||||
action *= (self.action_space.high - self.action_space.low)
|
||||
action += self.action_space.low
|
||||
|
||||
Reference in New Issue
Block a user