duzx16 commited on
Commit
12c8049
1 Parent(s): cbc9aaf

Fix classification model

Browse files
Files changed (1) hide show
  1. modeling_chatglm.py +1 -1
modeling_chatglm.py CHANGED
@@ -1174,7 +1174,7 @@ class ChatGLMForSequenceClassification(ChatGLMPreTrainedModel):
1174
  )
1175
 
1176
  hidden_states = transformer_outputs[0]
1177
- pooled_hidden_states = hidden_states[-1]
1178
  if self.dropout is not None:
1179
  pooled_hidden_states = self.dropout(pooled_hidden_states)
1180
  logits = self.classifier_head(pooled_hidden_states)
 
1174
  )
1175
 
1176
  hidden_states = transformer_outputs[0]
1177
+ pooled_hidden_states = hidden_states[:, -1]
1178
  if self.dropout is not None:
1179
  pooled_hidden_states = self.dropout(pooled_hidden_states)
1180
  logits = self.classifier_head(pooled_hidden_states)