Gradient Descent for Neural Networks - Shallow Neural Networks | Coursera

The shapes of the weights and biases were explained in the lectures earlier than the one about Gradient Descent where Prof Ng explains how forward propagation works. Here’s a thread which talks about this point in more detail.