What is keras_layer
in your code?
You can set weights these ways:
model.layers[i].set_weights(listOfNumpyArrays)
model.get_layer(layerName).set_weights(...)
model.set_weights(listOfNumpyArrays)
Where model
is an instance of an existing model.
You can see the expected length of the list and its array shapes using the method get_weights()
from the same instances above.