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

Model save/load compatibility with Keras #89

Open
mkaze opened this issue Jun 1, 2021 · 3 comments
Open

Model save/load compatibility with Keras #89

mkaze opened this issue Jun 1, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mkaze
Copy link
Contributor

mkaze commented Jun 1, 2021

@zaleslaw, I was wondering if we are aiming for a two-way compatibility with Keras in terms of saving and loading of the models. In particular, should both of the following conditions satisfy?

  • Models trained and saved with Keras could be fully loaded in KotlinDL.
  • Models trained and saved with KotlinDL could be fully loaded in Keras.
@zaleslaw
Copy link
Collaborator

zaleslaw commented Jun 1, 2021

Yes, but the first priority is the loading model from Keras for Transfer Learning purposes. It's an important and popular use case.

Also, we need a good way to save the model for KotlinDL needs (currently, there are a few ways, and one of the exports to Keras-like JSON format); it's the second point here.

It's a good idea to have full export/import with Keras in both directions, hope to return to this task and open a few tickets about that.

I worry that loading to Keras will not work fully due to issues with weights export (I could not find any library for h5 writing, only for reading) and some missed things in JSON but it could be fixed in the future.

I mark this ticket as "research" and suggest to continue discussion here

@zaleslaw zaleslaw added research Research or reproducing code from science paper question Further information is requested labels Jun 1, 2021
@dosier
Copy link
Contributor

dosier commented Jun 16, 2021

I found two potentially useful projects with regards to writing h5

@zaleslaw
Copy link
Collaborator

P.S Read the Contributing Guidelines.

@zaleslaw zaleslaw added good second issue Good for advanced contributors and removed question Further information is requested labels Aug 3, 2021
@zaleslaw zaleslaw added this to the 0.3 milestone Sep 13, 2021
@zaleslaw zaleslaw modified the milestones: 0.3, 0.4 Sep 22, 2021
@zaleslaw zaleslaw self-assigned this Nov 12, 2021
@zaleslaw zaleslaw added enhancement New feature or request and removed research Research or reproducing code from science paper good second issue Good for advanced contributors labels Dec 15, 2021
@juliabeliaeva juliabeliaeva modified the milestones: 0.4, 0.5 May 16, 2022
@ermolenkodev ermolenkodev removed this from the 0.5 milestone Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants