That error means one of two things:
- Your input objects are the wrong shape.
- You are interpreting the math formulas incorrectly. It’s important to understand the notational convention that Prof Ng uses, which is described on this thread.
If you are talking about lstm_cell_forward
, note that the formula for c_next
does not involve dot products, which you’ll see from the point made about the notation on that thread that I linked.