Update transformer.py

This commit is contained in:
Logan Zou
2025-07-25 16:16:58 +08:00
committed by GitHub
parent 435661a5d5
commit 5a9d9c3111

View File

@@ -130,7 +130,6 @@ class MLP(nn.Module):
def forward(self, x):
# 前向传播函数
# 首先输入x通过第一层线性变换和RELU激活函数
# 然后结果乘以输入x通过第三层线性变换的结果
# 最后通过第二层线性变换和dropout层
return self.dropout(self.w2(F.relu(self.w1(x))))