title: ValueError: Unexpected result of `predict_function` (Empty batch_outputs). Please use `Model.compile(..., run_eagerly=True)`
body: <p>I have this model :</p>
  <pre><code># Set random seed
  tf.random.set_seed(42)
  
  # Create some regression data
  X_regression = np.expand_dims(np.arange(0, 1000, 5), axis=0)
  y_regression = np.expand_dims(np.arange(100, 1100, 5), axis=0)
  
  # Split it into training and test sets
  X_reg_train = X_regression[:150]
  X_reg_test = X_regression[150:]
  y_reg_train = y_regression[:150]
  y_reg_test = y_regression[150:]
  </code></pre>
  <pre><code># Setup random seed
  tf.random.set_seed(42)
  
  # Recreate the model
  model_3 = tf.keras.Sequential([
    tf.keras.layers.Dense(100),
    tf.keras.layers.Dense(10),
    tf.keras.layers.Dense(1)
  ])
  
  # Change the loss and metrics of our compiled model
  model_3.compile(loss=tf.keras.losses.mae, # change the loss function to be regression-specific
                  optimizer=tf.keras.optimizers.Adam(learning_rate=0.01),
                  metrics=['mae']) # change the metric to be regression-specific
  
  # Fit the recompiled model
  model_3.fit(X_reg_train, y_reg_train, epochs=100)
  </code></pre>
  <p>To begin with, the model does not train well
  <a href="https://i.stack.imgur.com/bOXvO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bOXvO.png" alt="enter image description here" /></a></p>
  <p>To add on, when I try to predict using that model, I get the following error :</p>
  <p><a href="https://i.stack.imgur.com/Slswy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Slswy.png" alt="enter image description here" /></a></p>
  <p>Why am I getting the above error and how can I fix it?</p>