manan commited on
Commit
28b41a4
1 Parent(s): 48f65d5

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +3 -9
model.py CHANGED
@@ -86,16 +86,10 @@ class NBMEModel(nn.Module):
86
 
87
  self.path = path
88
  self.num_labels = num_labels
89
- self.config = transformers.AutoConfig.from_pretrained(config['model_checkpoint'])
90
-
91
- self.config.update(
92
- {
93
- "layer_norm_eps": layer_norm_eps,
94
- }
95
- )
96
- self.transformer = transformers.AutoModel.from_pretrained(config['model_checkpoint'], config=self.config)
97
  self.dropout = nn.Dropout(0.2)
98
- self.output = nn.Linear(self.config.hidden_size, 1)
99
 
100
  if self.path is not None:
101
  self.load_state_dict(torch.load(self.path)['model'])
 
86
 
87
  self.path = path
88
  self.num_labels = num_labels
89
+
90
+ self.transformer = transformers.AutoModel.from_pretrained(config['model_checkpoint'])
 
 
 
 
 
 
91
  self.dropout = nn.Dropout(0.2)
92
+ self.output = nn.Linear(768, 1)
93
 
94
  if self.path is not None:
95
  self.load_state_dict(torch.load(self.path)['model'])