# Doubt regarding the number of weights in 2 layer neural network

Considering a hypothetical scenario , where we have 10 input layers, and 5 output layers.

How many weights are there in the neural network?

If this is implemented in pytorch, the answer will be 50. But shouldn't it be 15 since 10 weights from input layer, and 5 weights from output layer? Please resolve my doubt.

Please forgive my english, not a native speaker.

Let's for example add one more layer with 3 units in the end and maybe it will be clearer. We have layers with units [10, 5, 3]. Then we will have $$W_1: 10\times5=50$$ weights between the first two layers and $$W_2: 5\times3=15$$ between the last two layers and together they will be $$W_1 + W_2 = W <=> 50 + 15 = 65$$.