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
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'>)
The text was updated successfully, but these errors were encountered:
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'>)The text was updated successfully, but these errors were encountered: