Reforming data for Keras within the model

Viewed 13

i am looking into building an autocoder with multiple inputs with keras.

One step requires a "reshape" of the data. I put reshape in apostrophe because it is not the function that I need.

I need the following scenario:

My encoder ends with m nodes (lets say a simple mx1 vector is the output). Before going to the decoder part I need for training purposes an additional n dim input.

The goal is now to transform the data into a mxn shape where the first m value is always the mx1 vector and the 4th value is the ith value of the additional input.

encoder_output = layers.Dense(3,activation="relu")(x)
#transformation = ???(encoder_output)
decoder_input = transformation

I have tried layers.Permute() && layers.concatenate([x, input]) but it doesn't work for dimension reasons.

Thanks in advance!

0 Answers
Related