i write the functions as required but i keep get this error
TypeError Traceback (most recent call last)
in
----> 1 happy_model = happyModel()
2 # Print a summary for each layer
3 for layer in summary(happy_model):
4 print(layer)
5
in happyModel()
39 tfl.MaxPool2D(),
40 tfl.Flatten,
—> 41 tfl.Dense(1,activation=‘sigmoid’)
42
43
/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
→ 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/sequential.py in init(self, layers, name)
140 layers = [layers]
141 for layer in layers:
→ 142 self.add(layer)
143
144 @property
/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
→ 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/sequential.py in add(self, layer)
180 raise TypeError('The added layer must be ’
181 'an instance of class Layer. ’
→ 182 'Found: ’ + str(layer))
183
184 tf_utils.assert_no_legacy_layers([layer])
TypeError: The added layer must be an instance of class Layer. Found: <class ‘tensorflow.python.keras.layers.core.Flatten’>