Commit
·
1a3d48d
1
Parent(s):
a887bec
testin the trick
Browse files- modeling_stacked.py +4 -2
modeling_stacked.py
CHANGED
|
@@ -52,7 +52,9 @@ class ExtendedMultitaskModelForTokenClassification(PreTrainedModel):
|
|
| 52 |
|
| 53 |
def load_state_dict(self, state_dict, strict=True):
|
| 54 |
# Ignore loading since there are no parameters
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
|
| 57 |
def get_floret_model(self):
|
| 58 |
return self.model_floret
|
|
@@ -73,7 +75,7 @@ class ExtendedMultitaskModelForTokenClassification(PreTrainedModel):
|
|
| 73 |
|
| 74 |
@classmethod
|
| 75 |
def from_pretrained(cls, *args, **kwargs):
|
| 76 |
-
print("Ignoring weights and using custom initialization.")
|
| 77 |
# Manually create the config
|
| 78 |
config = ImpressoConfig(**kwargs)
|
| 79 |
# Pass the manually created config to the class
|
|
|
|
| 52 |
|
| 53 |
def load_state_dict(self, state_dict, strict=True):
|
| 54 |
# Ignore loading since there are no parameters
|
| 55 |
+
pass
|
| 56 |
+
|
| 57 |
+
# print("Ignoring state_dict since model has no parameters.")
|
| 58 |
|
| 59 |
def get_floret_model(self):
|
| 60 |
return self.model_floret
|
|
|
|
| 75 |
|
| 76 |
@classmethod
|
| 77 |
def from_pretrained(cls, *args, **kwargs):
|
| 78 |
+
# print("Ignoring weights and using custom initialization.")
|
| 79 |
# Manually create the config
|
| 80 |
config = ImpressoConfig(**kwargs)
|
| 81 |
# Pass the manually created config to the class
|