function buildGRUModel(inputShape, dropout, recurrentDropout) {
  // TODO(cais): Recurrent dropout is currently not fully working.
  //   Make it work and add a flag to train-rnn.js.
  const model = tf.sequential();
  const rnnUnits = 32;
  model.add(tf.layers.gru({
    units: rnnUnits,
    inputShape,
    dropout: dropout || 0,
    recurrentDropout: recurrentDropout || 0
  }));
  model.add(tf.layers.dense({units: 1}));
  return model;
}
Build a GRU model for the temperature-prediction problem.

@param {tf.Shape} inputShape Input shape (without the batch dimenson).
@param {number} dropout Optional input dropout rate
@param {number} recurrentDropout Optional recurrent dropout rate.
@returns {tf.LayersModel} A TensorFlow.js GRU model.