You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
K.learning_phase() fetches the value, not the tensor itself - following backend.py, I found somewhat of a workaround, but it isn't user/API-friendly. I need the learning phase tensor to feed to K.function to get layer gradients, outputs, etc. Works fine w/ import keras.backend as K, but fails for import tensorflow.keras.backend as K.
Passing the symbolic learning_phase into K.function yields:
I have tried on colab with TF version 2.0 ,2.1.0-dev20191124 and was able to reproduce the issue.Please, find the gist here.However i am not seeing any issue with TF version 1.15. Thanks!
K.learning_phase()
fetches the value, not the tensor itself - following backend.py, I found somewhat of a workaround, but it isn't user/API-friendly. I need the learning phase tensor to feed toK.function
to get layer gradients, outputs, etc. Works fine w/import keras.backend as K
, but fails forimport tensorflow.keras.backend as K
.Passing the symbolic learning_phase into
K.function
yields:Minimal applied example:
Full error trace:
Partial workaround:
The text was updated successfully, but these errors were encountered: