Commit
·
835dd2a
1
Parent(s):
c869900
added missing imports
Browse files- modeling_lsg_bert.py +8 -0
modeling_lsg_bert.py
CHANGED
@@ -14,12 +14,20 @@ from transformers.models.bert.modeling_bert import (
|
|
14 |
BertLayer,
|
15 |
BertPooler,
|
16 |
BertSelfOutput,
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
)
|
18 |
import torch
|
19 |
import torch.nn as nn
|
|
|
20 |
from transformers.models.bert.configuration_bert import BertConfig
|
21 |
import math
|
22 |
import sys
|
|
|
23 |
|
24 |
import logging
|
25 |
logger = logging.getLogger(__name__)
|
|
|
14 |
BertLayer,
|
15 |
BertPooler,
|
16 |
BertSelfOutput,
|
17 |
+
BertAttention,
|
18 |
+
BertOnlyNSPHead,
|
19 |
+
BertOnlyMLMHead,
|
20 |
+
BertPreTrainingHeads,
|
21 |
+
BertForPreTraining,
|
22 |
+
BertLMHeadModel,
|
23 |
)
|
24 |
import torch
|
25 |
import torch.nn as nn
|
26 |
+
from transformers.modeling_outputs import BaseModelOutputWithPastAndCrossAttentions
|
27 |
from transformers.models.bert.configuration_bert import BertConfig
|
28 |
import math
|
29 |
import sys
|
30 |
+
from typing import Optional, Tuple, Union
|
31 |
|
32 |
import logging
|
33 |
logger = logging.getLogger(__name__)
|