tf MaxPooling2D 1

tf MaxPooling2D

import tensorflow as tf

poolsize=(2, 2)
tf.keras.layers.MaxPool2D(pool_size=poolsize, strides=None, padding='valid', data_format=None)

Here is what the above code is Doing:
1. pool_size: Integer, size of the max pooling windows.
2. strides: Integer, or None. Factor by which to downscale. E.g. 2 will halve the input.
3. padding: One of “valid” or “same” (case-insensitive).
4. data_format: A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch, height, width, channels) while channels_first corresponds to inputs with shape (batch, channels, height, width). It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json. If you never set it, then it will be “channels_last”.

Similar Posts