docs: def decode(self, targets, encoder_outputs, attention_bias):
      """Generate logits for each value in the target sequence.
  
      Args:
        targets: target values for the output sequence.
          int tensor with shape [batch_size, target_length]
        encoder_outputs: continuous representation of input sequence.
          float tensor with shape [batch_size, input_length, hidden_size]
        attention_bias: float tensor with shape [batch_size, 1, 1, input_length]
  
      Returns:
        float32 tensor with shape [batch_size, target_length, vocab_size]
      """
      with tf.name_scope("decode"):
        # Prepare inputs to decoder layers by shifting targets, adding positional
        # encoding and applying dropout.
        decoder_inputs = self.embedding_softmax_layer(targets)
        with tf.name_scope("shift_targets"):
          # Shift targets to the right, and remove the last element
          decoder_inputs = tf.pad(
              decoder_inputs, [[0, 0], [1, 0], [0, 0]])[:, :-1, :]
        with tf.name_scope("add_pos_encoding"):
          length = tf.shape(decoder_inputs)[1]
          decoder_inputs += model_utils.get_position_encoding(
              length, self.params.hidden_size)
        if self.train:
          mlperf_log.transformer_print(
              key=mlperf_log.MODEL_HP_LAYER_POSTPROCESS_DROPOUT,
              value=self.params.layer_postprocess_dropout)
          decoder_inputs = tf.nn.dropout(
              decoder_inputs, 1 - self.params.layer_postprocess_dropout)
  
        # Run values
        decoder_self_attention_bias = model_utils.get_decoder_self_attention_bias(
            length)
        outputs = self.decoder_stack(
            decoder_inputs, encoder_outputs, decoder_self_attention_bias,
            attention_bias)
        logits = self.embedding_softmax_layer.linear(outputs)
        return logits