class_docstr: Nonautoregressive Transformer from https://arxiv.org/abs/1805.11063.
class_docstr_tok: ["Nonautoregressive","Transformer","from","https",":","\/\/arxiv.org\/abs\/1805.11063","."]
code: def __init__(self, *args, **kwargs):
      super(TransformerNAT, self).__init__(*args, **kwargs)
      means, ema_means, ema_count = init_vq_bottleneck(
          2**self._hparams.bottleneck_bits, self._hparams.hidden_size
      )
      self._hparams.means = means
      self._hparams.ema_means = ema_means
      self._hparams.ema_count = ema_count
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  from six.moves import range
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import beam_search
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 1 to create a new TransformerNAT object from inherited base classes: t2t_model with example: obj = TransformerNAT()