# Tutorials form deep learning course

**URL:** <https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [September 7, 2022, 8:06pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558 "2022-09-07T20:06:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_Meier](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/eduardo_meier/32/25702_2.png) [@Eduardo\_Meier](https://community.deeplearning.ai/u/Eduardo_Meier)\
**Post date:** [September 7, 2022, 8:06pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/1 "2022-09-07T20:06:09Z")

</div>

Hi.  
Sorry for being lazy… Are there tutorials for programming assigments as there were in the machine learnig course?  
Is there any further explanation of tasks?  
thank you!!

---

<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:** [September 7, 2022, 9:16pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/2 "2022-09-07T21:16:11Z")

</div>

No, there are no separate tutorials, although the very first assignment in Course 1 Week 2 is structured as a tutorial on numpy.

I think you’ll find that the instructions in the assignments are quite complete and detailed. They also give you “templates” for most of the code, e.g. the function definitions and the basic structures of the code. You just have to fill in the key portions of the algorithms. Give it a try and let us know how it goes.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Meier](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/eduardo_meier/32/25702_2.png) [@Eduardo\_Meier](https://community.deeplearning.ai/u/Eduardo_Meier)\
**Post date:** [September 7, 2022, 9:55pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/3 "2022-09-07T21:55:27Z")

</div>

Thanks Paulin.  
The point is that I get an assertion error on exercise 1 (the cats one) and I don’t know how to solve this kind of problems.  
I’ll try to paste what ist mentioned:  
"AssertionError Traceback (most recent call last)  
 in   
6  
7 assert type(grads[“dw”]) == np.ndarray  
----\> 8 assert grads[“dw”].shape == (2, 1)  
9 assert type(grads[“db”]) == np.float64  
10

AssertionError:  
"  
Sorry for abusing but any help will be apreciatted.  
Thanks.

---

<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:** [September 7, 2022, 10:01pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/4 "2022-09-07T22:01:05Z")

</div>

Well, debugging is part of the job of being a programmer, right? I’ve been writing code since I was 14 years old and I’m over 70 by now and I can still count on the fingers of one hand the times I’ve written a piece of code longer than one or two lines and had it work the first time. 🤓

You start with the error and then you work backwards: that error is telling you that your dw value is the wrong shape. It’s supposed to be (2, 1). So the first question is “what shape is it?” You can find that out by adding a print statement after you compute dw:

`print(f"dw.shape = {dw.shape}")`

Ok, now the next question is “how did it get that way?” Knowing the wrong shape you got would be a clue. But maybe the first step is to go back and look at the math formula for dw and compare that to your code. You must have misinterpreted something about what the formula says.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Meier](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/eduardo_meier/32/25702_2.png) [@Eduardo\_Meier](https://community.deeplearning.ai/u/Eduardo_Meier)\
**Post date:** [September 7, 2022, 10:05pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/5 "2022-09-07T22:05:03Z")

</div>

Thanks 😃  
The age is not important is what you do with your time. Here there is an examle lol.  
I am going to try that things. Thank you very much.

---

<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:** [September 7, 2022, 10:17pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/6 "2022-09-07T22:17:26Z")

</div>

Here’s the formula for dw:

dw = \displaystyle \frac {1}{m} X \cdot (A - Y)^T

Notice that the operation between X and (A - Y)^T there is a dot product, not an elementwise multiply. Note also that I made a little “enhancement” there to the notation that Prof Ng uses in order to make that more clear. If you used \* or np.multiply there, you would have gotten an error, so that’s probably not the problem.

[Here’s a thread](https://community.deeplearning.ai/t/week-2-how-to-decide-to-use-or-np-dot-when-calculating-formula/17467) about how to tell when to use dot product versus elementwise multiply. That thread is also linked from the [DLS FAQ Thread](https://community.deeplearning.ai/t/faq-frequently-asked-questions-for-all-dls-courses/74), which is a worth a look if you haven’t seen it yet.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Meier](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/eduardo_meier/32/25702_2.png) [@Eduardo\_Meier](https://community.deeplearning.ai/u/Eduardo_Meier)\
**Post date:** [September 13, 2022, 4:17pm UTC](https://community.deeplearning.ai/t/tutorials-form-deep-learning-course/200558/7 "2022-09-13T16:17:18Z")

</div>

Thank you Paulin, sorry for the late response.
