# Questions of Week 3 Quiz

**URL:** <https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [October 26, 2022, 9:20pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868 "2022-10-26T21:20:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yshgooole](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yshgooole](https://community.deeplearning.ai/u/yshgooole)\
**Post date:** [October 26, 2022, 9:20pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/1 "2022-10-26T21:20:14Z")

</div>

For this quiz question, I am confused about why w is a column vector because I remembered Professor Ng said that w is a row vector in his notes. Could anyone explain this to me? Thank you!

 ![Screenshot_20221026_051429](https://global.discourse-cdn.com/dlai/original/3X/3/7/377551df47428e77d60b29e24937d615e6ef2c38.png)  
 ![WeChat Image_20221026171954](https://global.discourse-cdn.com/dlai/original/3X/6/2/62c57a91fa04e84fda11ea1ec138e8b079fd7cbf.jpeg)

---

<div class="post-metadata">

**Author:** ![Phuc\_Kien\_Bui](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phuc_kien_bui/32/58741_2.png) [@Phuc\_Kien\_Bui](https://community.deeplearning.ai/u/Phuc_Kien_Bui)\
**Post date:** [October 26, 2022, 10:53pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/2 "2022-10-26T22:53:14Z")

</div>

Hello @yshgooole ,  
You can get back to the 3rd video of the week to see neural network representation.

 ![Screenshot from 2022-10-27 05-42-37](https://global.discourse-cdn.com/dlai/original/3X/6/e/6ead548c48fe1329fa389ede6485ad4dd60c5bf2.jpeg)

---

<div class="post-metadata">

**Author:** ![yshgooole](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yshgooole](https://community.deeplearning.ai/u/yshgooole)\
**Post date:** [October 26, 2022, 11:20pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/3 "2022-10-26T23:20:09Z")

</div>

Hello @Phuc_Kien_Bui ,  
thank you so much for replying to my question, I now see the representation of the vector w, and I understand that if w is a column vector, w.T must be a row vector, but are there any particular reasons why w has to be a column vector? Or is it just a convention to remember?

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [October 26, 2022, 11:48pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/4 "2022-10-26T23:48:31Z")

</div>

It is just a convention that Prof Ng has chosen to use in these courses: when he defines standalone vectors, he prefers to format them as column vectors. Likewise with the input sample vectors, which is why you then need to transpose w in order for the dot product w^T \cdot x to work.

---

<div class="post-metadata">

**Author:** ![yshgooole](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yshgooole](https://community.deeplearning.ai/u/yshgooole)\
**Post date:** [October 27, 2022, 12:53am UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/5 "2022-10-27T00:53:20Z")

</div>

Hello, @paulinpaloalto,  
Thanks for answering my question, and I fully understand this now.

---

<div class="post-metadata">

**Author:** ![Phuc\_Kien\_Bui](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phuc_kien_bui/32/58741_2.png) [@Phuc\_Kien\_Bui](https://community.deeplearning.ai/u/Phuc_Kien_Bui)\
**Post date:** [October 27, 2022, 1:03am UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/6 "2022-10-27T01:03:29Z")

</div>

It is really a good question. One reason is convention as @paulinpaloalto mention. Another has something to do with math. In case we have a small NN as above, you can assign parameters to W and write down all the calculation with and without vectorization to make sense about it.

---

<div class="post-metadata">

**Author:** ![yshgooole](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yshgooole](https://community.deeplearning.ai/u/yshgooole)\
**Post date:** [October 27, 2022, 11:51pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/7 "2022-10-27T23:51:34Z")

</div>

![WeChat Image_20221027194643](https://global.discourse-cdn.com/dlai/original/3X/7/6/76038a0c9c0819a8ce8077f784a2d7d950438e01.jpeg)  
Hello, @Phuc_Kien_Bui,  
I am watching the third lecture on week 4, and I start to feel confused again, why there is no transpose sign on w? Or is the transpose sign hidden?

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [October 27, 2022, 11:57pm UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/8 "2022-10-27T23:57:36Z")

</div>

Once we get to real neural networks, the W is a matrix, not a vector. Prof Ng explained all this in Week 3. He takes the individual weight vectors, transposes them, and then stacks them as the rows of W so that the matrix multiply works without doing a transpose of the full matrix. The rows are already the transposed w vectors, which give the unique weights for each neuron in the layer.

It is in [this Week 3 lecture](https://www.coursera.org/learn/neural-networks-deep-learning/lecture/tyAGh/computing-a-neural-networks-output) starting at time offset about 4:00. If you missed that point the first time through, perhaps it’s worth watching again. There also was no transpose in forward propagation in the Planar Data exercise (the Week 3 assignment), right? The only difference here in Week 4 is that we’ve gone to full generality with any number of hidden layers, but what happens at an individual layer is the same as it was in Week 3.

---

<div class="post-metadata">

**Author:** ![yshgooole](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yshgooole](https://community.deeplearning.ai/u/yshgooole)\
**Post date:** [October 28, 2022, 12:04am UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/9 "2022-10-28T00:04:27Z")

</div>

Thank you so much, @paulinpaloalto , it seems that I need to rewatch the video of week 3 again.

---

<div class="post-metadata">

**Author:** ![Phuc\_Kien\_Bui](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phuc_kien_bui/32/58741_2.png) [@Phuc\_Kien\_Bui](https://community.deeplearning.ai/u/Phuc_Kien_Bui)\
**Post date:** [October 28, 2022, 3:01am UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/10 "2022-10-28T03:01:08Z")

</div>

It is a good explanation! Thank you!

---

<div class="post-metadata">

**Author:** ![Phuc\_Kien\_Bui](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phuc_kien_bui/32/58741_2.png) [@Phuc\_Kien\_Bui](https://community.deeplearning.ai/u/Phuc_Kien_Bui)\
**Post date:** [October 28, 2022, 3:03am UTC](https://community.deeplearning.ai/t/questions-of-week-3-quiz/222868/11 "2022-10-28T03:03:27Z")

</div>

I also had a hard time to get through it. Be patient!
