class_docstr: Tests for get_gradient method.
  
  Since get_gradients must run in graph mode, the method is tested within
  the Estimator framework.
class_docstr_tok: ["Tests","for","get_gradient","method",".","Since","get_gradients","must","run","in","graph","mode",",","the","method","is","tested","within","the","Estimator","framework","."]
docstr: Tests that DP optimizers work with tf.estimator.
code: def testBaselineNoNoise(
      self, optimizer_class, num_microbatches, requires_varlist
  ):
      """Tests that DP optimizers work with tf.estimator."""
  
      linear_regressor = tf_estimator.Estimator(
          model_fn=self._make_linear_model_fn(
              optimizer_class=optimizer_class,
              l2_norm_clip=100.0,
              noise_multiplier=0.0,
              num_microbatches=num_microbatches,
              requires_varlist=requires_varlist,
              learning_rate=0.05,
          )
      )
  
      true_weights = np.array([[-5], [4], [3], [2]]).astype(np.float32)
      true_bias = np.array([6.0]).astype(np.float32)
      train_data = np.random.normal(scale=3.0, size=(1000, 4)).astype(
          np.float32
      )
  
      train_labels = (
          np.matmul(train_data, true_weights)
          + true_bias
          + np.random.normal(scale=0.0, size=(1000, 1)).astype(
              np.float32
          )
      )
  
      def train_input_fn():
          return tf.data.Dataset.from_tensor_slices(
              (train_data, train_labels)
          ).batch(8)
  
      linear_regressor.train(input_fn=train_input_fn, steps=125)
  
      self.assertAllClose(
          linear_regressor.get_variable_value("dense/kernel"),
          true_weights,
          atol=0.05,
      )
      self.assertAllClose(
          linear_regressor.get_variable_value("dense/bias"),
          true_bias,
          atol=0.05,
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras_vectorized
label_desc: Use image node_id 2 for calling the DPOptimizerGetGradientsTest obj's underlying member method code with example usage: obj.testBaselineNoNoise(optimizer_class, num_microbatches, requires_varlist) and returns: tf