Answers for "add fully connected layers at encoder of autoencoder"

0

add fully connected layers at encoder of autoencoder

def fc(enco_1, enco_2):
    flat_1 = Flatten()(enco_1)
    flat_2 = Flatten()(enco_2)
    flat = Concatenate()([enco_1, enco_2])
    den = Dense(128, activation='relu')(flat)
    out = Dense(num_classes, activation='softmax')(den)
    return out

encode_1 = encoder_1(input_img_1)
encode_2 = encoder_2(input_img_2)

full_model = Model([input_img_1, input_img_2], fc(encode_1, encode_2))
Posted by: Guest on March-12-2021

Browse Popular Code Answers by Language