From d4ef5c5993c65257ded867406d552fd9aa1b061c Mon Sep 17 00:00:00 2001 From: cathrinS <38454060+cathrinS@users.noreply.github.com> Date: Thu, 28 Jan 2021 12:07:00 +0100 Subject: [PATCH] [RLlib] Atari-RAM-Preprocessing, unsigned observation vector results in a false preprocessed observation (#13013) --- rllib/models/preprocessors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rllib/models/preprocessors.py b/rllib/models/preprocessors.py index 44312a807..0abfb8658 100644 --- a/rllib/models/preprocessors.py +++ b/rllib/models/preprocessors.py @@ -140,7 +140,7 @@ class AtariRamPreprocessor(Preprocessor): @override(Preprocessor) def transform(self, observation: TensorType) -> np.ndarray: self.check_shape(observation) - return (observation - 128) / 128 + return (observation.astype("float32") - 128) / 128 class OneHotPreprocessor(Preprocessor):