yangwang825
commited on
Commit
·
22a0847
1
Parent(s):
24efcd9
Update modeling_bert.py
Browse files- modeling_bert.py +4 -0
modeling_bert.py
CHANGED
@@ -68,6 +68,8 @@ class BertClsPooler(nn.Module):
|
|
68 |
|
69 |
class BertModel(BertPreTrainedModel):
|
70 |
|
|
|
|
|
71 |
def __init__(self, config, add_pooling_layer=True):
|
72 |
super().__init__(config)
|
73 |
self.config = config
|
@@ -199,6 +201,8 @@ class BertModel(BertPreTrainedModel):
|
|
199 |
|
200 |
class BertForSequenceClassification(BertPreTrainedModel):
|
201 |
|
|
|
|
|
202 |
def __init__(self, config):
|
203 |
super().__init__(config)
|
204 |
self.num_labels = config.num_labels
|
|
|
68 |
|
69 |
class BertModel(BertPreTrainedModel):
|
70 |
|
71 |
+
config_class = BertClsConfig
|
72 |
+
|
73 |
def __init__(self, config, add_pooling_layer=True):
|
74 |
super().__init__(config)
|
75 |
self.config = config
|
|
|
201 |
|
202 |
class BertForSequenceClassification(BertPreTrainedModel):
|
203 |
|
204 |
+
config_class = BertClsConfig
|
205 |
+
|
206 |
def __init__(self, config):
|
207 |
super().__init__(config)
|
208 |
self.num_labels = config.num_labels
|