Sorry, I haven’t read that paper. Maybe the number of channels after the last convolution has to be equal to the number of outputs, do the authors mention this? Anyway, it’s very common to use global average pooling as a replacement for flatten before a fully connected later, see for instance this issue 131 at keras’ github