Added both the model and its config in the same modeling.py file, deleted extra configuration file.
Browse files- configuration_musheff.py +0 -11
- modeling.py +10 -1
configuration_musheff.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
# configuration_musheff.py
|
| 2 |
-
from transformers import PretrainedConfig
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
class MusheffConfig(PretrainedConfig):
|
| 6 |
-
model_type = "efficientnet_b3"
|
| 7 |
-
|
| 8 |
-
def __init__(self, num_classes=12, dropout_rate=0.3, **kwargs):
|
| 9 |
-
self.num_classes = num_classes
|
| 10 |
-
self.dropout_rate = dropout_rate
|
| 11 |
-
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modeling.py
CHANGED
|
@@ -3,7 +3,16 @@ from transformers import PreTrainedModel
|
|
| 3 |
|
| 4 |
import torch.nn as nn
|
| 5 |
|
| 6 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
class Musheff(PreTrainedModel):
|
|
|
|
| 3 |
|
| 4 |
import torch.nn as nn
|
| 5 |
|
| 6 |
+
from transformers import PretrainedConfig
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class MusheffConfig(PretrainedConfig):
|
| 10 |
+
model_type = "efficientnet_b3"
|
| 11 |
+
|
| 12 |
+
def __init__(self, num_classes=12, dropout_rate=0.3, **kwargs):
|
| 13 |
+
self.num_classes = num_classes
|
| 14 |
+
self.dropout_rate = dropout_rate
|
| 15 |
+
super().__init__(**kwargs)
|
| 16 |
|
| 17 |
|
| 18 |
class Musheff(PreTrainedModel):
|