From 60066d77fafa4ead521c42acc9685eb280eb6335 Mon Sep 17 00:00:00 2001 From: Martin Kubovcik Date: Sat, 18 Nov 2023 19:36:16 +0100 Subject: [PATCH] update --- rl_toolkit/networks/models/dueling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rl_toolkit/networks/models/dueling.py b/rl_toolkit/networks/models/dueling.py index a9a02ed..78c96ec 100644 --- a/rl_toolkit/networks/models/dueling.py +++ b/rl_toolkit/networks/models/dueling.py @@ -234,7 +234,7 @@ def _compute_n_step_rewards( # Add the next state value with discount n_step_rewards += ( - (1.0 - is_terminal[:, tf.newaxis]) + (1.0 - is_terminal) * tf.reverse(discounts[1:], axis=[0])[tf.newaxis, :] * next_state_value[:, tf.newaxis] )