Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'KerasHistory' object has no attribute 'layer' #13

Open
h-azad opened this issue May 16, 2024 · 1 comment
Open

AttributeError: 'KerasHistory' object has no attribute 'layer' #13

h-azad opened this issue May 16, 2024 · 1 comment

Comments

@h-azad
Copy link

h-azad commented May 16, 2024

I'm having the following error when trying to execute the train.py

Traceback (most recent call last): File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/train.py", line 35, in <module> model = ArcFace.loadModel() ^^^^^^^^^^^^^^^^^^^ File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/ArcFace.py", line 17, in loadModel base_model = ResNet34() ^^^^^^^^^^ File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/ArcFace.py", line 49, in ResNet34 model = training.Model(img_input, x, name='ResNet34') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/.venv/lib/python3.12/site-packages/tensorflow/python/trackable/base.py", line 204, in _method_wrapper result = method(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/.venv/lib/python3.12/site-packages/tensorflow/python/keras/engine/functional.py", line 116, in __init__ self._init_graph_network(inputs, outputs) File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/.venv/lib/python3.12/site-packages/tensorflow/python/trackable/base.py", line 204, in _method_wrapper result = method(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/.venv/lib/python3.12/site-packages/tensorflow/python/keras/engine/functional.py", line 152, in _init_graph_network self._validate_graph_inputs_and_outputs() File "/Volumes/Dev/Python/FaceRecognition-MTCNN-ArcFace/.venv/lib/python3.12/site-packages/tensorflow/python/keras/engine/functional.py", line 694, in _validate_graph_inputs_and_outputs layer = x._keras_history.layer ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'KerasHistory' object has no attribute 'layer'

@naseemap47
Copy link
Owner

Hi @h-azad ,
which version of keras is using ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants