Closed CUN-bjy closed 4 years ago
That error happen on below function, especially on self.critic.train_on_batch(obs,acts,critic_target)
.
def update_networks(self, obs, acts, critic_target):
""" Train actor & critic from sampled experience
"""
# update critic
self.critic.train_on_batch(obs, acts, critic_target) ##########!!!
# get next action and Q-value Gradient
actions = self.actor.network.predict(obs)
# update actor
self.actor.train(obs,actions,self.critic.network)
# update target networks
self.actor.target_update()
self.critic.target_update()
tensorflow1.x based optimizer
on critic was the problem.
So, I change the critic's optimizer to tf2.x-based optimizer(eager mode).
And then solved.
When the
train.py
module run, some warning happen on the tensorflow. and the speed is critically slow..I cannot sure if it depends on GPU using or not.