Hi,
I have created all the layers with the mentioned parameters but keep getting this below error. What could be causing this?
in convolutional_model(input_shape)
50 P2 = tfl.MaxPool2D((4, 4), 4, padding=‘same’)(A2)
51 ## FLATTEN
—> 52 F = tfl.Flatten(P2)
53 ## Dense layer
54 ## 6 neurons in output layer. Hint: one of the arguments should be “activation=‘softmax’”
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/layers/core.py in init(self, data_format, **kwargs)
642 def init(self, data_format=None, **kwargs):
643 super(Flatten, self).init(**kwargs)
→ 644 self.data_format = conv_utils.normalize_data_format(data_format)
645 self.input_spec = InputSpec(min_ndim=1)
646 self._channels_first = self.data_format == ‘channels_first’
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/utils/conv_utils.py in normalize_data_format(value)
190 if value is None:
191 value = backend.image_data_format()
→ 192 data_format = value.lower()
193 if data_format not in {‘channels_first’, ‘channels_last’}:
194 raise ValueError('The data_format
argument must be one of ’
AttributeError: ‘Tensor’ object has no attribute ‘lower’