Update modeling_cap.py
Browse files- modeling_cap.py +1 -0
modeling_cap.py
CHANGED
|
@@ -26,6 +26,7 @@ class CAPModel(PreTrainedModel):
|
|
| 26 |
self.num_labels = config.num_labels
|
| 27 |
self.dropout = nn.Dropout(config.dropout)
|
| 28 |
self.head = nn.Linear(hidden_size, config.num_labels)
|
|
|
|
| 29 |
|
| 30 |
def forward(self, input_ids, attention_mask, token_valid_mask):
|
| 31 |
outputs = self.backbone(input_ids=input_ids, attention_mask=attention_mask)
|
|
|
|
| 26 |
self.num_labels = config.num_labels
|
| 27 |
self.dropout = nn.Dropout(config.dropout)
|
| 28 |
self.head = nn.Linear(hidden_size, config.num_labels)
|
| 29 |
+
self.post_init()
|
| 30 |
|
| 31 |
def forward(self, input_ids, attention_mask, token_valid_mask):
|
| 32 |
outputs = self.backbone(input_ids=input_ids, attention_mask=attention_mask)
|