zoo/xception/xception_c.py
def projection_block(self, x, **metaparameters):
        """ Create a residual block using Depthwise Separable Convolutions with Projection shortcut
            x        : input into residual block
            n_filters: number of filters
        """
        n_filters = metaparameters['n_filters']
        del metaparameters['n_filters']

        # 1x1 strided convolution to increase the number of and reduce size of the feature maps 
        # in identity link to match output of residual block for the add operation (projection shortcut)
        shortcut = self.Conv2D(x, n_filters, (1, 1), strides=(2, 2), padding='same', **metaparameters)
        shortcut = self.BatchNormalization(shortcut)

        # First Depthwise Separable Convolution
        x = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)

        # Second depthwise Separable Convolution
        x = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)

        # Create pooled feature maps, reduce size by 75%
        x = MaxPooling2D((3, 3), strides=(2, 2), padding='same')(x)

        # Add the projection shortcut to the output of the block
        x = Add()([x, shortcut])

        return x
 Create a residual block using Depthwise Separable Convolutions with Projection shortcut
            x        : input into residual block
            n_filters: number of filters
        
Create a residual block using Depthwise Separable Convolutions with Projection shortcut
x        : input into residual block
n_filters: number of filters
Create a residual block using Depthwise Separable Convolutions with Projection shortcut x : input into residual block n_filters : number of filters
def projection_block(self, x, **metaparameters):
        n_filters = metaparameters['n_filters']
        del metaparameters['n_filters']
        shortcut = self.Conv2D(x, n_filters, (1, 1), strides=(2, 2), padding='same', **metaparameters)
        shortcut = self.BatchNormalization(shortcut)
        x = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = MaxPooling2D((3, 3), strides=(2, 2), padding='same')(x)
        x = Add()([x, shortcut])
        return x
def projection_block ( self , x , ** metaparameters ) : n_filters = metaparameters [ 'n_filters' ] del metaparameters [ 'n_filters' ] shortcut = self . Conv2D ( x , n_filters , ( 1 , 1 ) , strides = ( 2 , 2 ) , padding = 'same' , ** metaparameters ) shortcut = self . BatchNormalization ( shortcut ) x = self . SeparableConv2D ( x , n_filters , ( 3 , 3 ) , padding = 'same' , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . SeparableConv2D ( x , n_filters , ( 3 , 3 ) , padding = 'same' , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = MaxPooling2D ( ( 3 , 3 ) , strides = ( 2 , 2 ) , padding = 'same' ) ( x ) x = Add ( ) ( [ x , shortcut ] ) return x
Create a residual block using Depthwise Separable Convolutions with Projection shortcut
x        : input into residual block
n_filters: number of filters
Create a residual block using Depthwise Separable Convolutions with Projection shortcut x : input into residual block n_filters : number of filters
""" Create a residual block using Depthwise Separable Convolutions with Projection shortcut
            x        : input into residual block
            n_filters: number of filters
        """ # 1x1 strided convolution to increase the number of and reduce size of the feature maps  # in identity link to match output of residual block for the add operation (projection shortcut) # First Depthwise Separable Convolution # Second depthwise Separable Convolution # Create pooled feature maps, reduce size by 75% # Add the projection shortcut to the output of the block
self
x