Downsample module

Hi there,

I am new to pytorch. Is there a layer to remove some spatial points in the feature map.
For example, suppose we have a 64x224x224 feature map, which is the output of the intermediate layer of model. We also have a 224x224 spatial mask containing 0 or 1. We want to choose 112x112 points in the feature map by this mask. How can we choose the spatial location and output a feature map of 64x112x112? Is there a module to do that?