codes/Python/p03-neural-networks/3-autoencoders/autoencoders.py
def create_model(features):
    '''
    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    '''
    with C.layers.default_options(init = C.layers.glorot_uniform(), activation = C.ops.relu):

            # Hidden input dimention
            hidden_dim = 64

            # Encoder
            encoder_out = C.layers.Dense(hidden_dim, activation=C.relu)(features)
            encoder_out = C.layers.Dense(int(hidden_dim / 2.0), activation=C.relu)(encoder_out)

            # Decoder
            decoder_out = C.layers.Dense(int(hidden_dim / 2.0), activation=C.relu)(encoder_out)
            decoder_out = C.layers.Dense(hidden_dim, activation=C.relu)(decoder_out)
            decoder_out = C.layers.Dense(feature_dim, activation=C.sigmoid)(decoder_out)

            return decoder_out

    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    
This function creates the architecture model.
This function creates the architecture model .
def create_model(features):
    with C.layers.default_options(init = C.layers.glorot_uniform(), activation = C.ops.relu):
            hidden_dim = 64
            encoder_out = C.layers.Dense(hidden_dim, activation=C.relu)(features)
            encoder_out = C.layers.Dense(int(hidden_dim / 2.0), activation=C.relu)(encoder_out)
            decoder_out = C.layers.Dense(int(hidden_dim / 2.0), activation=C.relu)(encoder_out)
            decoder_out = C.layers.Dense(hidden_dim, activation=C.relu)(decoder_out)
            decoder_out = C.layers.Dense(feature_dim, activation=C.sigmoid)(decoder_out)
            return decoder_out
def create_model ( features ) : with C . layers . default_options ( init = C . layers . glorot_uniform ( ) , activation = C . ops . relu ) : hidden_dim = 64 encoder_out = C . layers . Dense ( hidden_dim , activation = C . relu ) ( features ) encoder_out = C . layers . Dense ( int ( hidden_dim / 2.0 ) , activation = C . relu ) ( encoder_out ) decoder_out = C . layers . Dense ( int ( hidden_dim / 2.0 ) , activation = C . relu ) ( encoder_out ) decoder_out = C . layers . Dense ( hidden_dim , activation = C . relu ) ( decoder_out ) decoder_out = C . layers . Dense ( feature_dim , activation = C . sigmoid ) ( decoder_out ) return decoder_out
This function creates the architecture model.
This function creates the architecture model .
'''
    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    ''' # Hidden input dimention # Encoder # Decoder
The output of the network which its dimentionality is num_classes.
The output of the network which its dimentionality is num_classes .
features
The input features.
The input features .