Kotlin / kotlindl

High-level Deep Learning Framework written in Kotlin and inspired by Keras
Apache License 2.0
1.47k stars 103 forks source link

Create API for Saving and Loading Model Snapshot #72

Open e5l opened 3 years ago

e5l commented 3 years ago

I want to try out different training mechanisms using save-restore-replay. Could you tell me if it's possible to make API to support such use-cases?

zaleslaw commented 3 years ago

Today you have a few approaches to save the model and continue work with that

  1. Save the model as TF graph and weights in txt format (example). The model could be used for inference only after loading as InferenceModel.
  2. Save the model as JSON config and weights in txt format (example). The model could be fine-tuned, training could be continued. This approach works well in both cases: you trained your model in Keras or KotlinDL firstly. The checkpointing could be organized via a sequence of model saving in this format.

Agree, that we need probably the special checkpointing API.