Week3 Assignment 1: Function modelf

I have a problem implementing the function modelf. When running modelf_test, I get the following error message:

AttributeError: The layer "concatenate" has multiple inbound nodes, with different output shapes. Hence the notion of "output shape" is ill-defined for the layer. Use get_output_shape_at(node_index) instead.

Is there something wrong with the dimensions of the inputs to one_step_attention(), containing the concatenate layer? I use

a = Bidirectional(LSTM(units=n_a, return_sequences=True))(X)

in the modelf function and pass all the tests for one_step_attention(). I have also tried restarting the Kernel without any success.

EDIT: I restarted the Kernel a couple of times and it works now.

Meet with the same problem. Strange…

But mine dont have the “units=” in ‘a’ definition.

Problem solved after restarting the kernel.