Keras - how to set weights to a single layer
Keras expects the layer weights to be a list of length 2. First element is the kernel weights and the second is the bias.
You can always call get_weights() on the layer to see shape of weights of that layer. set_weights() would expect exactly the same.
I'm trying to set the weights of a hidden layer. 
I'm assuming layers[0] is the inputs, and I want to set the weights of the first hidden layer so set the index to 1.
model.layers[1].set_weights(weights)
However, when I try this I get an error:
ValueError: You called `set_weights(weights)` on layer "dense_64" with a  weight list of length 100, but the layer was expecting 2 weights. Provided weights: [ 1.0544554   1.27627635  1.05261064  1.10864937  ...
The hidden layer has 100 nodes.
As it is telling me that it expects two weights, is one the weight and one the bias?