larueroad
larueroad

Reputation: 167

The initialization of model training in keras

When we build and train a model in keras, do we need to initialize the weight of the layers? It seems people don't do it when they build the Sequential() models. Also, if I do model.fit two times, what's the initial value of weight for the second time? is it the training result from the first run?

Upvotes: 1

Views: 1503

Answers (1)

Dr. Snoopy
Dr. Snoopy

Reputation: 56377

Layers are initialized when they are built, you don't need to do anything for that to happen.

If you fit two times in a row, you start from the weights trained in the first call to fit. Weights are not reinitialized in between.

Upvotes: 3

Related Questions