Unverified Commit 94ff2d6e authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Remove double bias (#2958)

parent b5b3445c
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment