yangwang825 commited on
Commit
2b1f795
·
1 Parent(s): 6542813

Upload BertForSequenceClassification

Browse files
Files changed (3) hide show
  1. config.json +6 -1
  2. modeling_bert.py +1 -1
  3. pytorch_model.bin +1 -1
config.json CHANGED
@@ -1,7 +1,11 @@
1
  {
 
 
 
2
  "attention_probs_dropout_prob": 0.1,
3
  "auto_map": {
4
- "AutoConfig": "configuration_bert.BertConfig"
 
5
  },
6
  "classifier_dropout": null,
7
  "hidden_act": "gelu",
@@ -16,6 +20,7 @@
16
  "num_hidden_layers": 12,
17
  "pad_token_id": 0,
18
  "position_embedding_type": "absolute",
 
19
  "transformers_version": "4.33.3",
20
  "type_vocab_size": 2,
21
  "use_cache": true,
 
1
  {
2
+ "architectures": [
3
+ "BertForSequenceClassification"
4
+ ],
5
  "attention_probs_dropout_prob": 0.1,
6
  "auto_map": {
7
+ "AutoConfig": "configuration_bert.BertConfig",
8
+ "AutoModelForSequenceClassification": "modeling_bert.BertForSequenceClassification"
9
  },
10
  "classifier_dropout": null,
11
  "hidden_act": "gelu",
 
20
  "num_hidden_layers": 12,
21
  "pad_token_id": 0,
22
  "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
  "transformers_version": "4.33.3",
25
  "type_vocab_size": 2,
26
  "use_cache": true,
modeling_bert.py CHANGED
@@ -184,7 +184,7 @@ class BertModel(BertPreTrainedModel):
184
  return_dict=return_dict,
185
  )
186
  sequence_output = encoder_outputs[0]
187
- pooled_output = self.pooler(sequence_output) if self.pooler is not None else None
188
 
189
  if not return_dict:
190
  return (sequence_output, pooled_output) + encoder_outputs[1:]
 
184
  return_dict=return_dict,
185
  )
186
  sequence_output = encoder_outputs[0]
187
+ pooled_output = self.pooler(sequence_output, attention_mask) if self.pooler is not None else None
188
 
189
  if not return_dict:
190
  return (sequence_output, pooled_output) + encoder_outputs[1:]
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec28dde25f12c5b2fcfa131eb9811e8cf5c0128f15245f4598998ba856a021ff
3
  size 438000689
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25e334df1aeef9f0935d07c0742098a3e33f52c4845add78b3f107d9b8ac8293
3
  size 438000689