Spaces:
Build error
Build error
Update lxmert/src/lxmert_lrp.py
Browse files- lxmert/src/lxmert_lrp.py +4 -3
lxmert/src/lxmert_lrp.py
CHANGED
|
@@ -34,7 +34,8 @@ from transformers.file_utils import (
|
|
| 34 |
)
|
| 35 |
from transformers.modeling_utils import PreTrainedModel
|
| 36 |
from transformers.utils import logging
|
| 37 |
-
from transformers.configuration_lxmert import LxmertConfig
|
|
|
|
| 38 |
|
| 39 |
logger = logging.get_logger(__name__)
|
| 40 |
|
|
@@ -1135,7 +1136,7 @@ class LxmertModel(LxmertPreTrainedModel):
|
|
| 1135 |
|
| 1136 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1137 |
@add_code_sample_docstrings(
|
| 1138 |
-
|
| 1139 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1140 |
output_type=LxmertModelOutput,
|
| 1141 |
config_class=_CONFIG_FOR_DOC,
|
|
@@ -1624,7 +1625,7 @@ class LxmertForQuestionAnswering(LxmertPreTrainedModel):
|
|
| 1624 |
|
| 1625 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1626 |
@add_code_sample_docstrings(
|
| 1627 |
-
|
| 1628 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1629 |
output_type=LxmertForQuestionAnsweringOutput,
|
| 1630 |
config_class=_CONFIG_FOR_DOC,
|
|
|
|
| 34 |
)
|
| 35 |
from transformers.modeling_utils import PreTrainedModel
|
| 36 |
from transformers.utils import logging
|
| 37 |
+
# from transformers.configuration_lxmert import LxmertConfig
|
| 38 |
+
from transformers.models.lxmert.configuration_lxmert import LxmertConfig
|
| 39 |
|
| 40 |
logger = logging.get_logger(__name__)
|
| 41 |
|
|
|
|
| 1136 |
|
| 1137 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1138 |
@add_code_sample_docstrings(
|
| 1139 |
+
processor_class=_TOKENIZER_FOR_DOC,
|
| 1140 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1141 |
output_type=LxmertModelOutput,
|
| 1142 |
config_class=_CONFIG_FOR_DOC,
|
|
|
|
| 1625 |
|
| 1626 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1627 |
@add_code_sample_docstrings(
|
| 1628 |
+
processor_class=_TOKENIZER_FOR_DOC,
|
| 1629 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1630 |
output_type=LxmertForQuestionAnsweringOutput,
|
| 1631 |
config_class=_CONFIG_FOR_DOC,
|