The existing function in keras lib including max-pooling, average pooling, etc.
However, I would like to implement fractional max-pooling in keras based on the paper https://arxiv.org/abs/1412.6071.
My implementation are as follow:
model = Sequential()
......
model.add(Conv2D(32, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
So, instead of model.add(MaxPooling2D(pool_size=(2, 2))), I would like to implement something like the following:
model.add(fractionalMaxpool2D(..............))
Is it possible? I am currently using keras as backend in tensorflow.
Appreciate if someone would provide the algorithm/code.
I am quite new to this as I didn't wrote any custom layer before so could anyone kindly help out? Thanks!