Update model.py
Browse files
model.py
CHANGED
|
@@ -15,7 +15,7 @@ class BertClassifier(nn.Module):
|
|
| 15 |
nn.Dropout(dropout),
|
| 16 |
nn.Linear(self.bert.config.hidden_size, num_labels))
|
| 17 |
|
| 18 |
-
def forward(self, input_ids=None, attention_mask=None,labels=None):
|
| 19 |
output = self.bert(input_ids, attention_mask=attention_mask)
|
| 20 |
logits = self.classifier(output.pooler_output)
|
| 21 |
loss = None
|
|
|
|
| 15 |
nn.Dropout(dropout),
|
| 16 |
nn.Linear(self.bert.config.hidden_size, num_labels))
|
| 17 |
|
| 18 |
+
def forward(self, input_ids=None, attention_mask=None,labels=None, *args, **kwargs):
|
| 19 |
output = self.bert(input_ids, attention_mask=attention_mask)
|
| 20 |
logits = self.classifier(output.pooler_output)
|
| 21 |
loss = None
|