diff --git a/agent/DDPG_agent.py b/agent/DDPG_agent.py index 59ef543..be19e19 100644 --- a/agent/DDPG_agent.py +++ b/agent/DDPG_agent.py @@ -81,7 +81,10 @@ class DDPGAgent: # tensorboard logging suffix = 'test_' if deterministic else '' - config.logger.scalar_summary(suffix + 'action', action, self.total_steps) + if action.squeeze().ndim == 0: + config.logger.scalar_summary(suffix + 'action', action, self.total_steps) + else: + config.logger.histo_summary(suffix + 'action', action, self.total_steps) config.logger.scalar_summary(suffix + 'reward', reward, self.total_steps) for key in info: config.logger.scalar_summary('info_' + key, info[key], self.total_steps)