text_plain_output_1.png
from keras.layers import Conv2D,MaxPool2D,AveragePooling2D,Flatten,Dense,Input

from keras.losses import categorical_crossentropy,sparse_categorical_crossentropy

from keras.models import Sequential

model = Sequential()
model.add(Input((28, 28, 1)))
model.add(Conv2D(128, 3, activation='relu', padding='same'))
model.add(AveragePooling2D(2))
model.add(Conv2D(64, 3, activation='relu', padding='same'))
model.add(AveragePooling2D(2))
model.add(Conv2D(32, 3, activation='relu', padding='same'))
model.add(AveragePooling2D(2))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dense(64, activation='relu'))
model.add(Dense(32, activation='relu'))
model.add(Dense(10, activation='softmax'))

model.compile(optimizer='adam', loss=sparse_categorical_crossentropy, metrics=['accuracy'])
model.summary()