0

I want to use list of dataset as a input for .fit() function but it returns:

ValueError: Failed to find data adapter that can handle input: (<class 'list'> containing values of types {"<class 'tensorflow.python.data.ops.dataset_ops.PrefetchDataset'>"}), <class 'NoneType'>

I find same question Input multiple datasets to tensorflow model but the data I use is more than 100gb and it does not fit to RAM.

So I can not convert the prefetch data to normal tf tensor. What can I do?

techebTest
  • 67
  • 1
  • 8

1 Answers1

2

As per the documentation it only supports single tf.data instance.

Instead of providing multiple tf.data.Dataset instance you can combine them before using concatenate like below.

a = tf.data.Dataset.range(1, 4)  # ==> [ 1, 2, 3 ]
b = tf.data.Dataset.range(4, 8)  # ==> [ 4, 5, 6, 7 ]
ds = a.concatenate(b)