Commit e3b47e1c authored by Janos Borst's avatar Janos Borst
Browse files

maybe change score output

parent 518b402a
Pipeline #50006 passed with stage
in 10 minutes and 7 seconds
......@@ -67,7 +67,7 @@ class EmbeddingBasedWeighted(SentenceTextClassificationAbstract, TextClassificat
if "max" in self.mode:
word_maxs = word_scores.reshape((input_embedding.shape[0], label_embedding.shape[0], -1)).max(-1)[0]
r = r * word_maxs
return r
return torch.log(0.5 * (r +1))
def embed(self, x):
"""
......@@ -125,6 +125,6 @@ class EmbeddingBasedWeighted(SentenceTextClassificationAbstract, TextClassificat
x = self.transform(x)
with torch.no_grad():
output = self.act(self(x))
output = 0.5*(output+1)
#output = 0.5*(output+1)
self.train()
return output
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