question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Save the trainability status of layers in JSON

See original GitHub issue

Am I correct in saying that currently when the configuration of the model is saved as JSON, the trainable config parameter is always saved as true even if the layer is actually frozen (i.e. layer.isTrainable == false)? If so, shouldn’t it be fixed?

On a related note, similar to Keras, isn’t it better to do some refactoring and introduce a new method like getConfig for the base Layer (and possibly overridden by subclassed layers to add additional layer-specific configs) which then could be used for obtaining config of a layer (instead of creating isolated functions in ModelSaver.kt)?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zaleslawcommented, Jun 15, 2021

@dosier Feel free to take this ticket. This project is not mature enough, and some important parts like guidelines on contributing are missed, so I’ll add them in the nearest future; thanks for the advice.

I assigned this ticket for you

Regarding the ticket: I suggest saving trainable status for all layers when we serialize the model.

0reactions
zaleslawcommented, Jun 21, 2021

Great job @dosier congrats you with the first contribution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Save the trainability status of layers in JSON #107 - GitHub
Hi, can I do this? If so, should for each type of Layer it's corresponding LayerConfig set the trainable parameter? Or can it...
Read more >
Serialization and saving - Keras
Saving the architecture / configuration only, typically as a JSON file. ... print("\nChanging trainable status of one of the nested layers.
Read more >
How to Save and Load Your Keras Deep Learning Model
In this post, you will look at three examples of saving and loading your model to a file: Save Model to JSON; Save...
Read more >
Saving and Loading Keras model using JSON and YAML files
Sharing the saved files will allow others to recreate the model to make inferences or to resume further training from you left off....
Read more >
Keep the order of the JSON keys during JSON conversion to ...
I had the same problem with maintaining the order from DB layer to UI Layer. Open JSONObject.java file. It internally uses HashMap which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found