Skip to content
Advertisement

Python, Tensorflow ValueError: No gradients provided for any variable

I have a class called RL_Brain:

JavaScript

When I run the learn function, I get the following error:

JavaScript

Advertisement

Answer

the following line is causing that error

JavaScript

Once you do that, there is no path from your loss function to your trainable variables so no gradient can be calculated.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement