roberta custom head test4
This commit is contained in:
parent
d24d515841
commit
bca5d1f177
@ -18,9 +18,8 @@ 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, 4 * hidden_size)
|
||||
self.dense_3 = nn.Linear(4 * hidden_size, 2 * hidden_size)
|
||||
self.dense_4 = nn.Linear(2 * hidden_size, hidden_size)
|
||||
self.dense_2 = nn.Linear(2 * hidden_size, 2 * hidden_size)
|
||||
self.dense_3 = nn.Linear(2 * hidden_size, hidden_size)
|
||||
classifier_dropout = (
|
||||
config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
|
||||
)
|
||||
@ -65,10 +64,6 @@ class RobertaLeakyHead(nn.Module):
|
||||
x = self.leaky_relu(x)
|
||||
x = self.dropout(x)
|
||||
|
||||
x = self.dense_4(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