Week 1, jazz assignment wrong shapes mistery


This is my output from UNIT TEST for UNQ_C2

AttributeError                            Traceback (most recent call last)
<ipython-input-28-c395f100af16> in <module>
      1 # UNIT TEST
----> 2 inference_summary = summary(inference_model)
      3 comparator(inference_summary, music_inference_model_out)

~/work/W1A3/test_utils.py in summary(model)
     36     result = []
     37     for layer in model.layers:
---> 38         descriptors = [layer.__class__.__name__, 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/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)
   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.

i have no idea about why the shapes arent correct. I already rin the notebook in correct order. I cleaned the kernel. I tryed many changes (no one works). I need a hint. Thanks.

done. i have no idea what i do wrong or what fix it. Sad, but at least the notebook is done.

A search of the Forum for the phrase “multiple inbound nodes” will give you lots of material to study.

1 Like