zoo/autoencoder/autoencoder_c.py
def decoder(self, x, **metaparameters):
        ''' Construct the Decoder
            x     : input to the decoder
            layers: number of nodes per layer
        '''
        layers = metaparameters['layers']

        # Progressive Unit Unpooling
        for _ in range(len(layers)-1, 0, -1):
            n_nodes = layers[_]['n_nodes']
            x = self.Dense(x, n_nodes)
            x = self.BatchNormalization(x)
            x = self.ReLU(x)

        # Last unpooling and match shape to input
        units = self.input_shape[0] * self.input_shape[1] * self.input_shape[2]
        print("INPUT", self.input_shape, "UNITS", units)
        x = self.Dense(x, units, activation='sigmoid')

        # Reshape back into an image
        x = Reshape(self.input_shape)(x)

        # The decoded image
        return x
 Construct the Decoder
            x     : input to the decoder
            layers: number of nodes per layer
        
Construct the Decoder
x     : input to the decoder
layers: number of nodes per layer
Construct the Decoder x : input to the decoder layers : number of nodes per layer
def decoder(self, x, **metaparameters):
        layers = metaparameters['layers']
        for _ in range(len(layers)-1, 0, -1):
            n_nodes = layers[_]['n_nodes']
            x = self.Dense(x, n_nodes)
            x = self.BatchNormalization(x)
            x = self.ReLU(x)
        units = self.input_shape[0] * self.input_shape[1] * self.input_shape[2]
        print("INPUT", self.input_shape, "UNITS", units)
        x = self.Dense(x, units, activation='sigmoid')
        x = Reshape(self.input_shape)(x)
        return x
def decoder ( self , x , ** metaparameters ) : layers = metaparameters [ 'layers' ] for _ in range ( len ( layers ) - 1 , 0 , - 1 ) : n_nodes = layers [ _ ] [ 'n_nodes' ] x = self . Dense ( x , n_nodes ) x = self . BatchNormalization ( x ) x = self . ReLU ( x ) units = self . input_shape [ 0 ] * self . input_shape [ 1 ] * self . input_shape [ 2 ] print ( "INPUT" , self . input_shape , "UNITS" , units ) x = self . Dense ( x , units , activation = 'sigmoid' ) x = Reshape ( self . input_shape ) ( x ) return x
Construct the Decoder
x     : input to the decoder
layers: number of nodes per layer
Construct the Decoder x : input to the decoder layers : number of nodes per layer
''' Construct the Decoder
            x     : input to the decoder
            layers: number of nodes per layer
        ''' # Progressive Unit Unpooling # Last unpooling and match shape to input # Reshape back into an image # The decoded image
self
x