What matters is which Keras version do you have?
On Thursday, 20 September 2018 07:41:44 CEST adityaku...@gmail.com wrote:
> tf version 1.10.1
>
> For the following code :
>
> lr = keras.backend.variable(0.01)
> tf_opt = tf.train.GradientDescentOptimizer(learning_rate=lr)
> opt = keras.optimizers.TFOptimizer(tf_opt)
> opt.lr = lr
>
>
> Obtain error :
> ---> 22 <https://localhost:8080/#> opt = keras.optimizers.TFOptimizer(tf_opt
Ok, but you didn't had to write three emails about it.
I checked the source code and TFOptimizer in keras inside tensorflow is not marked as exported (no tf_export tag), that's why you get an error.
But if you install keras from pip and import it, it works fine. Seems an error in the keras version inside tensorflow.