class_docstr: A layer unit in encoder. Combines multihead self attention and feed forward.
class_docstr_tok: ["A","layer","unit","in","encoder",".","Combines","multihead","self","attention","and","feed","forward","."]
code: def __init__(
      self,
      attention: Module,
      dropout: float,
      layer_norm_first: bool,
      feed_forward: Module,
  ):
      super().__init__()
      self.attention = attention
      self.dropout = nn.Dropout(dropout)
      self.layer_norm = nn.LayerNorm(attention.embed_dim)
      self.layer_norm_first = layer_norm_first
      self.feed_forward = feed_forward
      self.final_layer_norm = nn.LayerNorm(attention.embed_dim)
  
imports: import logging
  from typing import List, Optional, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import Module, Parameter
  from .wavlm_attention import WavLMSelfAttention
label_desc: Use image node_id 1 to create a new EncoderLayer object from inherited base classes: Module with example: obj = EncoderLayer(attention, dropout, layer_norm_first, feed_forward)