Update modeling_paragram_sp.py
Browse files- modeling_paragram_sp.py +7 -5
modeling_paragram_sp.py
CHANGED
@@ -10,11 +10,13 @@ class ParagramSPModel(BertPreTrainedModel):
|
|
10 |
# Initialize weights and apply final processing
|
11 |
self.post_init()
|
12 |
|
13 |
-
def forward(self, input_ids, attention_mask, token_type_ids, return_dict):
|
14 |
-
|
15 |
-
print(
|
16 |
-
print(
|
17 |
-
print(
|
|
|
|
|
18 |
embeddings = self.word_embeddings(input_ids)
|
19 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
20 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|
|
|
10 |
# Initialize weights and apply final processing
|
11 |
self.post_init()
|
12 |
|
13 |
+
#def forward(self, input_ids, attention_mask, token_type_ids, return_dict):
|
14 |
+
def forward(self, inputs**):
|
15 |
+
print(inputs)
|
16 |
+
#print(input_ids)
|
17 |
+
#print(attention_mask)
|
18 |
+
#print(token_type_ids)
|
19 |
+
#print(return_dict)
|
20 |
embeddings = self.word_embeddings(input_ids)
|
21 |
masked_embeddings = embeddings * attention_mask[:, :, None]
|
22 |
mean_pooled_embeddings = masked_embeddings.sum(dim=1) / attention_mask[:, :, None].sum(dim=1)
|