title: tensorflow keras fit, input validation data (data, (target1,target2)) ,got error :'expected no data, but got:'
body: <p>Build a subclassed model with multiple outputs, use tensorflow datasets as input. Custom defined datasets.</p>
  
  <p>Use keras fit to train model.</p>
  
  <p>When i only use train dataset, it could run. But once i use same type datasets as validation input, it goes wrong like:
       'Error when checking model target: expected no data, but got:'</p>
  
  <p>Data type is like 'tuple(data, (target[0], target[1]))'</p>
  
  <p>tensorflow-gpu==1.12, tensorflow.keras</p>
  
  <p>Wrong information    </p>
  
  <pre><code>File "/home/god/anaconda3/envs/tensorflow_n/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1574, in fit
  steps=validation_steps)    
  
  File "/home/god/anaconda3/envs/tensorflow_n/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 992, in _standardize_user_data
  class_weight, batch_size)
  
  File "/home/god/anaconda3/envs/tensorflow_n/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1154, in _standardize_weights
  exception_prefix='target')
  
  File "/home/god/anaconda3/envs/tensorflow_n/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_utils.py", line 257, in standardize_input_data
  'expected no data, but got:', data)
  
  ValueError: ('Error when checking model target: expected no data, but got:', (&lt;tf.Tensor 'IteratorGetNext_1:1' shape=(16, 16, 513) dtype=float32&gt;, &lt;tf.Tensor 'IteratorGetNext_1:2' shape=(16, 16, 513) dtype=float32&gt;))
  </code></pre>
  
  <p>simplification code cause same error</p>
  
  <pre><code>import tensorflow as tf
  
  
  class Model(tf.keras.Model):
      def __init__(self):
          super().__init__()
          self.dense1 = tf.keras.layers.Dense(units=16)
          self.dense2 = tf.keras.layers.Dense(units=16)
  
      def compute_output_shape(self, input_shape):
          return input_shape, input_shape
  
      def call(self, inputs, training=None, mask=None):
          out1 = self.dense1(inputs)
          out2 = self.dense2(inputs)
          return out1, out2
  
  
  train_dataset = tf.data.Dataset.from_tensor_slices(
      (tf.constant(0., shape=[1024, 16]), (tf.constant(0., shape=[1024, 16]), tf.constant(0., shape=[1024, 16])))).repeat().batch(32)
  
  valid_dataset = tf.data.Dataset.from_tensor_slices(
      (tf.constant(0., shape=[128, 16]), (tf.constant(0., shape=[128, 16]), tf.constant(0., shape=[128, 16])))).repeat(1).batch(32)
  
  model = Model()
  model.compile(
      optimizer=tf.train.AdamOptimizer(learning_rate=1e-4),
      loss=[tf.keras.losses.mse, tf.keras.losses.mse],
      loss_weights=[1, 1]
  )
  model.fit(
      train_dataset,
      validation_data=valid_dataset,
      epochs=10,
      steps_per_epoch=30,
      validation_steps=4,
  )
  </code></pre>