W1 - Exercise 3 - trouble with matrix sizes

That error means one of two things:

  1. Your input objects are the wrong shape.
  2. 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.

1 Like