# Hi In The #Week 3 Assigment i Have tried my code in 2 different method Gettin wrpng in np.dot methos can someone clarify please

**URL:** <https://community.deeplearning.ai/t/hi-in-the-week-3-assigment-i-have-tried-my-code-in-2-different-method-gettin-wrpng-in-np-dot-methos-can-someone-clarify-please/647736>\
**Category:** Neural Networks and Deep Learning\
**Tags:** cnn, how-to-forum, coursera-platform\
**Created:** [June 15, 2024, 12:41pm UTC](https://community.deeplearning.ai/t/hi-in-the-week-3-assigment-i-have-tried-my-code-in-2-different-method-gettin-wrpng-in-np-dot-methos-can-someone-clarify-please/647736 "2024-06-15T12:41:49Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [June 15, 2024, 5:37pm UTC](https://community.deeplearning.ai/t/hi-in-the-week-3-assigment-i-have-tried-my-code-in-2-different-method-gettin-wrpng-in-np-dot-methos-can-someone-clarify-please/647736/10 "2024-06-15T17:37:06Z")

</div>

> [@arunKumarv1530](#):
>
> Should I do with transpose?

It requires that you understand how dot products work. The key point is that the “inner” dimensions need to agree. So with two 1 x 3 objects, you have two choices:

1 x 3 dot 3 x 1 yields a 1 x 1 or scalar output  
3 x 1 dot 1 x 3 yields a 3 x 3 output

[Here’s a thread](https://community.deeplearning.ai/t/week3-programming-assignment-4-4-compute-the-cost/18646/6) which talks about this choice and gives examples to demonstrate that those two give very different results.

One other important thing to understand is about how the notebooks work: if you type new code into a function cell and then run the test that calls that function again, it does nothing. It just ends up running the old code again. In order to get your newly entered code “activated” or compiled, you need to either click “Shift-Enter” on the changed cell before you call it again or you can restart everything by doing:

Kernel → Restart and Clear Output  
Cell → Run All

That will get everything back in sync again and WYSIWYG.

---

_[View the full topic](https://community.deeplearning.ai/t/hi-in-the-week-3-assigment-i-have-tried-my-code-in-2-different-method-gettin-wrpng-in-np-dot-methos-can-someone-clarify-please/647736)._
