title: Keras Tuner throws InvalidArgumentError
body: <p>I'm trying to use Keras Tuner to test different configurations and hyperparameters of my neural net <br>
  I have code that works when running outside the tuner (but I have to run it with eager execution disabled),<br> but inside the tuner, I get an exception thrown. I'm new to using more complicated neural networks, so I'm trying to wade through the documentation but I get lost sometimes.<br>Hers' the custom_loss and model plus tuner code</p>
  
  <pre><code>def custom_loss(yardline):
  yardline=K.cumsum(yardline)
  def loss(y_true, y_pred):
      y_true=K.cumsum(y_true)
      y_pred= y_pred*yardline
      new_total_prob= K.sum(y_pred)
      inverse_prob=K.pow(new_total_prob+K.epsilon(), -1)
      y_pred= y_pred*inverse_prob
      cdf_pred= K.cumsum(y_pred)
      return K.mean(K.square(y_true-cdf_pred))
  return loss
  </code></pre>
  
  <p>Here's the model</p>
  
  <pre><code>def build_model(hp):
  input_layer= Input(179,)
  yardline=Input(199,)
  x=Dense(32)(input_layer)
  for i in range(hp.Int('num_layers', 2,4, default=4)):
      x= Dense(units=hp.Int('units_' + str(i),
                                          min_value=32,
                                          max_value=512,
                                          step=32),
                             activation='relu')(x)
      if (i==3 or i==5):
             x=Dropout(hp.Choice('dropout_'+ str(i),[0.15,0.25]))(x)
  output_layer = Dense(199, activation='softmax')(x)
  model=Model(inputs=[input_layer, yardline], outputs=output_layer)
  model.compile(optimizer='adam',loss=custom_loss(yardline), metrics=['accuracy'])
  return model
  </code></pre>
  
  <p>Here's the tuner code</p>
  
  <pre><code>tuner = kt.Hyperband(
      hypermodel=build_model,
      objective='val_accuracy',
      max_epochs=5,
      factor=2,
      hyperband_iterations=3,
      distribution_strategy=tf.distribute.MirroredStrategy(),
      directory='.',
      project_name='project')
  tuner.search([X_train,yardline_train],y_train,
           epochs=5, batch_size=43,
           validation_data=([X_val, yardline_val],y_val))
  </code></pre>
  
  <p>Any help appreciated
  The error says in particular Invalid Argument Error: and expects data into <code>input_2</code>...
  <br> Again just seems strange since it ran when I loaded model without the tuner</p>