mirror of
https://github.com/wassname/DeepRL.git
synced 2026-10-30 12:50:27 +08:00
Improve normalizer for scalar
This commit is contained in:
1 parent
fae9a85f31
commit
51f125c01e
3 files changed
+13
-4
No files matched your search
@@ -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