aymericdamien / TensorFlow-Examples

TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seemmingly using the deprecated or inexestent tensorflow's attribute?

MutaLucem opened this issue · comments

Hi, i strongly believe u have a good day now. so as ur tutorials' real fans, if this message bother ur good mood, i must say sorry.
In brief,when i run the code below(route where is in "tf-v2/Recurrent Neural Network Example"),
optimizer = tf.optimizers.Adam(learning_rate),
and then emerged the error said

"module 'tensorflow' has no attribute 'optimizers' "

subsequently, i substituted the code for it which below,
optimizer = tf.train.AdamOptimizer(learning_rate).
then it succeed.

Please make sure you are running TensorFlow 2.0:
pip install tensorflow==2.0.0-beta1

Thanks a lot, the matter was settled.