The following code
from tensorflow import keras
from keras.layers import Conv2D
model = keras.Sequential()
model.add(Conv2D(1, (3, 3), padding='same', input_shape=(28, 28, 1)))
when executed throws an error:
TypeError: The added layer must be an instance of class Layer. Found: <keras.layers.convolutional.Conv2D object at 0x7fea0c002d10>
I also tried using the Convolutional2D but got the same error. Why?