Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TensorFlow 'module' object has no attribute 'global_variables_initializer'

I'm new to Tensorflow I'm running a Deep learning Assignment from Udacity on iPython notebook. link

And it has an error.

AttributeError                            Traceback (most recent call last) `<ipython-input-18-3446420b5935>` in `<module>`()   2    3 with tf.Session(graph=graph) as session: ----> 4   tf.global_variables_initializer().run()  AttributeError: 'module' object has no attribute 'global_variables_initializer' 

Please help! How can I fix this? Thank you.

like image 537
Le D. Thang Avatar asked Nov 09 '16 16:11

Le D. Thang


1 Answers

In older versions, it was called tf.initialize_all_variables.

like image 177
drpng Avatar answered Oct 01 '22 01:10

drpng