feat: assert return_dict
Browse files- modeling_for_glue.py +3 -3
modeling_for_glue.py
CHANGED
@@ -55,7 +55,7 @@ class BertForSequenceClassification(BertPreTrainedModel):
|
|
55 |
assert inputs_embeds is None
|
56 |
assert output_attentions is None
|
57 |
assert output_hidden_states is None
|
58 |
-
assert return_dict
|
59 |
outputs = self.bert(
|
60 |
input_ids,
|
61 |
attention_mask=attention_mask,
|
@@ -147,7 +147,7 @@ class BertForQuestionAnswering(BertPreTrainedModel):
|
|
147 |
assert inputs_embeds is None
|
148 |
assert output_attentions is None
|
149 |
assert output_hidden_states is None
|
150 |
-
assert return_dict
|
151 |
outputs = self.bert(
|
152 |
input_ids,
|
153 |
attention_mask=attention_mask,
|
@@ -234,7 +234,7 @@ class BertForTokenClassification(BertPreTrainedModel):
|
|
234 |
assert inputs_embeds is None
|
235 |
assert output_attentions is None
|
236 |
assert output_hidden_states is None
|
237 |
-
assert return_dict
|
238 |
outputs = self.bert(
|
239 |
input_ids,
|
240 |
attention_mask=attention_mask,
|
|
|
55 |
assert inputs_embeds is None
|
56 |
assert output_attentions is None
|
57 |
assert output_hidden_states is None
|
58 |
+
assert return_dict
|
59 |
outputs = self.bert(
|
60 |
input_ids,
|
61 |
attention_mask=attention_mask,
|
|
|
147 |
assert inputs_embeds is None
|
148 |
assert output_attentions is None
|
149 |
assert output_hidden_states is None
|
150 |
+
assert return_dict
|
151 |
outputs = self.bert(
|
152 |
input_ids,
|
153 |
attention_mask=attention_mask,
|
|
|
234 |
assert inputs_embeds is None
|
235 |
assert output_attentions is None
|
236 |
assert output_hidden_states is None
|
237 |
+
assert return_dict
|
238 |
outputs = self.bert(
|
239 |
input_ids,
|
240 |
attention_mask=attention_mask,
|