Skip to content

Commit 9936d33

Browse files
authored
Merge pull request #3 from AladdinPerzon/master
Code for the pool_backward from ConvNet on Deeplearning.ai
2 parents c5d9a13 + 78238bf commit 9936d33

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* [***Neural Networks and Deep Learning***](https://www.coursera.org/learn/neural-networks-deep-learning/home/welcome)  
44
* [***Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization***](https://www.coursera.org/learn/deep-neural-network/home/welcome)
55
* [***Structuring Machine Learning Projects***](https://www.coursera.org/learn/machine-learning-projects/home/welcome)
6-
* [***Convolutional Neural Networks***]()
7-
* [***Sequence Models***]()
6+
* [***Convolutional Neural Networks***](https://www.coursera.org/learn/convolutional-neural-networks)
7+
* [***Sequence Models***](https://www.coursera.org/learn/nlp-sequence-models)
88

99
* [***Neural Networks and Deep Learning***](https://www.coursera.org/learn/neural-networks-deep-learning/home/welcome)
1010
* In this course, you will learn the foundations of deep learning. When you finish this class, you will:

notebook/Convolution model Step by Stepv1.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,16 +1228,16 @@
12281228
" # Create the mask from a_prev_slice (≈1 line)\n",
12291229
" mask = create_mask_from_window(a_prev_slice)\n",
12301230
" # Set dA_prev to be dA_prev + (the mask multiplied by the correct entry of dA) (≈1 line)\n",
1231-
" dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += (mask * a_prev_slice)\n",
1231+
" dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += (dA[i, h, w, c] * mask)\n",
12321232
" \n",
12331233
" elif mode == \"average\":\n",
12341234
" \n",
12351235
" # Get the value a from dA (≈1 line)\n",
1236-
" da = dA\n",
1236+
" da = dA[i, h, w, c] \n",
12371237
" # Define the shape of the filter as fxf (≈1 line)\n",
12381238
" shape = (f,f)\n",
12391239
" # Distribute it to get the correct slice of dA_prev. i.e. Add the distributed value of da. (≈1 line)\n",
1240-
" dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += da\n",
1240+
" dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += distribute_value(da, shape)\n",
12411241
" \n",
12421242
" ### END CODE ###\n",
12431243
" \n",
@@ -1246,7 +1246,7 @@
12461246
" \n",
12471247
" return dA_prev\n",
12481248
"\n",
1249-
"##### This code has some bugs that I have not found!"
1249+
"##### This code had some bugs, but I believe they are fixed now if you were to run the code above!"
12501250
]
12511251
},
12521252
{

0 commit comments

Comments
 (0)