nageshsinghc4 / Face-generation-GAN

Generate realistic human images that do not exist in reality using GAN
67 stars 41 forks source link

module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects' #5

Open MrRaymondLee opened 3 years ago

MrRaymondLee commented 3 years ago

I'm from keras import Input I receive this error: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-73d6dee565c1> in <module>
----> 1 from keras import Input
      2 from keras.layers import Dense, Reshape, LeakyReLU, Conv2D, Conv2DTranspose, Flatten, Dropout
      3 from keras.models import Model
      4 from keras.optimizers import RMSprop
      5 

c:\users\rayle\.virtualenvs\jupyterlab-3rw2puha\lib\site-packages\keras\__init__.py in <module>
     18 from . import callbacks
     19 from . import constraints
---> 20 from . import initializers
     21 from . import metrics
     22 from . import models

c:\users\rayle\.virtualenvs\jupyterlab-3rw2puha\lib\site-packages\keras\initializers\__init__.py in <module>
    122 # from ALL_OBJECTS. We make no guarantees as to whether these objects will
    123 # using their correct version.
--> 124 populate_deserializable_objects()
    125 globals().update(LOCAL.ALL_OBJECTS)
    126 

c:\users\rayle\.virtualenvs\jupyterlab-3rw2puha\lib\site-packages\keras\initializers\__init__.py in populate_deserializable_objects()
     80     v2_objs = {}
     81     base_cls = initializers_v2.Initializer
---> 82     generic_utils.populate_dict_with_module_objects(
     83         v2_objs,
     84         [initializers_v2],

AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'```
nageshsinghc4 commented 3 years ago

Kindly use tensorflow 2.1.0

Sent from my iPhone

On 27-Apr-2021, at 8:41 PM, Raymond Lee @.***> wrote:

AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

MrRaymondLee commented 3 years ago

Thanks for the quick reply!

pip install tensorflow-gpu==2.1.0
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.1.0 (from versions: 2.5.0rc0, 2.5.0rc1)
ERROR: No matching distribution found for tensorflow-gpu==2.1.0

I can't pick anything but the most recent.