CNN_WK1_Ex5-Tuple indices error

In the backprop for the CNN, I get the following error off the bat in the conv_backward function:
17 # Retrieve dimensions from A_prev’s shape (≈1 line)
—> 18 (m, n_H_prev, n_W_prev, n_C_prev) = A_prev.shape[0:1,1:2,2:3,3:]
20 # Retrieve dimensions from W’s shape (≈1 line)

TypeError: tuple indices must be integers or slices, not tuple

Any help would be appreciated, as I’ve spent an inordinate amount of time on this so far…

Remove this part the shape method gives a tuple itself.

I did not include anything after “shape” in my code; the interpreter displays it like that by default

I’ve refreshed my notebook and emptied the cache, but the issue persists

:thinking: :thinking:
I don’t think so. Double-check your code.

Saif, I’m not blind as far as I know. I did not add anything to “shape”; why is the interpreter going haywire?

Can you please post the screenshot of your error (not code)?

I figured this out, there was a second cell above with a new definition of conv_forward(); I may have created it for debugging purposes.

I let the frustration get to me without properly tracing the error. All set now!

And make sure to delete that extra cell, after debugging. Otherwise, grader will give you an error.