fix: use task_type_embeddings.weight parameter
Browse files- modeling_bert.py +1 -1
modeling_bert.py
CHANGED
|
@@ -347,7 +347,7 @@ class BertModel(BertPreTrainedModel):
|
|
| 347 |
# pretraining. When we start using task types during embedding training,
|
| 348 |
# we want the model to behave exactly as in pretraining (i.e. task types
|
| 349 |
# have no effect).
|
| 350 |
-
self.task_type_embeddings.fill_(0)
|
| 351 |
|
| 352 |
def forward(
|
| 353 |
self,
|
|
|
|
| 347 |
# pretraining. When we start using task types during embedding training,
|
| 348 |
# we want the model to behave exactly as in pretraining (i.e. task types
|
| 349 |
# have no effect).
|
| 350 |
+
self.task_type_embeddings.weight.fill_(0)
|
| 351 |
|
| 352 |
def forward(
|
| 353 |
self,
|