roberta custom head test5
This commit is contained in:
parent
bca5d1f177
commit
5f80bb5141
@ -18,8 +18,7 @@ class RobertaLeakyHead(nn.Module):
|
||||
hidden_size *= 2
|
||||
|
||||
self.dense_1 = nn.Linear(hidden_size, 2 * hidden_size)
|
||||
self.dense_2 = nn.Linear(2 * hidden_size, 2 * hidden_size)
|
||||
self.dense_3 = nn.Linear(2 * hidden_size, hidden_size)
|
||||
self.dense_2 = nn.Linear(2 * hidden_size, hidden_size)
|
||||
classifier_dropout = (
|
||||
config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
|
||||
)
|
||||
@ -60,10 +59,6 @@ class RobertaLeakyHead(nn.Module):
|
||||
x = self.leaky_relu(x)
|
||||
x = self.dropout(x)
|
||||
|
||||
x = self.dense_3(x)
|
||||
x = self.leaky_relu(x)
|
||||
x = self.dropout(x)
|
||||
|
||||
x = self.out_proj(x)
|
||||
return x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user