duzx16 commited on
Commit
911e84c
1 Parent(s): b7588ac

Fix classification model

Browse files
Files changed (1) hide show
  1. modeling_chatglm.py +1 -1
modeling_chatglm.py CHANGED
@@ -1166,7 +1166,7 @@ class ChatGLMForSequenceClassification(ChatGLMPreTrainedModel):
1166
  )
1167
 
1168
  hidden_states = transformer_outputs[0]
1169
- pooled_hidden_states = hidden_states[-1]
1170
  if self.dropout is not None:
1171
  pooled_hidden_states = self.dropout(pooled_hidden_states)
1172
  logits = self.classifier_head(pooled_hidden_states)
 
1166
  )
1167
 
1168
  hidden_states = transformer_outputs[0]
1169
+ pooled_hidden_states = hidden_states[:, -1]
1170
  if self.dropout is not None:
1171
  pooled_hidden_states = self.dropout(pooled_hidden_states)
1172
  logits = self.classifier_head(pooled_hidden_states)