KhaldiAbderrhmane
commited on
Upload config
Browse files- config.json +7 -6
- config.py +14 -0
config.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
-
{
|
2 |
-
"
|
3 |
-
|
4 |
-
|
5 |
-
"
|
6 |
-
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoConfig": "config.Resnet50Config"
|
4 |
+
},
|
5 |
+
"num_classes": 6,
|
6 |
+
"transformers_version": "4.37.2"
|
7 |
+
}
|
config.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import PretrainedConfig
|
2 |
+
|
3 |
+
class Resnet50Config(PretrainedConfig):
|
4 |
+
# since we have an image classification task
|
5 |
+
# we need to put a model type that is close to our task
|
6 |
+
# don't worry this will not affect our model
|
7 |
+
#model_type = "MobileNetV1"
|
8 |
+
def __init__(
|
9 |
+
self,
|
10 |
+
num_classes=6,
|
11 |
+
**kwargs):
|
12 |
+
|
13 |
+
self.num_classes = num_classes
|
14 |
+
super().__init__(**kwargs)
|