"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e730e1256732b5dfeae2bdd427beacc3fbc20e2a"
Unverified Commit f2d2880b authored by Chris Hammill's avatar Chris Hammill Committed by GitHub
Browse files

remove unnecessary print in gpt neox sequence classifier (#23433)

parent aea7b23b
...@@ -863,7 +863,6 @@ class GPTNeoXForSequenceClassification(GPTNeoXPreTrainedModel): ...@@ -863,7 +863,6 @@ class GPTNeoXForSequenceClassification(GPTNeoXPreTrainedModel):
loss = loss_fct(pooled_logits, labels) loss = loss_fct(pooled_logits, labels)
elif self.config.problem_type == "single_label_classification": elif self.config.problem_type == "single_label_classification":
loss_fct = CrossEntropyLoss() loss_fct = CrossEntropyLoss()
print(pooled_logits.shape, labels.shape)
loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1)) loss = loss_fct(pooled_logits.view(-1, self.num_labels), labels.view(-1))
elif self.config.problem_type == "multi_label_classification": elif self.config.problem_type == "multi_label_classification":
loss_fct = BCEWithLogitsLoss() loss_fct = BCEWithLogitsLoss()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment