I have two pre-trained models and I want to concatenate them. model 1: model1.png
model 2: model2.png
and the result of concatenation that I want is :merged.png
here is the code put the weights are lost as i create the model from scratch.
i want some thing like that but without weights lose.
input_layer1= Input(shape=(20))
x=Dense(32,'relu')(input_layer)
x=Dense(16,'relu')(x)
out1=Dense(1,'sigmoid')(x)
input_layer2=Concatenate()([input_layer1,out1])
x=Dense(256,'relu')(input_layer2)
x=Dense(128,'relu')(x)
x=Dense(64,'relu')(x)
x=Dense(32,'relu')(x)
out2=Dense(y_train2.shape[1],'softmax')(x)
model = Model(inputs=input_layer1, outputs=out2)
