mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-09 11:13:47 +08:00
Fix failed softmax layer test
This commit is contained in:
@@ -61,11 +61,13 @@ class DDPGAgent:
|
||||
total_reward = 0.0
|
||||
while not self.step_limit or steps < self.step_limit:
|
||||
action = self.actor.predict(np.stack([state])).flatten()
|
||||
self.logger.histo_summary('action', action, self.total_steps)
|
||||
if not deterministic:
|
||||
if self.total_steps < self.exploration_steps:
|
||||
action = self.task.random_action()
|
||||
else:
|
||||
action += self.random_process.sample()
|
||||
self.logger.histo_summary('noised action', action, self.total_steps)
|
||||
next_state, reward, done, info = self.task.step(action)
|
||||
if not deterministic:
|
||||
self.replay.feed([state, action, reward, next_state, int(done)])
|
||||
|
||||
@@ -3,7 +3,6 @@ from DQN_agent import *
|
||||
from DDPG_agent import *
|
||||
from logger import *
|
||||
import logging
|
||||
import traceback
|
||||
from random_process import *
|
||||
|
||||
def dqn_cart_pole():
|
||||
@@ -211,5 +210,5 @@ if __name__ == '__main__':
|
||||
# async_pixel_atari('BreakoutNoFrameskip-v3')
|
||||
# a3c_pixel_atari('BreakoutNoFrameskip-v3')
|
||||
|
||||
ddpg_pendulum()
|
||||
# ddpg_bipedal_walker()
|
||||
# ddpg_pendulum()
|
||||
ddpg_bipedal_walker()
|
||||
Reference in New Issue
Block a user