message: TFTS: Switch more variables to ResourceVariables to avoid race conditions
  The LSTM example test was a bit flaky.
diff: @@ -73,7 +73,10 @@ class _TimeSeriesRegressionHead(head_lib._Head): # pylint:disable=protected-acc
  def _train_ops(self, features):
  """Add training ops to the graph."""
  - with variable_scope.variable_scope("model"):
  + with variable_scope.variable_scope(
  + "model",
  + # Use ResourceVariables to avoid race conditions.
  + use_resource=True):
  model_outputs = self.state_manager.define_loss(
  self.model, features, estimator_lib.ModeKeys.TRAIN)
  @@ -107,7 +110,7 @@ class _TimeSeriesRegressionHead(head_lib._Head): # pylint:disable=protected-acc
  def _evaluate_ops(self, features):
  """Add ops for evaluation (aka filtering) to the graph."""
  - with variable_scope.variable_scope("model"):
  + with variable_scope.variable_scope("model", use_resource=True):
  model_outputs = self.state_manager.define_loss(
  self.model, features, estimator_lib.ModeKeys.EVAL)
  metrics = {}
  @@ -128,7 +131,7 @@ class _TimeSeriesRegressionHead(head_lib._Head): # pylint:disable=protected-acc
  def _predict_ops(self, features):
  """Add ops for prediction to the graph."""
  - with variable_scope.variable_scope("model"):
  + with variable_scope.variable_scope("model", use_resource=True):
  prediction = self.model.predict(features=features)
  prediction[feature_keys.PredictionResults.TIMES] = features[
  feature_keys.PredictionFeatures.TIMES]
  @@ -137,7 +140,7 @@ class _TimeSeriesRegressionHead(head_lib._Head): # pylint:disable=protected-acc
  def _serving_ops(self, features):
  """Add ops for serving to the graph."""
  - with variable_scope.variable_scope("model"):
  + with variable_scope.variable_scope("model", use_resource=True):
  prediction_outputs = self.model.predict(features=features)
  with variable_scope.variable_scope("model", reuse=True):
  filtering_outputs = self.state_manager.define_loss(
  