dvsth commited on
Commit
2a5de8e
·
1 Parent(s): 99407d3

Upload model

Browse files
Files changed (1) hide show
  1. LegibilityModel.py +2 -1
LegibilityModel.py CHANGED
@@ -18,7 +18,8 @@ class LegibilityModel(PreTrainedModel):
18
  nn.Linear(768, 1)
19
  )
20
 
21
- def forward(self, img_batch):
 
22
  output = self.model(img_batch)
23
  # average the output of the last hidden layer
24
  output = output.last_hidden_state.mean(dim=1)
 
18
  nn.Linear(768, 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, 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)