code: def forward(
      self,
      prev_output_tokens,
      encoder_out=None,
      incremental_state=None,
      target_lengths=None,
      **kwargs,
  ):
      enc_mask = encoder_out["encoder_padding_mask"]
      enc_out = encoder_out["encoder_out"][0]
      in_len = enc_out.size(1)
  
      if incremental_state is not None:
          prev_output_tokens = prev_output_tokens[:, -1:, :]
      bsz, out_len, _ = prev_output_tokens.size()
  
      prenet_out = self.prenet(prev_output_tokens)
      (
          alstm_h,
          alstm_c,
          lstm_h,
          lstm_c,
          attn_w,
          attn_w_cum,
      ) = self._get_states(incremental_state, enc_out)
      attn_ctx = self._get_init_attn_c(enc_out, enc_mask)
  
      attn_out = enc_out.new_zeros(bsz, in_len, out_len)
      feat_out = enc_out.new_zeros(bsz, out_len, self.out_dim)
      eos_out = enc_out.new_zeros(bsz, out_len)
      for t in range(out_len):
          alstm_in = torch.cat((attn_ctx, prenet_out[:, t, :]), dim=1)
          alstm_h, alstm_c = self.attention_lstm(
              alstm_in, (alstm_h, alstm_c)
          )
  
          attn_state = attn_w.unsqueeze(1)
          if self.args.attention_use_cumprob:
              attn_state = torch.stack((attn_w, attn_w_cum), dim=1)
          attn_ctx, attn_w = self.attention(
              enc_out, enc_mask, alstm_h, attn_state
          )
          attn_w_cum = attn_w_cum + attn_w
          attn_out[:, :, t] = attn_w
  
          for i, cur_lstm in enumerate(self.lstm):
              if i == 0:
                  lstm_in = torch.cat((attn_ctx, alstm_h), dim=1)
              else:
                  lstm_in = torch.cat((attn_ctx, lstm_h[i - 1]), dim=1)
              lstm_h[i], lstm_c[i] = cur_lstm(
                  lstm_in, (lstm_h[i], lstm_c[i])
              )
  
          proj_in = torch.cat((attn_ctx, lstm_h[-1]), dim=1)
          feat_out[:, t, :] = self.feat_proj(proj_in)
          eos_out[:, t] = self.eos_proj(proj_in).squeeze(1)
      self.attention.clear_cache()
  
      self.set_incremental_state(incremental_state, "alstm_h", alstm_h)
      self.set_incremental_state(incremental_state, "alstm_c", alstm_c)
      self.set_incremental_state(incremental_state, "lstm_h", lstm_h)
      self.set_incremental_state(incremental_state, "lstm_c", lstm_c)
      self.set_incremental_state(incremental_state, "attn_w", attn_w)
      self.set_incremental_state(
          incremental_state, "attn_w_cum", attn_w_cum
      )
  
      post_feat_out = feat_out + self.postnet(feat_out)
      eos_out = eos_out.view(bsz, out_len, 1)
      return (
          post_feat_out,
          eos_out,
          {"attn": attn_out, "feature_out": feat_out},
      )
  
imports: import logging
  import torch
  from torch import nn
  from torch.nn import functional
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.modules import LSTMCellWithZoneOut, LocationAttention
label_desc: Use image node_id 4 for calling the Tacotron2Decoder obj's underlying member method code with example usage: obj.forward(prev_output_tokens, encoder_out, incremental_state, target_lengths) and returns: post_feat_out,  eos_out,  dict