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

        # Remember the input
        shortcut = x

        # 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)

        # Third depthwise Separable Convolution
        x = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
    
        # Add the identity link to the output of the block
        x = Add()([x, shortcut])
        return x
 Create a residual block using Depthwise Separable Convolutions
            x        : input into residual block
            n_filters: number of filters
        
Create a residual block using Depthwise Separable Convolutions
x        : input into residual block
n_filters: number of filters
Create a residual block using Depthwise Separable Convolutions x : input into residual block n_filters : number of filters
def residual_block(self, x, **metaparameters):
        n_filters = metaparameters['n_filters']
        del metaparameters['n_filters']
        shortcut = x
        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 = self.SeparableConv2D(x, n_filters, (3, 3), padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = Add()([x, shortcut])
        return x
def residual_block ( self , x , ** metaparameters ) : n_filters = metaparameters [ 'n_filters' ] del metaparameters [ 'n_filters' ] shortcut = x 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 = self . SeparableConv2D ( x , n_filters , ( 3 , 3 ) , padding = 'same' , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = Add ( ) ( [ x , shortcut ] ) return x
Create a residual block using Depthwise Separable Convolutions
x        : input into residual block
n_filters: number of filters
Create a residual block using Depthwise Separable Convolutions x : input into residual block n_filters : number of filters
""" Create a residual block using Depthwise Separable Convolutions
            x        : input into residual block
            n_filters: number of filters
        """ # Remember the input # First Depthwise Separable Convolution # Second depthwise Separable Convolution # Third depthwise Separable Convolution # Add the identity link to the output of the block
self
x