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)

2 Replies to “Fixing error ” AttributeError: ‘module’ object has no attribute ‘global_variables_initializer'””

Leave a Reply

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