Fixing error ” AttributeError: ‘module’ object has no attribute ‘global_variables_initializer'”

For the following TensorFlow error:

 AttributeError: 'module' object has no attribute 'global_variables_initializer'

You need to do a find and replace, of “global_variables_initializer” to “tf.initialize_all_variables” (this was changed in an upgrade)

If you're looking for a Python book, Natural Language Processing with Python is a great way to learn the language while building some really interesting projects.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *