zoo/wrn/wrn_c.py
def projection_block(self, x, **metaparameters):
        """ Construct a B(3,3) style block
            x        : input into the block
            n_filters: number of filters
            k        : width factor
            strides  : whether the projection shortcut is strided
        """
        n_filters = metaparameters['n_filters']
        strides   = metaparameters['strides']
        k         = metaparameters['k']
        del metaparameters['n_filters']
        del metaparameters['strides']
   
        # Save input vector (feature maps) for the identity link
        shortcut = self.BatchNormalization(x)
        shortcut = self.Conv2D(shortcut, n_filters *k, (3, 3), strides=strides, padding='same', **metaparameters)
   
        ## Construct the 3x3, 3x3 convolution block
   
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters * k, (3, 3), strides=strides, padding='same', **metaparameters)

        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters * k, (3, 3), strides=(1, 1), padding='same', **metaparameters)

        # Add the identity link (input) to the output of the residual block
        x = Add()([shortcut, x])
        return x
 Construct a B(3,3) style block
            x        : input into the block
            n_filters: number of filters
            k        : width factor
            strides  : whether the projection shortcut is strided
        
Construct a B(3,3) style block
x        : input into the block
n_filters: number of filters
k        : width factor
strides  : whether the projection shortcut is strided
Construct a B ( 3 3 ) style block x : input into the block n_filters : number of filters k : width factor strides : whether the projection shortcut is strided
def projection_block(self, x, **metaparameters):
        n_filters = metaparameters['n_filters']
        strides   = metaparameters['strides']
        k         = metaparameters['k']
        del metaparameters['n_filters']
        del metaparameters['strides']
        shortcut = self.BatchNormalization(x)
        shortcut = self.Conv2D(shortcut, n_filters *k, (3, 3), strides=strides, padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters * k, (3, 3), strides=strides, padding='same', **metaparameters)
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters * k, (3, 3), strides=(1, 1), padding='same', **metaparameters)
        x = Add()([shortcut, x])
        return x
def projection_block ( self , x , ** metaparameters ) : n_filters = metaparameters [ 'n_filters' ] strides = metaparameters [ 'strides' ] k = metaparameters [ 'k' ] del metaparameters [ 'n_filters' ] del metaparameters [ 'strides' ] shortcut = self . BatchNormalization ( x ) shortcut = self . Conv2D ( shortcut , n_filters * k , ( 3 , 3 ) , strides = strides , padding = 'same' , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . Conv2D ( x , n_filters * k , ( 3 , 3 ) , strides = strides , padding = 'same' , ** metaparameters ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . Conv2D ( x , n_filters * k , ( 3 , 3 ) , strides = ( 1 , 1 ) , padding = 'same' , ** metaparameters ) x = Add ( ) ( [ shortcut , x ] ) return x
Construct a B(3,3) style block
x        : input into the block
n_filters: number of filters
k        : width factor
strides  : whether the projection shortcut is strided
Construct a B ( 3 3 ) style block x : input into the block n_filters : number of filters k : width factor strides : whether the projection shortcut is strided
""" Construct a B(3,3) style block
            x        : input into the block
            n_filters: number of filters
            k        : width factor
            strides  : whether the projection shortcut is strided
        """ # Save input vector (feature maps) for the identity link ## Construct the 3x3, 3x3 convolution block # Add the identity link (input) to the output of the residual block
self
x