You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/leo/Workspace/global/pbl5/pbl5-api/api/urls.py", line 5, in <module>
from . import views
File "/home/leo/Workspace/global/pbl5/pbl5-api/api/views.py", line 15, in <module>
from ai_models import recog, train
File "/home/leo/Workspace/global/pbl5/pbl5-api/ai_models/recog.py", line 1, in <module>
import detect
File "/home/leo/Workspace/global/pbl5/pbl5-api/detect.py", line 4, in <module>
from mtcnn import MTCNN
File "/home/leo/.local/lib/python3.8/site-packages/mtcnn/__init__.py", line 26, in <module>
from mtcnn.mtcnn import MTCNN
File "/home/leo/.local/lib/python3.8/site-packages/mtcnn/mtcnn.py", line 37, in <module>
from mtcnn.network.factory import NetworkFactory
File "/home/leo/.local/lib/python3.8/site-packages/mtcnn/network/factory.py", line 27, in <module>
from keras.models import Model
File "/home/leo/.local/lib/python3.8/site-packages/keras/__init__.py", line 20, in <module>
from . import initializers
File "/home/leo/.local/lib/python3.8/site-packages/keras/initializers/__init__.py", line 124, in <module>
populate_deserializable_objects()
File "/home/leo/.local/lib/python3.8/site-packages/keras/initializers/__init__.py", line 82, in populate_deserializable_objects
generic_utils.populate_dict_with_module_objects(
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
Description
I run the example in Readme and it shows this error. I found out the way to solve it, that's changes import part in mtcnn/network/factory/py from
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, PReLU, Flatten, Softmax
from keras.models import Model
to
from tensorflow.keras.layers import Input, Dense, Conv2D, MaxPooling2D, PReLU, Flatten, Softmax
from tensorflow.keras.models import Model
However, I think it's better if there's a change in the source code.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Versions
Error
Description
I run the example in Readme and it shows this error. I found out the way to solve it, that's changes import part in
mtcnn/network/factory/py
fromto
However, I think it's better if there's a change in the source code.
Thanks in advance!
The text was updated successfully, but these errors were encountered: