-
Notifications
You must be signed in to change notification settings - Fork 105
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
Find a best way to import weigths to the Keras #58
Comments
Maybe we can abstract out the serialisation part, then provide a default serialiser for the Keras weight format (this seems most fitting for KotlinDL). If we abstract the serialisation part, people can implement their own serialisers and provide it as a dependency for the niche use-cases. Maybe inspiration can be taken from KTor's features system. |
Yeah, it's a great idea to separate the serialization API (now it's built on Keras format for model saving). |
Nevermind the KTor part, it came to mind because it has a nice syntax for handling serialisation (e.g. https://ktor.io/docs/kotlin-serialization.html#register_arbitrary_converter). Though a case could be made for both, it definitely would be nice to have an option to easily define the serialiser when defining the model. I'd guess most users will only use one anyways. They don't have to mutually exclusive either, maybe the save function could have an optional parameter if you want to use a different serialiser than the one provided during model creation. |
What are your thoughts on using https://github.com/Kotlin/kotlinx.serialization for implementing a serialisation strategy for the H5 format. I could probably make a PR for this. However, one drawback from |
We have the ability to load the model configuration from Keras JSON format and pre-trained weights stored in h5 format.
But how to export the model pre-trained in KotlinDL to the Keras or pure TensorFlow?
Currently, we support the weights export to the txt files. It's a baseline solution.
We need research here to find the best way to export weights.
There are a few open questions:
Let's discuss here, in this issue the possible approaches, their advantages, and disadvantages?
P.S Read the Contributing Guidelines.
The text was updated successfully, but these errors were encountered: