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:

and then after training, “reset” the model by reloading the initial weights:

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]

inline scripts encapsulated in