title: Why is ReLU used in regression with Neural Networks?
body: <p>I am following the official TensorFlow with Keras tutorial and I got stuck here: <a href="https://www.tensorflow.org/tutorials/keras/basic_regression#create_the_model" rel="noreferrer">Predict house prices: regression - Create the model</a></p>
  
  <p>Why is an activation function used for a task where a continuous value is predicted?</p>
  
  <p>The code is:</p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>def build_model():
      model = keras.Sequential([
          keras.layers.Dense(64, activation=tf.nn.relu, 
                     input_shape=(train_data.shape[1],)),
          keras.layers.Dense(64, activation=tf.nn.relu),
          keras.layers.Dense(1)
      ])
  
      optimizer = tf.train.RMSPropOptimizer(0.001)
  
      model.compile(loss='mse', optimizer=optimizer, metrics=['mae'])
      return model
  </code></pre>