inarikami / keras-rl2

Reinforcement learning with tensorflow 2 keras
MIT License
251 stars 105 forks source link

ValueError: Variable Tensor("Mean_1:0", shape=(), dtype=float32) has `None` for gradient while training DDPG #24

Open happypanda94 opened 4 years ago

happypanda94 commented 4 years ago

Whenever I try to run the ddpg_pendulum example (or any other DDPG example), I always get the error

ValueError: Variable Tensor("Mean_1:0", shape=(), dtype=float32) has None for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval.

Each time the training completes an interval, this problem occurs. Is there any way to get over it?

My Tensorflow and Keras versions are 2.1.0 and 2.3.1 respectively.