Given this back of the envelope calculation, it seems like the input volume should be smaller than the kernel size at the third convolutional layer:
model = Sequential()
model.add(Conv2D(32, (5, 5), input_shape=(28,28, 1)))
model.add(Conv2D(32, (5, 5)))
#after this we should have input volume of size 24x24
model.add(Activation('relu'))
model.add(Conv2D(32, (5, 5)))
#20x20
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
#10x10
model.add(Conv2D(64, (5, 5)))
#6x6
model.add(Activation('relu'))
model.add(Conv2D(64, (5, 5)))
#1x1
model.add(Activation('relu'))
##we should get an error here becuse there isn't enough input volume to do a 2x2 maxpoolinglayer
model.add(MaxPooling2D(pool_size=(2, 2)))
So the question is... why don't we run into this issue with the lasagne implementation by Bhagoji?
Given this back of the envelope calculation, it seems like the input volume should be smaller than the kernel size at the third convolutional layer:
So the question is... why don't we run into this issue with the lasagne implementation by Bhagoji?