AttributeError: module ‘tensorflow.python.keras.utils.generic_utils’ has no attribute ‘populate_dict_with_module_objects’

If you got this problem, check if you are using tf-nightly or tf-estimate-nightly, etc with: pip list | grep tf

Try uninstall these tf-*-nightly and reinstall TensorFlow:

pip uninstall tf-nightly
pip uninstall tf-estimate-nightly
pip install tensorflow --upgrade --force-reinstall

Another workaround is manually to copy “populate_dict_with_module_objects” function from this link (line 827 to 832) and add it to “generic_utils.py” to directly fix what the program complains about in the error message.


More Articles

How to start a new Github repo from an existing project

Assume that you have a project and you want to track it with Github. Navigate to the project folder,...

codezilla

codezilla

How to check for listening ports in Linux

Here is one of the most popular commands for troubleshooting network or specific application problem...

codezilla

codezilla

How to get octal file permissions from command line?

Sometimes we want to know the octal number representing the permission of a file like 755, 777, 664 ...

codezilla

codezilla