Update modeling_paragram_sp.py
Browse files- modeling_paragram_sp.py +1 -0
modeling_paragram_sp.py
CHANGED
@@ -34,4 +34,5 @@ class ParagramSPModel(BertPreTrainedModel):
|
|
34 |
embeddings = self.word_embeddings(input_ids)
|
35 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
36 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|
|
|
37 |
return (embeddings, mean_pooled_embeddings, embeddings)
|
|
|
34 |
embeddings = self.word_embeddings(input_ids)
|
35 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
36 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|
37 |
+
print(attention_mask[:, :, None].sum(dim=1))
|
38 |
return (embeddings, mean_pooled_embeddings, embeddings)
|