title: Tensorflow | ValueError: Failed to find data adapter that can handle input: <class 'numpy.ndarray'>
body: <p>I'm doing some code with Tensorflow and I'm facing this issue, as input I have two lists per sample and as output I have an encoded list of classes.</p>
  <p>For example:</p>
  <pre><code>(raw) Values[0]: [[11.42, 10.09, 6.7], [7.52, 6.18, 2.11]]
  (encoded) Targets[0]: [2, 3, 4, 8, 1, 5, 16, 6, 1, 7]
  </code></pre>
  <p>As in the example:</p>
  <pre><code>input_shape = 6000 samples x 2 lists/sample x 3 items/list
  output_shape = 6000 samples x 10 items/sample
  </code></pre>
  <p>This is my first time dealing with multiple lists as input, and the problem here is that both lists contain important information for the model and that I can't just merge them, because they represent different states of the input data.</p>
  <p>What would you do in this case? Maybe there is a way of merging the lists while keeping the information that both <code>lists</code> were initialy two different lists.</p>
  <p>Here is the full traceback:</p>
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-79-d859259762d2&gt; in &lt;module&gt;
  ----&gt; 1 model.fit(x=values, y=target_tokenized)
  
  ~/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in _method_wrapper(self, *args, **kwargs)
      106   def _method_wrapper(self, *args, **kwargs):
      107     if not self._in_multi_worker_mode():  # pylint: disable=protected-access
  --&gt; 108       return method(self, *args, **kwargs)
      109 
      110     # Running inside `run_distribute_coordinator` already.
  
  ~/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
     1061           use_multiprocessing=use_multiprocessing,
     1062           model=self,
  -&gt; 1063           steps_per_execution=self._steps_per_execution)
     1064 
     1065       # Container that configures and calls `tf.keras.Callback`s.
  
  ~/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/data_adapter.py in __init__(self, x, y, sample_weight, batch_size, steps_per_epoch, initial_epoch, epochs, shuffle, class_weight, max_queue_size, workers, use_multiprocessing, model, steps_per_execution)
     1102       self._steps_per_execution_value = steps_per_execution.numpy().item()
     1103 
  -&gt; 1104     adapter_cls = select_data_adapter(x, y)
     1105     self._adapter = adapter_cls(
     1106         x,
  
  ~/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/data_adapter.py in select_data_adapter(x, y)
      969         &quot;Failed to find data adapter that can handle &quot;
      970         &quot;input: {}, {}&quot;.format(
  --&gt; 971             _type_name(x), _type_name(y)))
      972   elif len(adapter_cls) &gt; 1:
      973     raise RuntimeError(
  
  ValueError: Failed to find data adapter that can handle input: &lt;class 'numpy.ndarray'&gt;, (&lt;class 'list'&gt; containing values of types {'(&lt;class \'list\'&gt; containing values of types {&quot;&lt;class \'int\'&gt;&quot;})'})
  </code></pre>