Update modeling.py
Browse files- modeling.py +8 -0
modeling.py
CHANGED
|
@@ -45,3 +45,11 @@ class RobertaEmoPillars(PreTrainedModel):
|
|
| 45 |
emb = self.encoder(inputs)
|
| 46 |
logits = self.classifier(emb)
|
| 47 |
return ModelOutput(logits=logits)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
emb = self.encoder(inputs)
|
| 46 |
logits = self.classifier(emb)
|
| 47 |
return ModelOutput(logits=logits)
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
# --- Registration for AutoModel ---
|
| 51 |
+
|
| 52 |
+
try:
|
| 53 |
+
AutoModel.register(AutoConfig, RobertaEmoPillars)
|
| 54 |
+
except:
|
| 55 |
+
pass
|