The error is raised, if the spatial size of the input (and thus an intermediate activation) is too small for the model architecture.
It seems you are using an input of 28x28 pixels, which would be too small for an AlexNet-like model, which was initially using inputs of 224x224, so you would have to either resize the inputs to a larger size or modify the model (e.g. by removing layers).