I want to train a Keras model with multiple inputs. I want to use the first input for training the model, but the second and the third inputs are variables which must be used during the training of the first input. I could not use the tf.Variable
for using the second and the third inputs which are fixed during the training because it showed the error: You must feed a placeholder
. So, I want to feed them using tf.keras
. I changed the shape of the second and the third inputs to be similar to the first one. Then, I concatenate them using:
inputs = tf.keras.layers.concatenate([data, masks_rep, ind_rep], axis=2)
Then, for retrieving them in the model, I wrote:
Inputs_t = tf.keras.Input(shape=(max_length, 3*charset_length))
x, m_k_expand, ind_k_expand = tf.split(Inputs_t, num_or_size_splits=3, axis=1)
But it changes the dimensions of the layers from charset_length
to 3*charset_length
. How can I solve this problem?