I made a model that receives two input. When I fit the model with two numpy array it works. Here's an example:
model.fit(x=[image_input, other_features], y = y, epochs=epochs)
However, my problem is that other_features
is a numpy array and image_input
is loaded with keras using tf.keras.preprocessing.image_dataset_from_directory
. The problem I face is:
- how to give y correctly from the
image_input
? when I trained the model with only one inputimage_input
,y
is packed inside it so I didn't have to specify it in another parameters. - how to put a
BatchDataset
withnumpy.array
? when I did it anyway I received the error:
ValueError: Failed to find data adapter that can handle input: (<class 'list'> containing values of types {"<class 'tensorflow.python.data.ops.dataset_ops.BatchDataset'>", "<class 'numpy.ndarray'>"}), <class 'NoneType'>