message: remove compat check for adagrad v2.
diff: @@ -20,16 +20,12 @@ from __future__ import print_function
  import numpy as np
  -from tensorflow.python.compat import compat
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.keras import backend_config
  from tensorflow.python.keras.optimizer_v2 import optimizer_v2
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  -from tensorflow.python.ops import math_ops
  -from tensorflow.python.ops import resource_variable_ops
  -from tensorflow.python.ops import state_ops
  from tensorflow.python.training import training_ops
  from tensorflow.python.util.tf_export import keras_export
  @@ -153,7 +149,6 @@ class Adagrad(optimizer_v2.OptimizerV2):
  or self._fallback_apply_state(var_device, var_dtype))
  acc = self.get_slot(var, 'accumulator')
  - if compat.forward_compatible(2019, 8, 20):
  return training_ops.resource_apply_adagrad_v2(
  var.handle,
  acc.handle,
  @@ -162,20 +157,12 @@ class Adagrad(optimizer_v2.OptimizerV2):
  grad,
  use_locking=self._use_locking)
  - acc_t = state_ops.assign_add(
  - acc, math_ops.square(grad), use_locking=self._use_locking)
  - var_update = state_ops.assign_sub(
  - var, coefficients['lr_t'] * grad /
  - (math_ops.sqrt(acc_t) + coefficients['epsilon']))
  - return var_update
  -
  def _resource_apply_sparse(self, grad, var, indices, apply_state=None):
  var_device, var_dtype = var.device, var.dtype.base_dtype
  coefficients = ((apply_state or {}).get((var_device, var_dtype))
  or self._fallback_apply_state(var_device, var_dtype))
  acc = self.get_slot(var, 'accumulator')
  - if compat.forward_compatible(2019, 8, 20):
  return training_ops.resource_sparse_apply_adagrad_v2(
  var.handle,
  acc.handle,
  @@ -184,15 +171,6 @@ class Adagrad(optimizer_v2.OptimizerV2):
  grad,
  indices,
  use_locking=self._use_locking)
  - with ops.control_dependencies([
  - resource_variable_ops.resource_scatter_add(acc.handle, indices,
  - math_ops.square(grad))
  - ]):
  - acc_t_slice = acc.sparse_read(indices)
  - var_update = resource_variable_ops.resource_scatter_add(
  - var.handle, indices, coefficients['neg_lr_t'] * grad /
  - (math_ops.sqrt(acc_t_slice) + coefficients['epsilon']))
  - return var_update
  def get_config(self):
  config = super(Adagrad, self).get_config()
  