code: def __init__(
      self,
      n_layers,
      d_model,
      n_head,
      d_qkv,
      d_ff,
      ff_dropout,
      residual_dropout,
      attention_dropout,
      activation=PartitionedReLU,
  ):
      super().__init__()
      self.layers = nn.ModuleList(
          [
              PartitionedTransformerEncoderLayer(
                  d_model=d_model,
                  n_head=n_head,
                  d_qkv=d_qkv,
                  d_ff=d_ff,
                  ff_dropout=ff_dropout,
                  residual_dropout=residual_dropout,
                  attention_dropout=attention_dropout,
                  activation=activation(),
              )
              for i in range(n_layers)
          ]
      )
  
imports: import copy
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from stanza.models.constituency.positional_encoding import ConcatSinusoidalEncoding
label_desc: Use image node_id 1 to create a new PartitionedTransformerEncoder object from inherited base classes: nn with example: obj = PartitionedTransformerEncoder(n_layers, d_model, n_head, d_qkv, d_ff, ff_dropout, residual_dropout, attention_dropout, activation)