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

I can't instantiate FER object #65

Open
Vbichigatsushi opened this issue Apr 16, 2024 · 1 comment
Open

I can't instantiate FER object #65

Vbichigatsushi opened this issue Apr 16, 2024 · 1 comment

Comments

@Vbichigatsushi
Copy link

i'm trying to use fer with opencv but these errors occures again and again :

This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:py.warnings:C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\optimizers\base_optimizer.py:34: UserWarning: Argument decay is no longer supported and will be ignored.
warnings.warn(

Traceback (most recent call last):
File "C:\Users\IMORE\Documents\pythonAIs\test2.py", line 11, in
detector = FER()
^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\fer\fer.py", line 104, in init
self._initialize_model()
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\fer\fer.py", line 115, in _initialize_model
self._emotion_classifier = load_model(emotion_model, compile=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\saving\saving_api.py", line 183, in load_model
return legacy_h5_format.load_model_from_hdf5(filepath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\legacy\saving\legacy_h5_format.py", line 155, in load_model_from_hdf5
**saving_utils.compile_args_from_training_config(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\legacy\saving\saving_utils.py", line 133, in compile_args_from_training_config
optimizer = optimizers.deserialize(optimizer_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\optimizers_init
.py", line 65, in deserialize
return serialization_lib.deserialize_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\saving\serialization_lib.py", line 576, in deserialize_keras_object
return deserialize_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\saving\serialization_lib.py", line 711, in deserialize_keras_object
instance = cls.from_config(inner_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\optimizers\base_optimizer.py", line 809, in from_config
return cls(**config)
^^^^^^^^^^^^^
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\optimizers\adam.py", line 60, in init
super().init(
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\backend\tensorflow\optimizer.py", line 22, in init
super().init(*args, **kwargs)
File "C:\Users\IMORE\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\optimizers\base_optimizer.py", line 38, in init
raise ValueError(f"Argument(s) not recognized: {kwargs}")
ValueError: Argument(s) not recognized: {'lr': 0.00010000000474974513}

@badund
Copy link

badund commented Apr 27, 2024

@Vbichigatsushi I'm also hitting the same error on Mac.

@JustinShenk can you suggest any workarounds?

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