in modelf_test(target)
12 model = target(Tx, Ty, n_a, n_s, len_human_vocab, len_machine_vocab)
13
—> 14 print(summary(model))
15
16
~/work/W3A1/test_utils.py in summary(model)
34 result =
35 for layer in model.layers:
—> 36 descriptors = [layer.class.name, layer.output_shape, layer.count_params()]
37 if (type(layer) == Conv2D):
38 descriptors.append(layer.padding)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in output_shape(self)
2190 'ill-defined for the layer. ’
2191 'Use get_output_shape_at(node_index) ’
→ 2192 ‘instead.’ % self.name)
2193
2194 @property
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.
You can try using the get_output_shape_at(node_index) method instead of directly accessing the output_shape attribute. This method allows you to get the output shape at a specific node index.
Every time you modify anything in the assignments that use an LSTM layer, you must restart the kernel and re-run the notebook.
This is because the LSTM_cell() is usually a global variable, and changes you make to the notebook after the LSTM is created will not apply to the original object.
Please start a new query with error message/traceback so that community members and mentors can effectively diagnose what the problem might be and offer solutions.