from keras.layers import AveragePooling2D pooling_layer = AveragePooling2D(pool_size=(2, 2), strides=(2, 2))(input_tensor)
pooling_layer = AveragePooling2D(pool_size=(7, 7))(input_tensor)In this example, `pool_size` is equal to the size of the input feature map, which means that each channel of the feature map will be reduced to a single value using the average. The `AveragePooling2D` layer is part of the `convolutional` module in the Keras package.