KhaldiAbderrhmane commited on
Commit
e79417d
·
verified ·
1 Parent(s): fc371ad

Upload config

Browse files
Files changed (2) hide show
  1. config.json +7 -6
  2. config.py +14 -0
config.json CHANGED
@@ -1,6 +1,7 @@
1
- {
2
- "architectures": ["ResNet50"],
3
-
4
- "num_labels": 6,
5
- "input_size": [3, 224, 224]
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)