Week1 assignment1

Hi! I have two problems with first assigment: firstly, in conv_forward first test fails, but second is correct, and I can’t understand what is the problem there.
And also in pool_forward all test pass, but auto grader doesn’t give any points(

Hey @p.kozarovytska.fi93, for your first query, please have a look at the second test. It simply checks if the cache variable is correct or not, and in this function, we are assigning (A_prev, W, b, hparameters) to the cache variable which are passed as input to the conv_forward function and are not modified anywhere. Hence, passing this test doesn’t imply anything about your code in this function. As to why the first test case is failing, can you please DM your code to me, since sharing code is against the community guidelines.

For your second query, by any chance did you remove this line # GRADED FUNCTION: pool_forward from the code cell in which the pool_forward function is there?

Regards,
Elemento

Notice that the first test for conv_forward has stride = 2 and the second one has stride = 1. So the most likely possibility is that you are implementing the stride incorrectly. Also notice that your values for the second pool_forward case will be wrong if that is what the problem is: look carefully at all the values, not just the first row. There is a problem with that test in that it does not “throw” when the values don’t match. You just have to look very carefully.

The stride is what trips most people up, so you can find plenty of other threads about this issue. E.g. this one or this one.

1 Like