Hi
i have written this code but i received an error. what is the problem?
code:
outputs =
# Step 2: Loop over tx
for t in range(Tx):
# Step 2.A: select the "t"th time step vector from X.
x = X[:,t,:]
# Step 2.B: Use reshaper to reshape x to be (1, n_values) (≈1 line)
x = reshaper(x)
# Step 2.C: Perform one step of the LSTM_cell
a, _, c = LSTM_cell(inputs=x, initial_state=[a, c])
# Step 2.D: Apply densor to the hidden state output of LSTM_Cell
out = densor(a)
# Step 2.E: add the output to "outputs"
outputs.append[out]
# Step 3: Create model instance
model = Model(inputs=[X, a0, c0], outputs=outputs)
Error:
TypeError Traceback (most recent call last)
in
----> 1 model = djmodel(Tx=30, LSTM_cell=LSTM_cell, densor=densor, reshaper=reshaper)
in djmodel(Tx, LSTM_cell, densor, reshaper)
48 out = densor(a)
49 # Step 2.E: add the output to “outputs”
—> 50 outputs.append[out]
51
52 # Step 3: Create model instance
TypeError: ‘builtin_function_or_method’ object is not subscriptable