Open leech74 opened 5 years ago
This issue is related to the K.gradients
function that's located within critic.py
.
Both the Keras backend documentation and the TensorFlow documentation for the function gradients(loss, variables)
state that loss
should be a scalar tensor input. In your example, loss
was a 2D tensor.
We ended up finding a way to implement gradients(loss, variables)
in a way that works with an n-dimensional tensor input while remaining compatible with the existing code base. No action would be required on your end to make your code work with PlaidML once this fix is released.
Keep an eye out, it'll be in a future release!
👀
Keep an eye out, it'll be in a future release!
👀 :)
I was trying the example from the Chapter 9 of the book "Python Reinforcement Learning Projects" and receive the error "plaidml.exceptions.Unknown: More indexes than dimensions for tensor: 1:X_T23 2 > 0". The same example ran ok in Tensorflow. Can someone tell why it does not work in PlaidML and how to fix it. The code for the book can be found here: “https://github.com/PacktPublishing/Python-Reinforcement-Learning-Projects”