code: def forward(
      self,
      x: Tensor,
      src: Tensor,
      mask: Optional[BoolTensor] = None,
      src_mask: Optional[BoolTensor] = None,
  ):
      if self.pre_ln:
          y = self.self_attn_layer_norm(x)
      else:
          y = x
      y = self.self_attention(y, mask=mask)
      y = self.dropout(y)
      x = y + x
      if not self.pre_ln:
          x = self.self_attn_layer_norm(x)
          y = x
      else:
          y = self.inter_attn_layer_norm(x)
      y = self.inter_attention(y, src, src_mask=src_mask)
      y = self.dropout(y)
      x = y + x
      if not self.pre_ln:
          x = self.inter_attn_layer_norm(x)
      x = self.ffn(x)
      return x
  
file_path: gluonts/src/gluonts/nursery/daf/tslib/nn/transformer.py
imports: from typing import Optional, List
  from collections import OrderedDict
  import warnings
  import torch
  from torch import Tensor, BoolTensor
  from torch import nn
  from .attention import SelfAttention, GroupSelfAttention, CompositeAttention, InterAttention
  from .activations import Swish
label_desc: Use image node_id 2 for calling the TransformerDecoderBlock obj's underlying member method code with example usage: obj.forward(x, src, mask, src_mask) and returns: x