mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-10 11:40:58 +08:00
Improve normalizer for scalar
This commit is contained in:
@@ -48,7 +48,7 @@ class ContinuousAdvantageActorCritic:
|
||||
|
||||
steps += 1
|
||||
total_reward += reward
|
||||
reward = np.asscalar(self.reward_normalizer(np.array([reward])))
|
||||
reward = self.reward_normalizer(reward)
|
||||
|
||||
if deterministic:
|
||||
if terminal:
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ class ProximalPolicyOptimization:
|
||||
batched_steps += 1
|
||||
episode_length += 1
|
||||
|
||||
reward = np.asscalar(self.reward_normalizer(np.array([reward])))
|
||||
reward = self.reward_normalizer(reward)
|
||||
rewards.append(reward)
|
||||
|
||||
if done:
|
||||
|
||||
Reference in New Issue
Block a user