Skip to content

Commit 511bce5

Browse files
committed
update new token classification model
1 parent 258eb50 commit 511bce5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch_pretrained_bert/modeling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,8 @@ def __init__(self, config, num_labels=2):
932932

933933
def forward(self, input_ids, token_type_ids=None, attention_mask=None, labels=None):
934934
sequence_output, _ = self.bert(input_ids, token_type_ids, attention_mask, output_all_encoded_layers=False)
935-
pooled_output = self.dropout(sequence_output)
936-
logits = self.classifier(pooled_output)
935+
sequence_output = self.dropout(sequence_output)
936+
logits = self.classifier(sequence_output)
937937

938938
if labels is not None:
939939
loss_fct = CrossEntropyLoss()

0 commit comments

Comments
 (0)