I'm trying to solve a problem where I initially need to get 2 inputs, pass each of them through layers of autoencoders and then connect everything to a layer that will connect to both of the autoencoder outputs.
This is how the model should look at the end
I've already created the autoencoder layers and saved them. I'm having trouble with finding out how to connect both of the outputs of the encoded data to one layer. An advice would be very appreciated.
edit:
I've been looking into the concatenate layer, and it seems like it should do the job. But, I still can't figure out how to connect the final layers of the autoencoders to the concatenae layer.
The layers of autoencoders are shaped like this:
input_1 (InputLayer) [(None, 85)]
_________________________________________________________________
dense (Dense) (None, 54)
_________________________________________________________________
dense_2 (Dense) (None, 36)
And the forming of the concatenate layer:
connector = keras.layers.Concatenate()([autoencoder1.layers[2], autoencoder2.layers[2]])
autoencoder1, autoencoder2 are both the loaded autoencoder model layers.
It throws the following error:
TypeError: 'NoneType' object is not subscriptable