tf.data with multiple inputs / outputs in Keras
For the application, such as pair text similarity , the input data is similar to: pair_1, pair_2 . In these problems, we usually have multiple input data. Previously, I implemented my models successfully: model.fit([pair_1, pair_2], labels, epochs=50) I decided to replace my input pipeline with tf.data API. To this end, I create a Dataset similar to: dataset = tf.data.Dataset.from_tensor_slices((pair_1, pair2, labels)) It compiles successfully but when start to train it throws the following exception: AttributeError: 'tuple' object has no attribute 'ndim' My Keras and Tensorflow version