soweego
soweego copied to clipboard
Switch to tensorflow.keras is blocked
According to https://keras.io/ , the:
2.3.0 release will be the last major release of multi-backend Keras. Multi-backend Keras is superseded by tf.keras.
We need to switch to tf.keras to keep the project fresh.
However, it seems we're hitting an open tensorflow issue, see efd8f62ad9ff5432ae66a514c27c5cc6fcdc7433.
As a temporary solution, I've kept the keras dependency.
In a nutshell:
-
picklecan't persisttensorflow.kerasmodels; - we're using objects that wrap keras ones.
I see 2 workarounds that entail persistence with the h5 format and require some work:
- save the model with
OUR_OBJECT.classifier.model.saveand load it back withtensorflow.keras.models.load_model, see https://www.tensorflow.org/guide/keras/save_and_serialize#whole-model_saving. The problem here is that we lose our wrapper; - (probably not worth) investigate
h5pyto persist our Python objects.