zoo/autoencoder/dc_autoencoder_c.py
def decoder(self, x, init_weights=None, **metaparameters):
        ''' Construct the Decoder
            x     : input to the decoder
            layers: filters per layer
        '''
        layers = metaparameters['layers']

        # Progressive Feature Unpooling
        for _ in range(len(layers)-1, 0, -1):
            n_filters = layers[_]['n_filters']
            x = self.Conv2DTranspose(x, n_filters, (3, 3), strides=2, padding='same')
            x = self.BatchNormalization(x)
            x = self.ReLU(x)

        # Last unpooling and match shape to input
        x = self.Conv2DTranspose(x, 3, (3, 3), strides=2, padding='same')
        x = self.BatchNormalization(x)
        x = self.ReLU(x)

        # The decoded image
        return x
 Construct the Decoder
            x     : input to the decoder
            layers: filters per layer
        
Construct the Decoder
x     : input to the decoder
layers: filters per layer
Construct the Decoder x : input to the decoder layers : filters per layer
def decoder(self, x, init_weights=None, **metaparameters):
        layers = metaparameters['layers']
        for _ in range(len(layers)-1, 0, -1):
            n_filters = layers[_]['n_filters']
            x = self.Conv2DTranspose(x, n_filters, (3, 3), strides=2, padding='same')
            x = self.BatchNormalization(x)
            x = self.ReLU(x)
        x = self.Conv2DTranspose(x, 3, (3, 3), strides=2, padding='same')
        x = self.BatchNormalization(x)
        x = self.ReLU(x)
        return x
def decoder ( self , x , init_weights = None , ** metaparameters ) : layers = metaparameters [ 'layers' ] for _ in range ( len ( layers ) - 1 , 0 , - 1 ) : n_filters = layers [ _ ] [ 'n_filters' ] x = self . Conv2DTranspose ( x , n_filters , ( 3 , 3 ) , strides = 2 , padding = 'same' ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) x = self . Conv2DTranspose ( x , 3 , ( 3 , 3 ) , strides = 2 , padding = 'same' ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) return x
Construct the Decoder
x     : input to the decoder
layers: filters per layer
Construct the Decoder x : input to the decoder layers : filters per layer
''' Construct the Decoder
            x     : input to the decoder
            layers: filters per layer
        ''' # Progressive Feature Unpooling # Last unpooling and match shape to input # The decoded image
self
x
init_weights