# Import Conv2D layer and Flatten from tensorflow keras layers from tensorflow.keras.layers import Dense, Conv2D, Flatten # Instantiate your model as usual model = Sequential() # Add a convolutional layer with 32 filters of size 3x3 model.add(Conv2D(filters=32, kernel_size=3, input_shape=(28, 28, 1), activation='relu')) # Add another convolutional layer model.add(Conv2D(filters=8, kernel_size=3, activation='relu')) # Flatten the output of the previous layer model.add(Flatten()) # End this multiclass model with 3 outputs and softmax model.add(Dense(3, activation='softmax'))