code: def __init__(
      self, n_head, d_model, d_head, d_inner, dropout, **kwargs
  ):
      super(RelPartialLearnableDecoderLayer, self).__init__()
  
      self.dec_attn = RelPartialLearnableMultiHeadAttn(
          n_head, d_model, d_head, dropout, **kwargs
      )
  
      if kwargs.get("moe") is False:
          self.pos_ff = PositionwiseFF(
              d_model,
              d_inner,
              dropout,
              pre_lnorm=kwargs.get("pre_lnorm"),
          )
      else:
          self.pos_ff = CustomizedMoEPositionwiseFF(
              d_model,
              d_inner,
              dropout,
              pre_lnorm=kwargs.get("pre_lnorm"),
              moe_num_expert=kwargs.get("moe_num_expert"),
              moe_top_k=kwargs.get("moe_top_k"),
          )
  
imports: import sys
  import math
  import functools
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from proj_adaptive_softmax import ProjectedAdaptiveLogSoftmax, Projection
  from log_uniform_sampler import LogUniformSampler, sample_logits
  from fmoe import FMoETransformerMLP
label_desc: Use image node_id 1 to create a new RelPartialLearnableDecoderLayer object from inherited base classes: nn with example: obj = RelPartialLearnableDecoderLayer(n_head, d_model, d_head, d_inner, dropout)