class_docstr: The Seq2Edits model. See file docstring.
code: def __init__(self, *args, **kwargs):
      super(TransformerSeq2edits, self).__init__(*args, **kwargs)
      self.attention_weights = {}  # For visualizing attention heads.
      self._encoder_function = transformer_layers.transformer_encoder
      self._decoder_function = transformer.transformer_decoder
      self._prepare_encoder_fn = (
          transformer_layers.transformer_prepare_encoder
      )
      self._prepare_decoder_fn = transformer.transformer_prepare_decoder
      self.loss_num = {}
      self.logits = {}
      self.loss_den = None
  
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 1 to create a new TransformerSeq2edits object from inherited base classes: t2t_model with example: obj = TransformerSeq2edits()