Last answered:

24 Mar 2024

Posted on:

04 Apr 2023

1

ImportError: cannot import name 'deserialize_keras_object' from partially initialized module 'keras.

Hi, I have this issue with version 2.12 of TensorFlow: 

"ImportError: cannot import name 'deserialize_keras_object' from partially initialized module 'keras."
The problem occurs when I run this code:


input_size = 2
output_size = 1

model = tf.keras.Sequential([
                            tf.keras.layers.Dense(output_size)
                            ])  

model.compile(optimizer = "sdg", loss = "mean_squared_error") 

model.fit(training_data["inputs"], training_data["targets"], epochs=100, verbose=1)


How can I solve this? Thank you!


1 answers ( 0 marked as helpful)
Posted on:

24 Mar 2024

0

Same error here. Did you manage to fix the error?

Submit an answer