I am not getting correct output for this function. I am using
following line to calculate dtanh
{Moderator Edit: Solution Code Removed}
gradients[“dxt”][1][2] = -1.0171023380072393
gradients[“dxt”].shape = (3, 10)
gradients[“da_prev”][2][3] = -0.15784531210210753
gradients[“da_prev”].shape = (5, 10)
gradients[“dWax”][3][1] = 0.26938808588528623
gradients[“dWax”].shape = (5, 3)
gradients[“dWaa”][1][2] = 1.0909404950220543
gradients[“dWaa”].shape = (5, 5)
gradients[“dba”][4] = [0.00394918]
gradients[“dba”].shape = (5, 1)