# Deep Learning Specialization

**URL:** https://community.deeplearning.ai/c/course-q-a/deep-learning-specialization/6.md

[Latest](https://community.deeplearning.ai/latest.md) · [Categories](https://community.deeplearning.ai/categories.md) · [Tags](https://community.deeplearning.ai/tags.md)

---

## [About the Deep Learning Specialization Refresh category](https://community.deeplearning.ai/t/about-the-deep-learning-specialization-refresh-category/45)

<div class="topic-metadata">

**Author:** [@deeplearning](https://community.deeplearning.ai/u/deeplearning)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 2:19am UTC](https://community.deeplearning.ai/t/about-the-deep-learning-specialization-refresh-category/45 "2021-03-25T02:19:08Z")

</div>

To ensure a smooth and productive experience for everyone, here are a few important guidelines regarding posting in our forum: Category Permissions: Please note that learners are not allowed to post in all categorie…

---

## [Derivation of DL/dz](https://community.deeplearning.ai/t/derivation-of-dl-dz/165)

<div class="topic-metadata">

**Author:** [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Replies:** 19\
**Last updated:** [September 24, 2022, 8:23pm UTC](https://community.deeplearning.ai/t/derivation-of-dl-dz/165 "2022-09-24T20:23:41Z")

</div>

Originally written by: Edward Shyu :raised\_hands: This is optional material that you can read after the week 2 video “Gradient descent on m examples.” You don’t need to know calculus in order to complete this course (or…

---

## [Pedagogy of C5 W4 A1 Transformer (Ex4: Encoder Layer)](https://community.deeplearning.ai/t/pedagogy-of-c5-w4-a1-transformer-ex4-encoder-layer/3892)

<div class="topic-metadata">

**Author:** [@marcus-waldman](https://community.deeplearning.ai/u/marcus-waldman)\
**Replies:** 43\
**Last updated:** [October 2, 2024, 3:04am UTC](https://community.deeplearning.ai/t/pedagogy-of-c5-w4-a1-transformer-ex4-encoder-layer/3892 "2024-10-02T03:04:46Z")

</div>

Hi, I just want to start this by saying how impressed I am with the pedagogy overall throughout all four classes. Concepts really build one on top of the other and all challenges–and make no mistake challenges are necess…

---

## [C5W4: Transformer Architectures with TensorFlow](https://community.deeplearning.ai/t/c5w4-transformer-architectures-with-tensorflow/13545)

<div class="topic-metadata">

**Author:** [@falonso](https://community.deeplearning.ai/u/falonso)\
**Replies:** 42\
**Last updated:** [January 6, 2026, 12:03am UTC](https://community.deeplearning.ai/t/c5w4-transformer-architectures-with-tensorflow/13545 "2026-01-06T00:03:56Z")

</div>

The last assignment of course 5 week 4 was really a disaster. Nothing is understood, it is not well explained. It is much more difficult than the previous tasks. I ended up copying from the trasnformers tutorial from the…

---

## [DLS 2 week 3 exercise 6 compute\_cost](https://community.deeplearning.ai/t/dls-2-week-3-exercise-6-compute-cost/22968)

<div class="topic-metadata">

**Author:** [@sandra\_jayan](https://community.deeplearning.ai/u/sandra_jayan)\
**Replies:** 46\
**Last updated:** [December 21, 2025, 9:53pm UTC](https://community.deeplearning.ai/t/dls-2-week-3-exercise-6-compute-cost/22968 "2025-12-21T21:53:11Z")

</div>

In the compute cost function I used cost = tf.reduce\_mean(tf.keras.losses.categorical\_crossentropy(labels, logits)) but i am getting error. Can someone help me to find where I made a mistake.

---

## [DLS Course 4: When Saving: "Permission denied: W4A1/Face\_Recognition.ipynb"](https://community.deeplearning.ai/t/dls-course-4-when-saving-permission-denied-w4a1-face-recognition-ipynb/299328)

<div class="topic-metadata">

**Author:** [@Stephen\_Ermshar](https://community.deeplearning.ai/u/Stephen_Ermshar)\
**Replies:** 96\
**Last updated:** [April 4, 2023, 3:45pm UTC](https://community.deeplearning.ai/t/dls-course-4-when-saving-permission-denied-w4a1-face-recognition-ipynb/299328 "2023-04-04T15:45:39Z")

</div>

I’m getting this error “Permission denied: W4A1/Face\_Recognition.ipynb” in the header/menubar area of the Face Verification Programming Assignment notebook when it attempts to autosave, or when I attempt to save it. I c…

---

## [Week 2 Exercise 5 propagate function](https://community.deeplearning.ai/t/week-2-exercise-5-propagate-function/22948)

<div class="topic-metadata">

**Author:** [@viniciusdepadua](https://community.deeplearning.ai/u/viniciusdepadua)\
**Replies:** 59\
**Last updated:** [January 9, 2023, 2:58am UTC](https://community.deeplearning.ai/t/week-2-exercise-5-propagate-function/22948 "2023-01-09T02:58:36Z")

</div>

Hi! i can’t find my error. Basically all my values are wrong, but I think my code is correct, please help me {moderator edit - solution code removed} dw = \[\[-0.00154399\] \[-0.00492761\]\] db = 0.0014555781367842193 co…

---

## [Week 4 Assignment 2 Exercise 6 Issue](https://community.deeplearning.ai/t/week-4-assignment-2-exercise-6-issue/18603)

<div class="topic-metadata">

**Author:** [@gmongaras](https://community.deeplearning.ai/u/gmongaras)\
**Replies:** 23\
**Last updated:** [August 23, 2026, 2:43pm UTC](https://community.deeplearning.ai/t/week-4-assignment-2-exercise-6-issue/18603 "2026-08-23T14:43:32Z")

</div>

I’m currently working on Week 4’s Assignment #2. I am having an issue with exercise #6, the train\_step function. I am receiving an error stating that the value of J is a really negative number. I suspect I may have an is…

---

## [Disappearance of Submit button](https://community.deeplearning.ai/t/disappearance-of-submit-button/300077)

<div class="topic-metadata">

**Author:** [@sunnycss](https://community.deeplearning.ai/u/sunnycss)\
**Replies:** 28\
**Last updated:** [May 29, 2023, 11:29pm UTC](https://community.deeplearning.ai/t/disappearance-of-submit-button/300077 "2023-05-29T23:29:40Z")

</div>

The notebook has a frequent error : “Permission denied: release/W3A1/Planar\_data\_classification\_with\_one\_hidden\_layer.ipynb”. At the end, the notebook cannot be submitted at all. I can’t save to other names or download a…

---

## [Symmetry Breaking versus Zero Initialization](https://community.deeplearning.ai/t/symmetry-breaking-versus-zero-initialization/16061)

<div class="topic-metadata">

**Author:** [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Replies:** 5\
**Last updated:** [August 10, 2021, 3:54am UTC](https://community.deeplearning.ai/t/symmetry-breaking-versus-zero-initialization/16061 "2021-08-10T03:54:39Z")

</div>

When we implemented Logistic Regression in Week 2 of Course 1, Prof Ng tells us that it suffices to use zero initialization for the w and b values that will be learned through Gradient Descent and we will still get a val…

---

## [Week 1 Assignment 1 Backpropagation](https://community.deeplearning.ai/t/week-1-assignment-1-backpropagation/15940)

<div class="topic-metadata">

**Author:** [@reddyroh](https://community.deeplearning.ai/u/reddyroh)\
**Replies:** 19\
**Last updated:** [July 20, 2024, 3:11pm UTC](https://community.deeplearning.ai/t/week-1-assignment-1-backpropagation/15940 "2024-07-20T15:11:11Z")

</div>

Why do we need to add da\_prevt to the upstream gradient, i.e. da\_next = da\[:,:,t\] + da\_prevt not just da\[:,:,t\]? I don’t understand the math here. This is for rnn\_backward function. Why is da\_prevt being added to the ups…

---

## [Cannot compute\_cost course 2 week 3](https://community.deeplearning.ai/t/cannot-compute-cost-course-2-week-3/3117)

<div class="topic-metadata">

**Author:** [@ahsan](https://community.deeplearning.ai/u/ahsan)\
**Replies:** 90\
**Last updated:** [January 7, 2023, 4:41pm UTC](https://community.deeplearning.ai/t/cannot-compute-cost-course-2-week-3/3117 "2023-01-07T16:41:10Z")

</div>

I dont exactly undertstand what Y\_pred and Y\_true are in the tf.keras.losses.binary\_crossentropy parameters. I tried initializing them randomly but could not get the right answer

---

## [Data Augmentation to Address Foggy Images Quiz 2 Question 10](https://community.deeplearning.ai/t/data-augmentation-to-address-foggy-images-quiz-2-question-10/18456)

<div class="topic-metadata">

**Author:** [@mualloc](https://community.deeplearning.ai/u/mualloc)\
**Replies:** 9\
**Last updated:** [November 18, 2022, 7:21pm UTC](https://community.deeplearning.ai/t/data-augmentation-to-address-foggy-images-quiz-2-question-10/18456 "2022-11-18T19:21:24Z")

</div>

Hi, NG mentioned that there is a potential risk while artificially data synthesizing such as NN may overfit to a some specific subset of synthesized data. He exemplified that fact by giving the example of synthesized c…

---

## [Questions about YOLO](https://community.deeplearning.ai/t/questions-about-yolo/7208)

<div class="topic-metadata">

**Author:** [@Dyxuki](https://community.deeplearning.ai/u/Dyxuki)\
**Replies:** 13\
**Last updated:** [January 23, 2025, 7:50am UTC](https://community.deeplearning.ai/t/questions-about-yolo/7208 "2025-01-23T07:50:42Z")

</div>

Hello, so i’m going through C4W3 courses (object detection with CNN), and I still cannot get a good enough intruition on why algos such as YOLO works. If I understand correctly, we do not use formal sliding windows bec…

---

## [W4\_Quiz\_3D Convolution](https://community.deeplearning.ai/t/w4-quiz-3d-convolution/6137)

<div class="topic-metadata">

**Author:** [@pugach](https://community.deeplearning.ai/u/pugach)\
**Replies:** 6\
**Last updated:** [August 7, 2022, 3:31am UTC](https://community.deeplearning.ai/t/w4-quiz-3d-convolution/6137 "2022-08-07T03:31:01Z")

</div>

I disagree with the answer to the last question of the week 4 quiz. May I ask teaching staff to double check it? According to the lecture, the number of channels in the input and the kernel should match. Here we have an…

---

## [W2\_A2\_Ex-8\_Value Error for w](https://community.deeplearning.ai/t/w2-a2-ex-8-value-error-for-w/20579)

<div class="topic-metadata">

**Author:** [@Mohit18](https://community.deeplearning.ai/u/Mohit18)\
**Replies:** 140\
**Last updated:** [May 31, 2023, 7:02pm UTC](https://community.deeplearning.ai/t/w2-a2-ex-8-value-error-for-w/20579 "2023-05-31T19:02:21Z")

</div>

I have passed all my tests except Exercise 8, it is showing a valueError for w, mentioning that “cannot reshape array of size 12 into shape (4,1)”, which refers to my predict function. I am not able to fix this issue, pl…

---

## [Course 2, Week 3, one\_hot\_matrix clarification](https://community.deeplearning.ai/t/course-2-week-3-one-hot-matrix-clarification/24422)

<div class="topic-metadata">

**Author:** [@TheLonelyChemE](https://community.deeplearning.ai/u/TheLonelyChemE)\
**Replies:** 6\
**Last updated:** [May 7, 2024, 1:13am UTC](https://community.deeplearning.ai/t/course-2-week-3-one-hot-matrix-clarification/24422 "2024-05-07T01:13:20Z")

</div>

If I reshape the one\_hot matrix to (depth, ), the tests pass. However, if I reshape the one\_hot matrix to (depth, 1), the tests fail. Why is this? I thought we would need to use (depth, 1) to make sure we get a single-co…

---

## [W1 A2 | Ex-2 Sample Function](https://community.deeplearning.ai/t/w1-a2-ex-2-sample-function/39506)

<div class="topic-metadata">

**Author:** [@aquilaxc](https://community.deeplearning.ai/u/aquilaxc)\
**Replies:** 5\
**Last updated:** [July 16, 2023, 7:47am UTC](https://community.deeplearning.ai/t/w1-a2-ex-2-sample-function/39506 "2023-07-16T07:47:56Z")

</div>

Hi, I notice that in the hint of Step 3: Also notice that 𝑦̂ ⟨𝑡+1⟩y^⟨t+1⟩, which is y in the code, is a 2D array. I cannot figure out why is ‘y’ a 2D array? Shouldn’t it be a 1D probability vector over the vocabulary? …

---

## [W 4 A1 | Ex- 5 | Wrong shape and output](https://community.deeplearning.ai/t/w-4-a1-ex-5-wrong-shape-and-output/3096)

<div class="topic-metadata">

**Author:** [@parrotox](https://community.deeplearning.ai/u/parrotox)\
**Replies:** 81\
**Last updated:** [March 17, 2023, 3:17pm UTC](https://community.deeplearning.ai/t/w-4-a1-ex-5-wrong-shape-and-output/3096 "2023-03-17T15:17:21Z")

</div>

I’ve been struggling with this for hours and can’t figure out what I’m doing wrong. I’m not really sure what I’m supposed to be doing in the first place, so I don’t even know where to start. Here’s my output: AL is …

---

## [Week 1 - Assignment 3](https://community.deeplearning.ai/t/week-1-assignment-3/2377)

<div class="topic-metadata">

**Author:** [@amirhossein\_berenji](https://community.deeplearning.ai/u/amirhossein_berenji)\
**Replies:** 40\
**Last updated:** [September 8, 2023, 5:09pm UTC](https://community.deeplearning.ai/t/week-1-assignment-3/2377 "2023-09-08T17:09:38Z")

</div>

Hi everyone I am not able to get the music\_inference\_model(LSTM\_cell, densor, Ty=100) work as it is supposed to. I had worked on it for a couple of hours, but I could not find a way around it that everything goes safe a…

---

## [W1 A3 | Ex-1 | djmodel- AttributeError: layer “lstm” has multiple inbound nodes](https://community.deeplearning.ai/t/w1-a3-ex-1-djmodel-attributeerror-layer-lstm-has-multiple-inbound-nodes/7763)

<div class="topic-metadata">

**Author:** [@garrofederico](https://community.deeplearning.ai/u/garrofederico)\
**Replies:** 39\
**Last updated:** [September 29, 2022, 6:08pm UTC](https://community.deeplearning.ai/t/w1-a3-ex-1-djmodel-attributeerror-layer-lstm-has-multiple-inbound-nodes/7763 "2022-09-29T18:08:36Z")

</div>

I’m having the following error in Ex 1, djmodel funcition: “AttributeError: The layer “lstm” has multiple inbound nodes, with different output shapes. Hence the notion of “output shape” is ill-defined for the layer. Use…

---

## [Course 4 week 2 project 2](https://community.deeplearning.ai/t/course-4-week-2-project-2/9787)

<div class="topic-metadata">

**Author:** [@dbiber](https://community.deeplearning.ai/u/dbiber)\
**Replies:** 30\
**Last updated:** [August 16, 2022, 6:29pm UTC](https://community.deeplearning.ai/t/course-4-week-2-project-2/9787 "2022-08-16T18:29:12Z")

</div>

I have everything good except for a couple of the None values from the second model. Here is what i have {moderator edit - solution code removed} Can anyone give me a nudge in the right direction on these couple None v…

---

## [W4\_Ex-4\_Tests failing](https://community.deeplearning.ai/t/w4-ex-4-tests-failing/11880)

<div class="topic-metadata">

**Author:** [@tfu](https://community.deeplearning.ai/u/tfu)\
**Replies:** 29\
**Last updated:** [August 6, 2025, 11:42am UTC](https://community.deeplearning.ai/t/w4-ex-4-tests-failing/11880 "2025-08-06T11:42:22Z")

</div>

Hi, so I wrote the functions for exercise 4 and it seems to not work for some reason… Would it be possible to help me out? Thanks! image|690x437

---

## [Week 1 Assignment 1 conv\_forward (a small pitfall)](https://community.deeplearning.ai/t/week-1-assignment-1-conv-forward-a-small-pitfall/19839)

<div class="topic-metadata">

**Author:** [@corey.s](https://community.deeplearning.ai/u/corey.s)\
**Replies:** 17\
**Last updated:** [June 18, 2023, 4:41am UTC](https://community.deeplearning.ai/t/week-1-assignment-1-conv-forward-a-small-pitfall/19839 "2023-06-18T04:41:15Z")

</div>

Hello, I was looking at this one for a while before I finally had the clarity to believe I was wrong. Funny how that works out, haha! Some people may be familiar with the following… # for ITER in range(start, stop, st…

---

## [Cannot save or submit Coursera labs](https://community.deeplearning.ai/t/cannot-save-or-submit-coursera-labs/299880)

<div class="topic-metadata">

**Author:** [@Ishan\_Dane](https://community.deeplearning.ai/u/Ishan_Dane)\
**Replies:** 26\
**Last updated:** [April 7, 2023, 3:50pm UTC](https://community.deeplearning.ai/t/cannot-save-or-submit-coursera-labs/299880 "2023-04-07T15:50:06Z")

</div>

Hi, I cannot seem to save my progress on any of my coursera labs and I cannot submit my labs either. Whenever I try to, I get a permission denied error. I am not sure what to do, I have tried everything from restarting …

---

## [Permission denied](https://community.deeplearning.ai/t/permission-denied/300389)

<div class="topic-metadata">

**Author:** [@jptian2518](https://community.deeplearning.ai/u/jptian2518)\
**Replies:** 24\
**Last updated:** [April 6, 2023, 3:41am UTC](https://community.deeplearning.ai/t/permission-denied/300389 "2023-04-06T03:41:38Z")

</div>

Continuing the discussion from DLS Course 4: When Saving: "Permission denied: W4A1/Face\_Recognition.ipynb": Continuing the discussion from \[DLS Course 4: When Saving: Permission denied: W4A1/Face\_Recognition.ipynb"\], (D…

---

## [C4 W2 A2:Module 'tensorflow.keras.layers' has no attribute 'RandomFlip'](https://community.deeplearning.ai/t/c4-w2-a2-module-tensorflow-keras-layers-has-no-attribute-randomflip/46830)

<div class="topic-metadata">

**Author:** [@SairajNeelam](https://community.deeplearning.ai/u/SairajNeelam)\
**Replies:** 26\
**Last updated:** [December 21, 2022, 7:05am UTC](https://community.deeplearning.ai/t/c4-w2-a2-module-tensorflow-keras-layers-has-no-attribute-randomflip/46830 "2022-12-21T07:05:22Z")

</div>

This is how I have written the code. def data\_augmenter(): ‘’’ Create a Sequential model composed of 2 layers Returns: tf.keras.Sequential ‘’’ ### START CODE HERE data\_augmentation = tf.keras.Sequential(\[ tf.ker…

---

## [Tips for troubles with Sequential and Functional API syntax](https://community.deeplearning.ai/t/tips-for-troubles-with-sequential-and-functional-api-syntax/52202)

<div class="topic-metadata">

**Author:** [@ai\_curious](https://community.deeplearning.ai/u/ai_curious)\
**Replies:** 12\
**Last updated:** [October 15, 2024, 7:57pm UTC](https://community.deeplearning.ai/t/tips-for-troubles-with-sequential-and-functional-api-syntax/52202 "2024-10-15T19:57:23Z")

</div>

Plenty of people have trouble with the syntax of Keras model creation. What’s up with the square brackets? The commas? That weird (x) thing at the end? Without going too deep on a TensorFlow tutorial, I thought I’d share…

---

## [Course 4 Week 1 Exercise 3 - conv\_forward Error: Wrong output for variable in position 0](https://community.deeplearning.ai/t/course-4-week-1-exercise-3-conv-forward-error-wrong-output-for-variable-in-position-0/21196)

<div class="topic-metadata">

**Author:** [@Bakir](https://community.deeplearning.ai/u/Bakir)\
**Replies:** 32\
**Last updated:** [October 29, 2023, 1:22am UTC](https://community.deeplearning.ai/t/course-4-week-1-exercise-3-conv-forward-error-wrong-output-for-variable-in-position-0/21196 "2023-10-29T01:22:11Z")

</div>

Hi everyone, I’m really struggeling with exercise 3, course 4, week 1. I get the Error message: Error: Wrong output for variable in position 0. The error occurs on line 120 in the multiple\_test(test\_cases, target) f…

---

## [W2\_A2\_Wrong values for d\[w\]](https://community.deeplearning.ai/t/w2-a2-wrong-values-for-d-w/117013)

<div class="topic-metadata">

**Author:** [@Matt\_Gerhold](https://community.deeplearning.ai/u/Matt_Gerhold)\
**Replies:** 28\
**Last updated:** [October 21, 2023, 2:27pm UTC](https://community.deeplearning.ai/t/w2-a2-wrong-values-for-d-w/117013 "2023-10-21T14:27:22Z")

</div>

I have gone through the notebook. All tests passed for optimize and predict functions, but when I pull them all together in the model, I get and assertion error telling me the weight vector differs from what is expected. …

[Next page](https://community.deeplearning.ai/c/course-q-a/deep-learning-specialization/6.md?page=1)
