serialize#

bayesflow.utils.serialization.serialize(obj)[source]#

Serialize an object using Keras.

Wrapper function around keras.saving.serialize_keras_object, which adds the ability to serialize classes.

Parameters:
objectKeras serializable object, or class

The object to serialize

Returns:
configdict

A python dict that represents the object. The python dict can be deserialized via deserialize().

See also

deserialize