Save, load and save again
See original GitHub issueHi,
Thanks for this useful library!
I wonder how to do save - load - save - load
multiple times?
To achieve this, I use the code below:
if os.path.exists(log_path):
load_logs(optimizer, logs=[log_path])
print('Load {} records from disk.'.format(len(optimizer.space)))
logger = JSONLogger(path=log_path)
optimizer.subscribe(Events.OPTMIZATION_STEP, logger)
But it seems that this line
logger = JSONLogger(path=log_path)
will delete the orginal json file and previous records are lost.
Why do we need to do os.remove(self._path)
in JSONLogger.__init__()
?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to Save and Load Your Keras Deep Learning Model
In this post, you will discover how to save your Keras models to files and load them up again to make predictions.
Read more >Save and load Keras models | TensorFlow Core
APIs for saving weights to disk & loading them back. Weights can be saved to disk by calling model.save_weights in the following formats:....
Read more >A quick complete tutorial to save and restore Tensorflow models
Update: This popular article shows how to save and restore models in Tensorflow 1.x. ... Otherwise, please follow this tutorial and come back...
Read more >Save and load models in Tensorflow - GeeksforGeeks
Ways we can save and load our machine learning model are as follows: ... dataset and finally save and load the model again...
Read more >Save and Load a Model with TensorFlow's Keras API
This method of saving will save everything about the model – the architecture, the weights, the optimizer, the state of the optimizer, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, While it’s not save you can just add the following lines in your code:
For those who are wondering, the
reset
option from @AlbertAlonso isn’t available in v1.2.0 yet, so it doesn’t come with the installation from pip. In the meanwhile, thanks for this workaround!