C4 W1 ValueError: operands could not be broadcast together with shapes (2,3,4) (3,3,4)

Course 4/Week 1/Exercise 3 (Convolution)

Getting error message above. Based on my debugging, looks like some boundary condition since much of the convolution works. However, I am not able to see why I am getting a slice that is smaller than “requested” which then causes the error above.

Please advise if I need to share the code.
Thx.

One of your variables is the wrong shape.

# GRADED FUNCTION: conv_forward

# mentor edit: code removed - not allowed by the Honor Code.

Does not fail for the built in test but fails for the external test.

Please take a look at the attached function and give me some pointers.

Posting your code breaks the course Honor Code.

When you compute a_slice_prev, check that you have the order of the indices correct.

1 Like

:grinning: Thank you very much … helped a great deal !!!