dvsth commited on
Commit
20d44a7
1 Parent(s): f62c2ad

Upload model

Browse files
Files changed (2) hide show
  1. LegibilityModel.py +1 -1
  2. config.json +3 -0
LegibilityModel.py CHANGED
@@ -19,7 +19,7 @@ class LegibilityModel(PreTrainedModel):
19
  )
20
 
21
  # choice, img0, img1 are not used by the model, but are passed by the trainer
22
- def forward(self, img_batch, choice, img0, img1):
23
  output = self.model(img_batch)
24
  # average the output of the last hidden layer
25
  output = output.last_hidden_state.mean(dim=1)
 
19
  )
20
 
21
  # choice, img0, img1 are not used by the model, but are passed by the trainer
22
+ def forward(self, img_batch, choice=None, img0=None, img1=None):
23
  output = self.model(img_batch)
24
  # average the output of the last hidden layer
25
  output = output.last_hidden_state.mean(dim=1)
config.json CHANGED
@@ -4,6 +4,9 @@
4
  "architectures": [
5
  "LegibilityModel"
6
  ],
 
 
 
7
  "decoder": {
8
  "_name_or_path": "",
9
  "activation_dropout": 0.0,
 
4
  "architectures": [
5
  "LegibilityModel"
6
  ],
7
+ "auto_map": {
8
+ "AutoModel": "LegibilityModel.LegibilityModel"
9
+ },
10
  "decoder": {
11
  "_name_or_path": "",
12
  "activation_dropout": 0.0,