mirror of
https://github.com/wassname/openai-transformer-lm-gutenberg-erotic.git
synced 2026-06-27 16:10:19 +08:00
Adding the addition of the two sentence orderings in similarity head.
This commit is contained in:
@@ -259,6 +259,7 @@ class SimilarityHead(nn.Module):
|
||||
flat = x[..., 0].contiguous().view(-1)
|
||||
sim_h = sim_h[flat == self.clf_token, :]
|
||||
sim_h = self.dropout(sim_h)
|
||||
sim_h = sim_h.sum(dim = 1)
|
||||
sim_logits = self.linear(sim_h)
|
||||
|
||||
return sim_logits
|
||||
|
||||
Reference in New Issue
Block a user