C5 W1 Exercise 4 - lstm_forward

if any one can help why y[:,:,t] = yt is not correct from my code?


TypeError Traceback (most recent call last)
in
14 parameters_tmp[‘by’] = np.random.randn(2, 1)
15
—> 16 a_tmp, y_tmp, c_tmp, caches_tmp = lstm_forward(x_tmp, a0_tmp, parameters_tmp)
17 print("a[4][3][6] = ", a_tmp[4][3][6])
18 print("a.shape = ", a_tmp.shape)

in lstm_forward(x, a0, parameters)
58 # Save the value of the prediction in y (≈1 line)
59
—> 60 y[:,:,t] = yt
61 # Append the cache into caches (≈1 line)
62 caches.append(cache)

TypeError: ‘tuple’ object does not support item assignment

Either your initialization of ‘y’ is incorrect, or the value in yt is incorrect.