I'm using for the first time tf.data.dataset to feed a model. I look on some exemple but don't find how to use multi-inputs on a 2 heads model.
My first input as shape[nb_samples, nb_timesteps, nb_features] to feed LSTM first head. My second input as shape[nb_samples, nb_features] to feed dense second head. The output is a sequence of 8 values ex:
input_1 = [14000, 10, 5]
input_2 = [14000, 6]
output = [14000, 8]
now how I turn my numpy inputs to dataset and pass it to the model
input_1 = tf.data.Dataset.from_tensor_slices((X))
input_2= tf.data.Dataset.from_tensor_slices((Xphysio))
output = tf.data.Dataset.from_tensor_slices((y))
combined_dataset = tf.data.Dataset.zip(((inputs_hydro, inputs_static), output))
history = model.fit(combined_dataset)
but at this stage, how I must "split" my input to direct it to the good head model?? Here an simple exemple of the model and how I direct my input inside it...
tensor_input1 = Input(shape=(10, 5))
tensor_input2 = Input(shape=(6, ))
x = LSTM(100, return_sequences=False)(tensor_input1)
x = Dropout(rate = params['dropout1'])(x)
x = Dense(50)(x)
merge = concatenate([x, tensor_input2])
x = Dense(50)(merge)
x = Dropout(rate = params['dropout1'])(x)
output = Dense(8)(x)
model = Model(inputs=[tensor_input1, tensor_input2], outputs=output)
If I understand, while using tf.data.dataset it is not require to specify the shape of the inputs like Input(shape[.....]).
thank for your help, and sorry if my english is not top, I'm working on it too