I'm trying to implement a layer GlobalMaxPooling2D layer. I have a 10x10x128 input and want it reduced to a 3D tensor of shape 1x1x128. I tried using keepdims=True, but it throws a
TypeError: ('Keyword argument not understood:', 'keepdims')
I have tried adding data_format too but with no avail (which is the default "channel_last"). Here is the code for GlobalMaxPooling2D
ug = layers.GlobalMaxPooling2D(data_format='channel_last',keepdims=True)(inputs)
The inputs variable is the output of a 2D conv operation:
conv4 = layers.Conv2D(filters=128, kernel_size=3, strides=1, padding='valid', activation='relu', name='conv4')(conv3)
Am i messing up somewhere due to this Conv layer or while calling GlobalMaxPooling2D layer ? Is there a way to get a 1x1x128 output from the GlobalMaxPooling2D layer ?