Remove double bias (#2958)

This commit is contained in:
Lysandre Debut
2020-02-21 17:10:18 -05:00
committed by GitHub
parent b5b3445c4f
commit 94ff2d6ee8
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -600,7 +600,7 @@ class AlbertMLMHead(nn.Module):
hidden_states = self.LayerNorm(hidden_states)
hidden_states = self.decoder(hidden_states)
prediction_scores = hidden_states + self.bias
prediction_scores = hidden_states
return prediction_scores
+1 -1
View File
@@ -471,7 +471,7 @@ class BertLMPredictionHead(nn.Module):
def forward(self, hidden_states):
hidden_states = self.transform(hidden_states)
hidden_states = self.decoder(hidden_states) + self.bias
hidden_states = self.decoder(hidden_states)
return hidden_states
+1 -1
View File
@@ -264,7 +264,7 @@ class RobertaLMHead(nn.Module):
x = self.layer_norm(x)
# project back to size of vocabulary with bias
x = self.decoder(x) + self.bias
x = self.decoder(x)
return x