Tensorflow implementation

Can anybody help me understand what is those params and from where they came?
and also this expression
L1_num_params = 2 * 3 + 3 # W1 parameters + b1 parameters
L2_num_params = 3 * 1 + 1 # W2 parameters + b2 parameters

I’m unable to understand from where they came and what do they signify?

1 Like

It’s provided in the comment in the notebook. L1 params is the count of trainable parameters in the first layer, which has W_1 of shape (2,3) and b_1 shape (1,3). 2 is the number of inputs, 3 is the number of nodes. Similar idea for W_2 and b_2, but constrained by the shape of the previous layer (3) and the shape of the output (1).

2 Likes