Coursera (Sequence Models): Building_a_Recurrent_Neural_Network_Step_by_Step

Tom has answered everything, but it looks like you misinterpreted several of the math formulas. For future reference, it’s important to understand the notational convention that Prof Ng uses for matrix multiplication: if he just write the operands adjacent to each other with no explicit operator, then it is “real” matrix multiply (meaning dot product style with np.dot). When he means elementwise multiply, he consistently uses * as the operator. In that case you use np.multiply or * to express that in python/numpy.

Please go back and look at the way the formulas for c_next and a_next are specified in the instructions with what I just described in mind.

Here’s a thread which discusses that point in more detail.