Course 5, Week 1, Assignment 3, Excercise 1

Good afternoon. I am working on Week 1, Assignment 3, Excercise 1, and have run into a bit of trouble.

I am getting this error:

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

~/work/W1A3/ in summary(model)
36 result =
37 for layer in model.layers:
—> 38 descriptors = [, layer.output_shape, layer.count_params()]
39 if (type(layer) == Conv2D):
40 descriptors.append(layer.padding)

/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/ in output_shape(self)
2190 'ill-defined for the layer. ’
2191 'Use get_output_shape_at(node_index)
→ 2192 ‘instead.’ %
2194 @property

AttributeError: The layer “lstm” 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.

The lstm step in my code is:

a, _, c = LSTM_cell(x, [a, c])

However, I also have a question about the size of X. It says in the instructions that X has the shape (m, Tx, n_values), but in the excercise cell, we have "X = Input(shape=(Tx, n_values)) ". Is this changing the shape of X? Should x=X[:,t,:] or x=X[t,:]

Search the Forum for the text “multiple inbound nodes”.
You’ll find a lot of threads that have tips for this.

Also, please be clear whether you’re using ‘X’ or ‘x’. Letter case is important.