F= tf.keras.layers.Flatten(P2)
# FULLY-CONNECTED without non-linear activation function(not not call softmax).
# 6 neurons in output layer. Hint: one of the arguments should be "activation_fn=None"Z3= tf.keras.layers.Dense(F,6)
AttributeError Traceback (most recent call last)
<ipython-input-40-e87412e02b7e> in <module>
7 X, Y = create_placeholders(64, 64, 3, 6)
8 parameters = initialize_parameters()
----> 9 Z3 = forward_propagation(X, parameters)
10 init = tf.global_variables_initializer()
11 sess.run(init)
<ipython-input-39-995cc2f546d5> in forward_propagation(X, parameters)
34 P2 = tf.nn.max_pool(A2, ksize=(1, 4, 4, 1), strides=(1, 4, 4, 1), padding='SAME')
35 # FLATTEN
---> 36 F = tf.keras.layers.Flatten(P2)
37 # FULLY-CONNECTED without non-linear activation function (not not call softmax).
38 # 6 neurons in output layer. Hint: one of the arguments should be "activation_fn=None"
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\layers\core.py in __init__(self, data_format, **kwargs)
654 def __init__(self, data_format=None, **kwargs):
655 super(Flatten, self).__init__(**kwargs)
--> 656 self.data_format = conv_utils.normalize_data_format(data_format)
657 self.input_spec = InputSpec(min_ndim=1)
658 self._channels_first = self.data_format == 'channels_first'
~\AppData\Roaming\Python\Python38\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'
F = tf.keras.layers.Flatten(P2) # FULLY-CONNECTED without non-linear activation function (not not call softmax). # 6 neurons in output layer. Hint: one of the arguments should be "activation_fn=None" Z3 = tf.keras.layers.Dense(F, 6)AttributeEr.