From 6ae842161508e4bfefa8f7b287346dac9eaeb896 Mon Sep 17 00:00:00 2001 From: Antonin Raffin Date: Tue, 28 Jan 2020 10:28:44 +0100 Subject: [PATCH] Update docstring --- torchy_baselines/common/base_class.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/torchy_baselines/common/base_class.py b/torchy_baselines/common/base_class.py index bbcb951..b69e0aa 100644 --- a/torchy_baselines/common/base_class.py +++ b/torchy_baselines/common/base_class.py @@ -144,6 +144,8 @@ class BaseRLModel(ABC): """ Rescale the action from [low, high] to [-1, 1] (no need for symmetric action space) + + :param action: Action to scale """ low, high = self.action_space.low, self.action_space.high return 2.0 * ((action - low) / (high - low)) - 1.0 @@ -152,6 +154,8 @@ class BaseRLModel(ABC): """ Rescale the action from [-1, 1] to [low, high] (no need for symmetric action space) + + :param scaled_action: Action to un-scale """ low, high = self.action_space.low, self.action_space.high return low + (0.5 * (scaled_action + 1.0) * (high - low))