Upload EncT5ForSequenceClassification
Browse files- model.safetensors +1 -1
- modeling_enct5.py +1 -2
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 476301088
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9e524b32cda618388318ac82325a4c094dbfae0fef12a0473bce49e80832ae9
|
| 3 |
size 476301088
|
modeling_enct5.py
CHANGED
|
@@ -67,7 +67,6 @@ class EncT5PreTrainedModel(T5PreTrainedModel):
|
|
| 67 |
elif isinstance(module, EncT5MultiLabelClassificationHead):
|
| 68 |
module.weights.data.normal_(mean=0.0, std=factor * ((self.config.d_model) ** -0.5))
|
| 69 |
module.biases.data.zero_()
|
| 70 |
-
super()._init_weights(module)
|
| 71 |
|
| 72 |
|
| 73 |
class EncT5ForSequenceClassification(EncT5PreTrainedModel):
|
|
@@ -120,7 +119,7 @@ class EncT5ForSequenceClassification(EncT5PreTrainedModel):
|
|
| 120 |
Prepares the model for fine-tuning by re-initializing the necessary weights for fine-tuning. This step should be
|
| 121 |
performed after loading the pre-trained T5 model but before fine-tuning.
|
| 122 |
"""
|
| 123 |
-
self.
|
| 124 |
self._init_weights(self.classification_head)
|
| 125 |
|
| 126 |
def forward(
|
|
|
|
| 67 |
elif isinstance(module, EncT5MultiLabelClassificationHead):
|
| 68 |
module.weights.data.normal_(mean=0.0, std=factor * ((self.config.d_model) ** -0.5))
|
| 69 |
module.biases.data.zero_()
|
|
|
|
| 70 |
|
| 71 |
|
| 72 |
class EncT5ForSequenceClassification(EncT5PreTrainedModel):
|
|
|
|
| 119 |
Prepares the model for fine-tuning by re-initializing the necessary weights for fine-tuning. This step should be
|
| 120 |
performed after loading the pre-trained T5 model but before fine-tuning.
|
| 121 |
"""
|
| 122 |
+
self.decoder_embeddings.weight.data.normal_(mean=0.0, std=self.config.initializer_factor)
|
| 123 |
self._init_weights(self.classification_head)
|
| 124 |
|
| 125 |
def forward(
|