KhaldiAbderrhmane commited on
Commit
f8e69b6
·
verified ·
1 Parent(s): 077f875

Upload Resnet50FER

Browse files
Files changed (2) hide show
  1. config.json +6 -1
  2. model.py +1 -1
config.json CHANGED
@@ -1,7 +1,12 @@
1
  {
 
 
 
2
  "auto_map": {
3
- "AutoConfig": "config.Resnet50Config"
 
4
  },
5
  "num_classes": 6,
 
6
  "transformers_version": "4.37.2"
7
  }
 
1
  {
2
+ "architectures": [
3
+ "Resnet50FER"
4
+ ],
5
  "auto_map": {
6
+ "AutoConfig": "config.Resnet50Config",
7
+ "AutoModelForImageClassification": "model.Resnet50FER"
8
  },
9
  "num_classes": 6,
10
+ "torch_dtype": "float32",
11
  "transformers_version": "4.37.2"
12
  }
model.py CHANGED
@@ -5,7 +5,7 @@ from .config import Resnet50Config
5
  from transformers import PreTrainedModel
6
 
7
  class Resnet50FER(PreTrainedModel):
8
- config = Resnet50Config
9
  def __init__(self, config):
10
  super().__init__(config)
11
  # Load the ResNet50 model without the final fully connected layer
 
5
  from transformers import PreTrainedModel
6
 
7
  class Resnet50FER(PreTrainedModel):
8
+ config_class = Resnet50Config
9
  def __init__(self, config):
10
  super().__init__(config)
11
  # Load the ResNet50 model without the final fully connected layer