How to implement the network used in this paper, the only description of it is: "A CNN with two 5x5 convolution layers (the first with 32 channels, the second with 64, each followed with 2x2 max pooling), a fully connected layer with 512 units and ReLu activation, and a final softmax output layer (1,663,370 total parameters)"
My implementation following this has only 580K parameters rather than 1663370.
Here is my implementation:
model = models.Sequential()
model.add(layers.Conv2D(filters=32,kernel_size=(5,5),activation="relu",input_shape=(28,28,1), strides = [1,1]))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(filters=64,kernel_size=(5,5),activation="relu", strides = [1,1]))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Flatten())
model.add(layers.Dense(512, activation='sigmoid'))
model.add(layers.Dense(10,activation='softmax'))
model.summary()