Number of weights in layer 2

why does weights = 15 ?!
in the layer 2 we have 25feature so I think we should have 25 weight for each feature in every neurons

Remember, in Python, indexing starts from zero. So, layers[2] means layer 3. I do not have access to this notebook but that might be the case.

The second layer’s output units (which are 15) become the input for the third layer, and thus there are a total of 15 weights.

1 Like

Layer1 has 25 features, layer2 has 15. Input layer is sometimes referred to as layer 0, but is usually just called input layer.

1 Like