File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8
8
from torch import nn , Tensor
9
9
10
10
try :
11
- from transformers3 .modeling_bert import (
11
+ from transformers .modeling_utils import PreTrainedModel
12
+ from transformers .models .bert .modeling_bert import (
12
13
BertAttention ,
13
14
BertEmbeddings ,
14
15
BertEncoder ,
18
19
BertSelfAttention ,
19
20
BertSelfOutput ,
20
21
)
21
- from transformers3 .modeling_roberta import (
22
+ from transformers . models . roberta .modeling_roberta import (
22
23
RobertaAttention ,
23
24
RobertaEmbeddings ,
24
25
RobertaEncoder ,
25
26
RobertaLayer ,
26
27
RobertaModel ,
27
28
RobertaSelfAttention ,
28
29
)
29
- from transformers3 .modeling_utils import PreTrainedModel
30
30
except ImportError :
31
- from transformers .modeling_bert import (
31
+ from transformers .modeling_utils import PreTrainedModel
32
+ from transformers .models .bert .modeling_bert import (
32
33
BertAttention ,
33
34
BertEmbeddings ,
34
35
BertEncoder ,
38
39
BertSelfAttention ,
39
40
BertSelfOutput ,
40
41
)
41
- from transformers .modeling_roberta import (
42
+ from transformers .models . roberta . modeling_roberta import (
42
43
RobertaAttention ,
43
44
RobertaEmbeddings ,
44
45
RobertaEncoder ,
45
46
RobertaLayer ,
46
47
RobertaModel ,
47
48
RobertaSelfAttention ,
48
49
)
49
- from transformers .modeling_utils import PreTrainedModel
50
50
51
51
52
52
patch_functions = [
You can’t perform that action at this time.
0 commit comments