Update modeling_paragram_sp.py
Browse files- modeling_paragram_sp.py +2 -2
modeling_paragram_sp.py
CHANGED
|
@@ -11,8 +11,8 @@ class ParagramSPModel(BertPreTrainedModel):
|
|
| 11 |
self.post_init()
|
| 12 |
|
| 13 |
def forward(self, input_ids, attention_mask):
|
| 14 |
-
|
| 15 |
-
|
| 16 |
embeddings = self.word_embeddings(input_ids)
|
| 17 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
| 18 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|
|
|
|
| 11 |
self.post_init()
|
| 12 |
|
| 13 |
def forward(self, input_ids, attention_mask):
|
| 14 |
+
print(input_ids)
|
| 15 |
+
print(attention_mask)
|
| 16 |
embeddings = self.word_embeddings(input_ids)
|
| 17 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
| 18 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|