@@ -0,0 +1,937 @@
+from keras import backend as K%0Afrom keras.layers.core import Layer%0A%0A%0Aclass GlobalPooling2D(Layer):%0A    %22%22%22%0A    By @entron%0A    Borrowed and modified from here: https://github.com/fchollet/keras/pull/522%0A    %22%22%22%0A    def __init__(self, pooling_function='average'):%0A        super(GlobalPooling2D, self).__init__()%0A        if pooling_function not in %7B'average', 'max'%7D:%0A            raise Exception('Invalid pooling function for GlobalPooling2D:', pooling_function)%0A        if pooling_function == 'average':%0A            self.pooling_function = K.mean%0A        else:%0A            self.pooling_function = K.max%0A        self.input = K.placeholder(ndim=4)%0A%0A    def get_output(self, train):%0A        X = self.get_input(train)%0A        return self.pooling_function(self.pooling_function(X, axis=-1), axis=-1)%0A%0A    def get_config(self):%0A        return %7B%22name%22: self.__class__.__name__,%0A                %22pooling_function%22: self.pooling_function.__name__%7D%0A

Add convolutional.py