I have a generator that yields three variables. The first two variables are the two inputs to a two-input Keras model (functional API). I am using TF-Dataset to feed my model. Code is as follows:
train_dataset = tf.data.Dataset.from_generator(generator=make_generator_train,
args=[train_x_paths, train_y_int],
output_types=(tf.tuple((tf.float16, tf.float16)), tf.int8),
output_shapes=(tf.TensorShape([2]),
tf.TensorShape([1]))).batch(batch_size=batch_size)
I get a TypeError with this:
TypeError: If shallow structure is a sequence, input must also be a sequence. Input has type: <class 'tensorflow.python.framework.tensor_shape.TensorShape'>.