# Why does this model have 12 parameters?

I guess the model shown in this image (img_1)

is the same as the one in this image (img_2)

I was trying to build a neural net like that.

This keras code is to do the job.

model = Sequential()
plot_model(model, to_file='model_plot.png', show_shapes=True, show_layer_names=True)


However, print(model.summary()) outputs

Model: "sequential_17"
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
dense_31 (Dense)             (None, 3)                 12
_________________________________________________________________
dense_32 (Dense)             (None, 1)                 4
=================================================================


There are 3 ws and 1 b in the hidden layer. Why does this model have 12 parameters?