Rnn_backward error

While running rnn_cell_backward I am getting following output which is similar to expected output but while I am calling this method from rnn_backward - I am getting an error in this method

tuple indices must be integers or slices, not str

I am calling this rnn_cell_backward with parameters da_prevt, caches and da_prevt is of size (5, 10, 4) and assigning it to gradients

Output of rnn_cell_backward -
gradients[“dxt”][1][2] = -1.3872130506020925
gradients[“dxt”].shape = (3, 10)
gradients[“da_prev”][2][3] = -0.15239949377395495
gradients[“da_prev”].shape = (5, 10)
gradients[“dWax”][3][1] = 0.4107728249354584
gradients[“dWax”].shape = (5, 3)
gradients[“dWaa”][1][2] = 1.1503450668497135
gradients[“dWaa”].shape = (5, 5)
gradients[“dba”][4] = [0.20023491]
gradients[“dba”].shape = (5, 1)

Not sure what I am doing wrong here

I figured out what I was missing - was not using [t] in caches - got the error and fixed it

Glad to hear you found the solution under your own power. I was going to say that everything you showed above looked ok. For future situations, it would help to see the actual exception trace, so that we at least know the error is on the given line.