import tensorflow as tf


    self.assertEqual(1 + 0, metrics_dict['wer'].total_value)
    self.assertEqual(0 + 4, metrics_dict['wer'].total_weight)
    self.assertEqual(1 + 0, metrics_dict['norm_wer'].total_value)
    self.assertEqual(0 + 4, metrics_dict['norm_wer'].total_weight)

  def testBProp(self):
    with self.session(use_gpu=False):
      tf.set_random_seed(93820985)
      p = self._testParams()
      mdl = p.Instantiate()
      mdl.FPropDefaultTheta()
      mdl.BProp()
      tf.global_variables_initializer().run()
      test_utils.CompareToGoldenSingleFloat(self, 4.472597, mdl.loss.eval())
      mdl.train_op.run()

  def testBPropSmoothDecay(self):
    with self.session(use_gpu=False):
      tf.set_random_seed(93820985)
      p = self._testParams()
      p.train.lr_schedule = (
          schedule.ContinuousLearningRateSchedule.Params().Set(
              start_step=350000, half_life_steps=45000))
      mdl = p.Instantiate()
      mdl.FPropDefaultTheta()
