zoo/senet/se_resnet_c.py
def identity_block(self, x, **metaparameters):
        """ Create a Bottleneck Residual Block with Identity Link
            x        : input into the block
            n_filters: number of filters
        """
        n_filters = metaparameters['n_filters']
        del metaparameters['n_filters']

        # Save input vector (feature maps) for the identity link
        shortcut = x
    
        ## Construct the 1x1, 3x3, 1x1 residual block (fig 3c)

        # Dimensionality reduction
        x = self.Conv2D(x, n_filters, (1, 1), strides=(1, 1), **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)

        # Bottleneck layer
        x = self.Conv2D(x, n_filters, (3, 3), strides=(1, 1), padding="same", 
                        **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)

        # Dimensionality restoration - increase the number of output filters by 4X
        x = self.Conv2D(x, n_filters * 4, (1, 1), strides=(1, 1), **metaparameters)
        x = self.BatchNormalization(x)
    
        # Pass the output through the squeeze and excitation block
        x = self.squeeze_excite_block(x, **metaparameters)
    
        # Add the identity link (input) to the output of the residual block
        x = Add()([shortcut, x])
        x = self.ReLU(x)
        return x
 Create a Bottleneck Residual Block with Identity Link
            x        : input into the block
            n_filters: number of filters
        
Create a Bottleneck Residual Block with Identity Link
x        : input into the block
n_filters: number of filters
Create a Bottleneck Residual Block with Identity Link x : input into the block n_filters : number of filters
def identity_block(self, x, **metaparameters):
        n_filters = metaparameters['n_filters']
        del metaparameters['n_filters']
        shortcut = x
        x = self.Conv2D(x, n_filters, (1, 1), strides=(1, 1), **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters, (3, 3), strides=(1, 1), padding="same", 
                        **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters * 4, (1, 1), strides=(1, 1), **metaparameters)
        x = self.BatchNormalization(x)
        x = self.squeeze_excite_block(x, **metaparameters)
        x = Add()([shortcut, x])
        x = self.ReLU(x)
        return x
def identity_block ( self , x , ** metaparameters ) : n_filters = metaparameters [ 'n_filters' ] del metaparameters [ 'n_filters' ] shortcut = x x = self . Conv2D ( x , n_filters , ( 1 , 1 ) , strides = ( 1 , 1 ) , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . Conv2D ( x , n_filters , ( 3 , 3 ) , strides = ( 1 , 1 ) , padding = "same" , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . Conv2D ( x , n_filters * 4 , ( 1 , 1 ) , strides = ( 1 , 1 ) , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . squeeze_excite_block ( x , ** metaparameters ) x = Add ( ) ( [ shortcut , x ] ) x = self . ReLU ( x ) return x
Create a Bottleneck Residual Block with Identity Link
x        : input into the block
n_filters: number of filters
Create a Bottleneck Residual Block with Identity Link x : input into the block n_filters : number of filters
""" Create a Bottleneck Residual Block with Identity Link
            x        : input into the block
            n_filters: number of filters
        """ # Save input vector (feature maps) for the identity link ## Construct the 1x1, 3x3, 1x1 residual block (fig 3c) # Dimensionality reduction # Bottleneck layer # Dimensionality restoration - increase the number of output filters by 4X # Pass the output through the squeeze and excitation block # Add the identity link (input) to the output of the residual block
self
x