Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to tensorflow.keras is blocked #386

Open
marfox opened this issue Apr 1, 2020 · 0 comments
Open

Switch to tensorflow.keras is blocked #386

marfox opened this issue Apr 1, 2020 · 0 comments
Labels
bug Something isn't working discussion Extra attention is needed

Comments

@marfox
Copy link
Member

marfox commented Apr 1, 2020

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 efd8f62.
As a temporary solution, I've kept the keras dependency.

In a nutshell:

  • pickle can't persist tensorflow.keras models;
  • we're using objects that wrap keras ones.

I see 2 workarounds that entail persistence with the h5 format and require some work:

  1. save the model with OUR_OBJECT.classifier.model.save and load it back with tensorflow.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;
  2. (probably not worth) investigate h5py to persist our Python objects.
@marfox marfox added bug Something isn't working discussion Extra attention is needed labels Apr 1, 2020
@marfox marfox changed the title Switch to tensorflow.keras is blocked Switch to tensorflow.keras is blocked Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant