tf.keras.utils.serialize_keras_object

Serialize a Keras object into a JSON-compatible representation.