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

keras related issue #161

Open
iminahiljaved opened this issue May 24, 2024 · 0 comments
Open

keras related issue #161

iminahiljaved opened this issue May 24, 2024 · 0 comments

Comments

@iminahiljaved
Copy link

it was working fine, i maybe updated some dependencies or something and this issue started

2024-05-24 16:42:44.507092: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
Traceback (most recent call last):
File "d:\Desktop\codes\mobilenet_v2_140_224\try.py", line 94, in
main()
File "d:\Desktop\codes\mobilenet_v2_140_224\try.py", line 78, in main
model = load_model(model_path)
^^^^^^^^^^^^^^^^^^^^^^
File "d:\Desktop\codes\mobilenet_v2_140_224\try.py", line 49, in load_model
model = tf.keras.models.load_model(model_path, custom_objects={'KerasLayer': KerasLayerWrapper})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\saving\saving_api.py", line 183, in load_model
return legacy_h5_format.load_model_from_hdf5(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\legacy\saving\legacy_h5_format.py", line 133, in load_model_from_hdf5
model = saving_utils.model_from_config(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\legacy\saving\saving_utils.py", line 85, in model_from_config
return serialization.deserialize_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\legacy\saving\serialization.py", line 495, in deserialize_keras_object
deserialized_obj = cls.from_config(
^^^^^^^^^^^^^^^^
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\models\sequential.py", line 342, in from_config
model.add(layer)
File "C:\Users\Mobipixels10\AppData\Roaming\Python\Python311\site-packages\keras\src\models\sequential.py", line 95, in add
raise ValueError(
ValueError: Only instances of keras.Layer can be added to a Sequential model. Received: <main.load_model..KerasLayerWrapper object at 0x000001C99B2B4910> (of type <class 'main.load_model..KerasLayerWrapper'>)

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

1 participant