This is the code for SPP class from Keras:
class SpatialPyramidPooling(Layer):
def __init__(self, pool_list, **kwargs): #self.dim_ordering = K.ima