src/transformers/models/table_transformer/modeling_table_transformer.py/TableTransformerEncoderLayer/__init__
class TableTransformerEncoderLayer:    def __init__(self, config: TableTransformerConfig):
        super().__init__()
        self.embed_dim = config.d_model
        self.self_attn = TableTransformerAttention(
            embed_dim=self.embed_dim,
            num_heads=config.encoder_attention_heads,
            dropout=config.attention_dropout,
        )
        self.self_attn_layer_norm = nn.LayerNorm(self.embed_dim)
        self.dropout = config.dropout
        self.activation_fn = ACT2FN[config.activation_function]
        self.activation_dropout = config.activation_dropout
        self.fc1 = nn.Linear(self.embed_dim, config.encoder_ffn_dim)
        self.fc2 = nn.Linear(config.encoder_ffn_dim, self.embed_dim)
        self.final_layer_norm = nn.LayerNorm(self.embed_dim)