How to apply cross-channel pooling for a set of feature maps

I have a feature map of size 8 x 32 x 10 x 10, where 8 is the batch size, 32 is the number of channels and 10 represents the width and the height respectively.

I want to apply cross channel pooling over each of the 8 feature maps of 32 maps (32 maps are organized as 8,8,8,8). The output I am expecting is 8x4x10x10.

How can I do it?