C2_W1_Assignment - Question on Line of Code

On the initial version of notebook for Week 1 Assignment, there is this following line of code (13th cell code):


This line when executed displays the weights, and I actually do understand these are the bias for that layer, but I have no idea where they come from if no input data has been fit to the model prior to this line. Can someone shed some light ? Are these initial guessed values ? Which line of code produced these weights ?

Hi @AlexPorto

Welcome to the community!

The weights W are random normalize values and the gradient descent adjust these weights, the initial values create in the class dense as the constructor initialize the weights W by default ‘‘glorot_uniform’’ initial value from Uniform distribution and the bias value by default initialize with zeros

Note you can change these default way to initialize the weights



Thanks for your thorough explanation, got it now!

You are welcome!