Maxpool in Flux 0.8

This line is from the model-zoo, mnist, conv example (source: https://github.com/FluxML/model-zoo/blob/42967f6767beee4092348fd41b1af33442b75924/vision/mnist/conv.jl#L44):

Chain(..., x -> maxpool(x, (2,2)), ...)

It doesn’t work in Flux 0.8.3, with the error (see: https://github.com/FluxML/model-zoo/issues/153):

Error: no method matching maxpool(::TrackedArray, ::Tuple)

I’m trying to understand how to construct convolutional neural networks in Flux. How do I have to modify this code to make it work in Flux 0.8?

The answer is here