Update modeling_norbert.py
Browse files- modeling_norbert.py +5 -2
modeling_norbert.py
CHANGED
|
@@ -440,7 +440,10 @@ class NorbertForSequenceClassification(NorbertModel):
|
|
| 440 |
self.head = Classifier(config, self.num_labels)
|
| 441 |
|
| 442 |
def post_init(self):
|
| 443 |
-
self.head.
|
|
|
|
|
|
|
|
|
|
| 444 |
|
| 445 |
def forward(
|
| 446 |
self,
|
|
@@ -509,7 +512,7 @@ class NorbertForTokenClassification(NorbertModel):
|
|
| 509 |
self.head = Classifier(config, self.num_labels)
|
| 510 |
|
| 511 |
def post_init(self):
|
| 512 |
-
self.head.
|
| 513 |
|
| 514 |
def forward(
|
| 515 |
self,
|
|
|
|
| 440 |
self.head = Classifier(config, self.num_labels)
|
| 441 |
|
| 442 |
def post_init(self):
|
| 443 |
+
self.head._init_weights()
|
| 444 |
+
|
| 445 |
+
def _init_weights(self):
|
| 446 |
+
self.head._init_weights()
|
| 447 |
|
| 448 |
def forward(
|
| 449 |
self,
|
|
|
|
| 512 |
self.head = Classifier(config, self.num_labels)
|
| 513 |
|
| 514 |
def post_init(self):
|
| 515 |
+
self.head._init_weights()
|
| 516 |
|
| 517 |
def forward(
|
| 518 |
self,
|