I am getting below error from convolutional_model…
TypeError Traceback (most recent call last)
in
----> 1 conv_model = convolutional_model((64, 64, 3))
2 conv_model.compile(optimizer=‘adam’,
3 loss=‘categorical_crossentropy’,
4 metrics=[‘accuracy’])
5 conv_model.summary()
in convolutional_model(input_shape)
53 ## 6 neurons in output layer. Hint: one of the arguments should be “activation=‘softmax’”
54
—> 55 outputs = tfl.Dense(units=6, activation = “softmax”)(F)
56
57 # YOUR CODE ENDS HERE
c:\python37\venv\imageai\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in call(self, *args, **kwargs)
996 inputs = self._maybe_cast_inputs(inputs, input_list)
997
→ 998 input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
999 if eager:
1000 call_fn = self.call
c:\python37\venv\imageai\lib\site-packages\tensorflow\python\keras\engine\input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
199 # have a shape
attribute.
200 if not hasattr(x, ‘shape’):
→ 201 raise TypeError('Inputs to a layer should be tensors. Got: s' (x,))
202
203 if len(inputs) != len(input_spec):
TypeError: Inputs to a layer should be tensors. Got: <tensorflow.python.keras.layers.core.Flatten object at 0x0000021D032B8C08>