Week 1- Assignment 3

Hi Guys,

Here is what I am doing:
for t in range(Tx):

    # Step 2.A:
    extract X[:,t,:]

    # Step 2.B: 
    reshape x (reshaper)

    # Step 2.C: 
    get a and c from LSTM_cell applied to x

    # Step 2.D: 
    assign the output of densor on a to out

    # Step 2.E:
    update outputs using append with out as input
# Step 3: Create model instance
model = Model(inputs=[X, a0, c0], outputs=outputs)

I get the following error:
Test failed at index 2
Expected value

[‘Reshape’, (None, 1, 90), 0]

does not match the input value:

[‘TensorFlowOpLayer’, [(None, 90)], 0]

AssertionError Traceback (most recent call last)
2 output = summary(model)
----> 3 comparator(output, djmodel_out)

~/work/W1A3/test_utils.py in comparator(learner, instructor)
24 “\n\n does not match the input value: \n\n”,
25 colored(f"{b}", “red”))
—> 26 raise AssertionError(“Error in test”)
27 print(colored(“All tests passed!”, “green”))

AssertionError: Error in test

In step 2.C, what is the initial_state?

yes got it. missed that.
I added initial_state=[a, c].

all good now.