Regarding the use and relearning of weights in fit() in Keras-rl

Asked 2 years ago, Updated 2 years ago, 51 views

I am learning DQN using Keras-rl.
1,000 steps When a file with the weight you learned and saved in save_weights(fname) exists,

load_weights(fname)
    fit(xxx,nb_steps=3000)
    save_weights (fname, overwrite = True)

If you do this, does learning begin with a continuation of 1,000 steps and you have learned a total of 4,000 steps?
Also, is the weight saved the result of 3,000 steps learning? 4,000 steps Do you want to learn?

Learning steps When you feel that you don't have enough, you want to use the weight file that you have now and continue learning.
If anyone knows, please let me know.

python tensorflow keras

2022-09-30 17:35

1 Answers

Read this , and save_weights()/load_weights() is written as saving/loading only the weight of the model.save()You can use model.save(filepath) to store Keras' model in a single HDF5 file. This HDF5 file contains:

Structure of reconstructible models
model weight
Learning Settings (loss, optimizer)
Optimizer state. This allows you to accurately resume learning from the point of completion.


2022-09-30 17:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.