So when you create a layer like this, initially, it has no weights:



It creates its weights the first time it is called on an input, since the shape of the weights depends on the shape of the inputs:


Naturally, this also applies to Sequential models