import tensorflow as tf

        'target_labels': [[1, 2, 3, 4], [2, 3, 4, 5]],
        'target_paddings': [[1, 1, 1, 1], [0, 0, 1, 1]],
        'norm_wer_errors': [[1], [0]],
        'norm_wer_words': [[0], [4]],
    }
    metrics_dict = mdl.CreateDecoderMetrics()
    mdl.PostProcessDecodeOut(fake_dec_out, metrics_dict)

    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(
