UMCU commited on
Commit
8ea28d5
·
verified ·
1 Parent(s): 1007c58

Update modeling.py

Browse files
Files changed (1) hide show
  1. modeling.py +3 -2
modeling.py CHANGED
@@ -11,13 +11,14 @@ class CustomSequenceClassificationModel(PreTrainedModel):
11
  def __init__(
12
  self,
13
  config,
14
- head_layers: int = 1,
15
- head_dropout: float = 0.1,
16
  ):
17
  super().__init__(config)
18
  self.num_labels = config.num_labels
19
  self.config = config
20
  self.backbone = AutoModel.from_config(config)
 
 
 
21
 
22
  hidden_size = getattr(config, "hidden_size", None)
23
  if hidden_size is None:
 
11
  def __init__(
12
  self,
13
  config,
 
 
14
  ):
15
  super().__init__(config)
16
  self.num_labels = config.num_labels
17
  self.config = config
18
  self.backbone = AutoModel.from_config(config)
19
+
20
+ head_layers = getattr(config, "head_layers", 1)
21
+ head_dropout = getattr(config, "head_dropout", 0.1)
22
 
23
  hidden_size = getattr(config, "hidden_size", None)
24
  if hidden_size is None: