Update configuration_bert.py
Browse files- configuration_bert.py +6 -4
configuration_bert.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
# coding=utf-8
|
|
|
2 |
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
|
3 |
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
4 |
#
|
@@ -18,13 +19,13 @@
|
|
18 |
from collections import OrderedDict
|
19 |
from typing import Mapping
|
20 |
|
21 |
-
from
|
22 |
-
from
|
23 |
-
from
|
24 |
|
25 |
|
26 |
logger = logging.get_logger(__name__)
|
27 |
-
|
28 |
|
29 |
|
30 |
class BertConfig(PretrainedConfig):
|
@@ -152,3 +153,4 @@ class BertOnnxConfig(OnnxConfig):
|
|
152 |
("token_type_ids", dynamic_axis),
|
153 |
]
|
154 |
)
|
|
|
|
1 |
# coding=utf-8
|
2 |
+
|
3 |
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
|
4 |
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
5 |
#
|
|
|
19 |
from collections import OrderedDict
|
20 |
from typing import Mapping
|
21 |
|
22 |
+
from transformers.configuration_utils import PretrainedConfig
|
23 |
+
from transformers.onnx import OnnxConfig
|
24 |
+
from transformers.utils import logging
|
25 |
|
26 |
|
27 |
logger = logging.get_logger(__name__)
|
28 |
+
|
29 |
|
30 |
|
31 |
class BertConfig(PretrainedConfig):
|
|
|
153 |
("token_type_ids", dynamic_axis),
|
154 |
]
|
155 |
)
|
156 |
+
BertConfig.register_for_auto_class()
|