def MiscZeroState(self, theta, encoder_outputs, target_ids, bs):
    """Returns initial state for other miscellaneous states, if any."""
    del encoder_outputs
    misc_zero_state = py_utils.NestedMap()
    p = self.params
    if self._max_label_prob > 0:
      misc_zero_state.prev_predicted_ids = tf.reshape(target_ids[:, 0], [bs])
      step = tf.cast(theta.global_step, tf.float32)
      sampling_p = (step - p.prob_decay_start_step) / self._decay_interval
      groundtruth_p = 1 - (self._max_label_prob * sampling_p)
      groundtruth_p = tf.maximum(groundtruth_p, p.min_ground_truth_prob)
      groundtruth_p = tf.minimum(groundtruth_p, 1.0)
      summary_utils.scalar('ground_truth_sampling_probability', groundtruth_p)
      misc_zero_state.groundtruth_p = groundtruth_p
    return misc_zero_state
Returns initial state for other miscellaneous states, if any.
contrib/lingvo-patched-decoder.py