Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -86,16 +86,10 @@ class NBMEModel(nn.Module):
|
|
86 |
|
87 |
self.path = path
|
88 |
self.num_labels = num_labels
|
89 |
-
|
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(
|
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'])
|