I am teaching myself data science and something peculiar has caught my eyes. In a sample DNN tutorial I was working on, I found that the Keras layer.get_weights()
f
Maybe you are asking for weights before they are created.
Weights are created when the Model is first called on inputs or
build()
is called with aninput_shape
.
For example, if you load weights from checkpoint but you don't give an input_shape
to the model, then get_weights()
will return an empty list.