Conv_backward error

You don’t need ‘i’ and ‘c’ in that line of code. It only takes three index values there.
You should have already used ‘i’ earlier when you created a_prev_pad.

In addition to Tom’s reply, please read this guide.