Context: please provide short answer of following question
Question: Explain the role of pooling layers in CNNs.
Answer: Pooling layers in CNNs are used to reduce the spatial dimensions of feature maps, thereby decreasing the number of parameters and computational complexity. MaxPooling selects the highest value from a region, while AveragePooling calculates the average. This downsampling helps retain the most important features while reducing the amount of data the model has to process.