re initialize weights keras

The solution for “re initialize weights keras” can be found here. The following code will assist you in solving the problem.

Save the initial weights right after compiling the model but before training it:

model.save_weights(‘model.h5’)
and then after training, “reset” the model by reloading the initial weights:

model.load_weights(‘model.h5’)
This gives you an apples to apples model to compare different data sets and should be quicker than recompiling the entire model.

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in