Backpropagation equation

Equation 0 for backpropagation of basic RNN is incomplete. The LHS is as follows :

“dtanh”

this seems to be incomplete as there is not input to tanh function. Can anyone explain?

It should be dZ (=dJ/dz)

Hi @Faraz

dtanh is a variable, not a function.
It would be helpful to community member answer your query if you could give details of which assignment and exercise you are referring to.

I’m guessing you are talking about the Back Propagation section of the C5 W1 A1 assignment Building Your RNN - Step by Step. Here is the definition of the various equations in the instructions for that section:


Then in the code section they give you this template code (for example):

    ### START CODE HERE ###
    # compute the gradient of dtanh term using a_next and da_next (≈1 line)
    dtanh = None

    # compute the gradient of the loss with respect to Wax (≈2 lines)
    dxt = None
    dWax = None

    # compute the gradient with respect to Waa (≈2 lines)
    da_prev = None
    dWaa = None

    # compute the gradient with respect to b (≈1 line)
    dba = None

The places where you see None, you need to fill in with the implementations based on the equations shown above.

Or if I’m not looking at the place you are actually talking about, please give us more details, as Kin requested above.