Help understanding assignment 1 of course 4 week 1

so i have looked through the videos a few times and still dont really understand how to code it out. i am at the conv_forward function.
my questions are

  1. what does the m in A_prev represent? is it the output of eat image in the training set?
  2. what does use the corners to define the (3D) slice of a_prev_pad mean? like what is a 3d slice
  3. what does convolvingthe (3D) slice with the correct filter W and bias b, to get back one output neuron? 1 neutron as in the first row of output from 1 image or all the images collectively ?

once again sorry if my questions are super amateur. also if anyone doesn’t mind discussing topics like this on discord do drop me a dm!!


I am going to ask some guiding questions.

  1. I think you are talking this m. It means the number of samples.
 A_prev -- output activations of the previous layer, 
        numpy array of shape (m, n_H_prev, n_W_prev, n_C_prev)
  1. How do you understand this hint given in the assignment?

  2. Why do you take a slice out? (How are you going to do on that slide with a filter?)


1 Like
  1. i got the qn 1 down

  2. i dont get what that there are indexing at that point in time but currently after finishing it the slice means to ‘cut’ a block that is of index 0 to 2 on the h and w and through all the channels.

  3. for 3 what i dont get is how to code it, i mean with the hints it is doable but i coded it using the hints and not so much on intuition. but to answer ur qn I took the slice out from the output so that i can use it to get the Z value.

It’s fine. Let’s look forward :wink:

But how to code it is what the assignment is about. I can’t tell you how to code it. What about this video? The lecture gave a pretty intuitive example (edge detection) of how to apply a filter on a slice of data. Indeed, this is also what Exercise 2 does and you should have finished it, since your question is about Exercise 3.


1 Like