Spaces:
Build error
Build error
Update lxmert/src/huggingface_lxmert.py
Browse files
lxmert/src/huggingface_lxmert.py
CHANGED
|
@@ -35,7 +35,8 @@ from transformers.file_utils import (
|
|
| 35 |
)
|
| 36 |
from transformers.modeling_utils import PreTrainedModel
|
| 37 |
from transformers.utils import logging
|
| 38 |
-
from transformers.configuration_lxmert import LxmertConfig
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
logger = logging.get_logger(__name__)
|
|
@@ -930,7 +931,7 @@ class LxmertModel(LxmertPreTrainedModel):
|
|
| 930 |
|
| 931 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 932 |
@add_code_sample_docstrings(
|
| 933 |
-
|
| 934 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 935 |
output_type=LxmertModelOutput,
|
| 936 |
config_class=_CONFIG_FOR_DOC,
|
|
@@ -1411,7 +1412,7 @@ class LxmertForQuestionAnswering(LxmertPreTrainedModel):
|
|
| 1411 |
|
| 1412 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1413 |
@add_code_sample_docstrings(
|
| 1414 |
-
|
| 1415 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1416 |
output_type=LxmertForQuestionAnsweringOutput,
|
| 1417 |
config_class=_CONFIG_FOR_DOC,
|
|
|
|
| 35 |
)
|
| 36 |
from transformers.modeling_utils import PreTrainedModel
|
| 37 |
from transformers.utils import logging
|
| 38 |
+
# from transformers.configuration_lxmert import LxmertConfig
|
| 39 |
+
from transformers.models.lxmert.configuration_lxmert import LxmertConfig
|
| 40 |
|
| 41 |
|
| 42 |
logger = logging.get_logger(__name__)
|
|
|
|
| 931 |
|
| 932 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 933 |
@add_code_sample_docstrings(
|
| 934 |
+
processor_class=_TOKENIZER_FOR_DOC,
|
| 935 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 936 |
output_type=LxmertModelOutput,
|
| 937 |
config_class=_CONFIG_FOR_DOC,
|
|
|
|
| 1412 |
|
| 1413 |
@add_start_docstrings_to_model_forward(LXMERT_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
|
| 1414 |
@add_code_sample_docstrings(
|
| 1415 |
+
processor_class=_TOKENIZER_FOR_DOC,
|
| 1416 |
checkpoint="unc-nlp/lxmert-base-uncased",
|
| 1417 |
output_type=LxmertForQuestionAnsweringOutput,
|
| 1418 |
config_class=_CONFIG_FOR_DOC,
|