class_docstr: The Seq2Edits model. See file docstring.
code: def _prediction_cascade(
      self,
      hparams,
      features,
      losses,
      loss_mask,
      nonpadding,
      encoder_decoder_attention_bias,
      encoder_output,
      decoder_output,
  ):
      if hparams.use_error_tags:
          (
              decoder_output,
              error_tag_logits,
              error_tag_loss,
          ) = transformer_error_tag_prediction_layer(
              decoder_output, hparams, features, loss_mask=loss_mask
          )
          self.logits["targets_error_tag"] = error_tag_logits
          self.loss_num["targets_error_tag"] = error_tag_loss
          decoder_output = transformer_between_predictions_layer(
              decoder_output,
              hparams,
              name="post_error_tag",
              nonpadding=nonpadding,
              losses=losses,
          )
  
      pos_feat_names = []
      if hparams.use_start_token:
          pos_feat_names.append("targets_start_token")
      pos_feat_names.append("targets_end_token")
      for pos_feat_name in pos_feat_names:
          (
              decoder_output,
              pos_logits,
              pos_loss,
          ) = transformer_pointer_prediction_layer(
              pos_feat_name,
              encoder_output,
              decoder_output,
              encoder_decoder_attention_bias,
              hparams,
              features,
              loss_mask=loss_mask,
          )
          self.logits[pos_feat_name] = pos_logits
          self.loss_num[pos_feat_name] = pos_loss
          decoder_output = transformer_between_predictions_layer(
              decoder_output,
              hparams,
              name="post_%s" % pos_feat_name,
              nonpadding=nonpadding,
              losses=losses,
          )
      return decoder_output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import transformer_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the TransformerSeq2edits obj's underlying member method code with example usage: obj._prediction_cascade(hparams, features, losses, loss_mask, nonpadding, encoder_decoder_attention_bias, encoder_output, decoder_output) and returns: decoder_output