(C2_W1) Whats's the code to get weights?

Hello all, everything is going well in the assignment but I didn’t really understand where did these weights come from.


I looked for the code prior to the one shown in image and didn’t find any code implementing calculations on matrix X, could you please tell me how we got these weights.
Thank you all.

Hi @Fadi_Abed,
In this assignment, TensorFlow was used. So, everything is taken care of by the framework. The model was initiated using Sequential (tf.keras.models.Sequential) and dense (tf.keras.layers.Dense).
Check the code in the notebook. The weights are randomly initiated using TensorFlow, you do not have to bother about it on the assignment. These are the weights you see when you execute the code you shared in your question.

1 Like