I created a model class which is a subclass of keras.Model. While training the model, I want to change the weights of the loss functions after some epochs. In order to do that I created boolean variables to my model indicating that the model should start training with additional loss function. I add a pseudo code that mainly shows what
Tag: gradienttape
Python, Tensorflow ValueError: No gradients provided for any variable
I have a class called RL_Brain: When I run the learn function, I get the following error: Answer the following line is causing that error Once you do that, there is no path from your loss function to your trainable variables so no gradient can be calculated.