UPDATE Issue solved = Had to restart kernel.
I followed the hints correctly and filled in the appropriate code in the djmodel() function. But I seem to get the below error when running the next code cell not matter what I do.
Kindly help me understand this error!
djmodel Code:
{moderator edit: code removed}
Error:
ValueError Traceback (most recent call last)
in
----> 1 model = djmodel(Tx=30, LSTM_cell=LSTM_cell, densor=densor, reshaper=reshaper)
in djmodel(Tx, LSTM_cell, densor, reshaper)
46 a, _, c = LSTM_cell(inputs=x, initial_state=[a, c])
47 # Step 2.D: Apply densor to the hidden state output of LSTM_Cell
β> 48 out = densor(a)
49 # Step 2.E: add the output to βoutputsβ
50 outputs.append(out)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in call(self, *args, **kwargs)
924 if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
925 return self._functional_construction_call(inputs, args, kwargs,
β 926 input_list)
927
928 # Maintains info about the Layer.call
stack.
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in _functional_construction_call(self, inputs, args, kwargs, input_list)
1090 # TODO(reedwm): We should assert input compatibility after the inputs
1091 # are casted, not before.
β 1092 input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
1093 graph = backend.get_graph()
1094 # Use self._name_scope()
to avoid auto-incrementing the name.
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
214 β incompatible with the layer: expected axis β + str(axis) +
215 β of input shape to have value β + str(value) +
β 216 β but received input with shape β + str(shape))
217 # Check shape.
218 if spec.shape is not None:
ValueError: Input 0 of layer dense is incompatible with the layer: expected axis -1 of input shape to have value 90 but received input with shape [None, 64]