I’m working on the modelf function and whenever I test it, it shows that the last input layer and LSTM layers are switched. I’m confused because I haven’t modified any of the starter code and I am just defining the layers as instructed. Is there a way to figure out how this is happening? This is the output of the test:
[[‘InputLayer’, [(None, 30, 37)], 0], [‘InputLayer’, [(None, 64)], 0], [‘Bidirectional’, (None, 30, 64), 17920], [‘RepeatVector’, (None, 30, 64), 0, 30], [‘Concatenate’, (None, 30, 128), 0], [‘Dense’, (None, 30, 10), 1290, ‘tanh’], [‘Dense’, (None, 30, 1), 11, ‘relu’], [‘Activation’, (None, 30, 1), 0], [‘Dot’, (None, 1, 64), 0], [‘LSTM’, [(None, 64), (None, 64), (None, 64)], 33024, (None, 1, 64), ‘tanh’], [‘InputLayer’, [(None, 64)], 0], [‘Dense’, (None, 11), 715, ‘softmax’]]
Test failed at index 9
Expected value[‘InputLayer’, [(None, 64)], 0]
does not match the input value:
[‘LSTM’, [(None, 64), (None, 64), (None, 64)], 33024, (None, 1, 64), ‘tanh’]
AssertionError Traceback (most recent call last)
in
33
34
—> 35 modelf_test(modelf)in modelf_test(target)
30 assert len(model.outputs) == 10, f"Wrong output shape. Expected 10 != {len(model.outputs)}"
31
—> 32 comparator(summary(model), expected_summary)
33
34~/work/W3A1/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”))
28AssertionError: Error in test