zoo/unet/unet_c.py
def contract_group(self, x, n_filters, crop):
        """ Construct Contracting Group
            x        : input tensor to group
            n_filters: number of filters
            crop     : crop size for feature maps
        """
        # B(3, 3) convolutions
        x = self.Conv2D(x, n_filters, (3, 3), strides=1, padding='valid')
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters, (3, 3), strides=1, padding='valid')
        x = self.ReLU(x)
        # Crop the Feature Map
        f = Cropping2D(((crop, crop), (crop, crop)))(x)

        # Downsampling
        x = MaxPooling2D((2, 2), strides=2)(x)

        return x, f
 Construct Contracting Group
            x        : input tensor to group
            n_filters: number of filters
            crop     : crop size for feature maps
        
Construct Contracting Group
x        : input tensor to group
n_filters: number of filters
crop     : crop size for feature maps
Construct Contracting Group x : input tensor to group n_filters : number of filters crop : crop size for feature maps
def contract_group(self, x, n_filters, crop):
        x = self.Conv2D(x, n_filters, (3, 3), strides=1, padding='valid')
        x = self.ReLU(x)
        x = self.Conv2D(x, n_filters, (3, 3), strides=1, padding='valid')
        x = self.ReLU(x)
        f = Cropping2D(((crop, crop), (crop, crop)))(x)
        x = MaxPooling2D((2, 2), strides=2)(x)
        return x, f
def contract_group ( self , x , n_filters , crop ) : x = self . Conv2D ( x , n_filters , ( 3 , 3 ) , strides = 1 , padding = 'valid' ) x = self . ReLU ( x ) x = self . Conv2D ( x , n_filters , ( 3 , 3 ) , strides = 1 , padding = 'valid' ) x = self . ReLU ( x ) f = Cropping2D ( ( ( crop , crop ) , ( crop , crop ) ) ) ( x ) x = MaxPooling2D ( ( 2 , 2 ) , strides = 2 ) ( x ) return x , f
Construct Contracting Group
x        : input tensor to group
n_filters: number of filters
crop     : crop size for feature maps
Construct Contracting Group x : input tensor to group n_filters : number of filters crop : crop size for feature maps
""" Construct Contracting Group
            x        : input tensor to group
            n_filters: number of filters
            crop     : crop size for feature maps
        """ # B(3, 3) convolutions # Crop the Feature Map # Downsampling
self
x
n_filters
crop