Skip to content

Reorganize repo #8580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 17, 2020
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/github-torch-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
torch_hub_integration:
runs-on: ubuntu-latest
env:
# TODO quickfix but may need more investigation
ACTIONS_ALLOW_UNSECURE_COMMANDS: True
steps:
# no checkout necessary here.
- name: Extract branch name
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ dmypy.json
tensorflow_code

# Models
models
proc_data

# examples
Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/albert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ AlbertTokenizer
Albert specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_albert.AlbertForPreTrainingOutput
.. autoclass:: transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_tf_albert.TFAlbertForPreTrainingOutput
.. autoclass:: transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput
:members:


Expand Down
6 changes: 3 additions & 3 deletions docs/source/model_doc/bart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Implementation Notes
- Bart doesn't use :obj:`token_type_ids` for sequence classification. Use :class:`~transformers.BartTokenizer` or
:meth:`~transformers.BartTokenizer.encode` to get the proper splitting.
- The forward pass of :class:`~transformers.BartModel` will create decoder inputs (using the helper function
:func:`transformers.modeling_bart._prepare_bart_decoder_inputs`) if they are not passed. This is different than some
other modeling APIs.
:func:`transformers.models.bart.modeling_bart._prepare_bart_decoder_inputs`) if they are not passed. This is
different than some other modeling APIs.
- Model predictions are intended to be identical to the original implementation when
:obj:`force_bos_token_to_be_generated=True`. This only works, however, if the string you pass to
:func:`fairseq.encode` starts with a space.
Expand Down Expand Up @@ -93,7 +93,7 @@ BartModel
.. autoclass:: transformers.BartModel
:members: forward

.. autofunction:: transformers.modeling_bart._prepare_bart_decoder_inputs
.. autofunction:: transformers.models.bart.modeling_bart._prepare_bart_decoder_inputs


BartForConditionalGeneration
Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/bert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ BertTokenizerFast
Bert specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_bert.BertForPreTrainingOutput
.. autoclass:: transformers.models.bert.modeling_bert.BertForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_tf_bert.TFBertForPreTrainingOutput
.. autoclass:: transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput
:members:


Expand Down
6 changes: 3 additions & 3 deletions docs/source/model_doc/dpr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ DPRReaderTokenizerFast
DPR specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_dpr.DPRContextEncoderOutput
.. autoclass:: transformers.models.dpr.modeling_dpr.DPRContextEncoderOutput
:members:

.. autoclass:: transformers.modeling_dpr.DPRQuestionEncoderOutput
.. autoclass:: transformers.models.dpr.modeling_dpr.DPRQuestionEncoderOutput
:members:

.. autoclass:: transformers.modeling_dpr.DPRReaderOutput
.. autoclass:: transformers.models.dpr.modeling_dpr.DPRReaderOutput
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/electra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ ElectraTokenizerFast
Electra specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_electra.ElectraForPreTrainingOutput
.. autoclass:: transformers.models.electra.modeling_electra.ElectraForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_tf_electra.TFElectraForPreTrainingOutput
.. autoclass:: transformers.models.electra.modeling_tf_electra.TFElectraForPreTrainingOutput
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/funnel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ FunnelTokenizerFast
Funnel specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_funnel.FunnelForPreTrainingOutput
.. autoclass:: transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_tf_funnel.TFFunnelForPreTrainingOutput
.. autoclass:: transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/gpt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ OpenAIGPTTokenizerFast
OpenAI specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_openai.OpenAIGPTDoubleHeadsModelOutput
.. autoclass:: transformers.models.openai.modeling_openai.OpenAIGPTDoubleHeadsModelOutput
:members:

.. autoclass:: transformers.modeling_tf_openai.TFOpenAIGPTDoubleHeadsModelOutput
.. autoclass:: transformers.models.openai.modeling_tf_openai.TFOpenAIGPTDoubleHeadsModelOutput
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/gpt2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ GPT2TokenizerFast
GPT2 specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_gpt2.GPT2DoubleHeadsModelOutput
.. autoclass:: transformers.models.gpt2.modeling_gpt2.GPT2DoubleHeadsModelOutput
:members:

.. autoclass:: transformers.modeling_tf_gpt2.TFGPT2DoubleHeadsModelOutput
.. autoclass:: transformers.models.gpt2.modeling_tf_gpt2.TFGPT2DoubleHeadsModelOutput
:members:


Expand Down
16 changes: 7 additions & 9 deletions docs/source/model_doc/longformer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,29 +93,27 @@ LongformerTokenizerFast
Longformer specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_longformer.LongformerBaseModelOutput
.. autoclass:: transformers.models.longformer.modeling_longformer.LongformerBaseModelOutput
:members:

.. autoclass:: transformers.modeling_longformer.LongformerBaseModelOutputWithPooling
.. autoclass:: transformers.models.longformer.modeling_longformer.LongformerBaseModelOutputWithPooling
:members:

.. autoclass:: transformers.modeling_longformer.LongformerMultipleChoiceModelOutput
.. autoclass:: transformers.models.longformer.modeling_longformer.LongformerMultipleChoiceModelOutput
:members:

.. autoclass:: transformers.modeling_longformer.LongformerQuestionAnsweringModelOutput
.. autoclass:: transformers.models.longformer.modeling_longformer.LongformerQuestionAnsweringModelOutput
:members:

.. autoclass:: transformers.modeling_tf_longformer.TFLongformerBaseModelOutput
.. autoclass:: transformers.models.longformer.modeling_tf_longformer.TFLongformerBaseModelOutput
:members:

.. autoclass:: transformers.modeling_tf_longformer.TFLongformerBaseModelOutputWithPooling
.. autoclass:: transformers.models.longformer.modeling_tf_longformer.TFLongformerBaseModelOutputWithPooling
:members:

.. autoclass:: transformers.modeling_tf_longformer.TFLongformerQuestionAnsweringModelOutput
.. autoclass:: transformers.models.longformer.modeling_tf_longformer.TFLongformerQuestionAnsweringModelOutput
:members:

LongformerModel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LongformerModel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
10 changes: 5 additions & 5 deletions docs/source/model_doc/lxmert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ LxmertTokenizerFast
Lxmert specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_lxmert.LxmertModelOutput
.. autoclass:: transformers.models.lxmert.modeling_lxmert.LxmertModelOutput
:members:

.. autoclass:: transformers.modeling_lxmert.LxmertForPreTrainingOutput
.. autoclass:: transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_lxmert.LxmertForQuestionAnsweringOutput
.. autoclass:: transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput
:members:

.. autoclass:: transformers.modeling_tf_lxmert.TFLxmertModelOutput
.. autoclass:: transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput
:members:

.. autoclass:: transformers.modeling_tf_lxmert.TFLxmertForPreTrainingOutput
.. autoclass:: transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/mobilebert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ MobileBertTokenizerFast
MobileBert specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_mobilebert.MobileBertForPreTrainingOutput
.. autoclass:: transformers.models.mobilebert.modeling_mobilebert.MobileBertForPreTrainingOutput
:members:

.. autoclass:: transformers.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput
.. autoclass:: transformers.models.mobilebert.modeling_tf_mobilebert.TFMobileBertForPreTrainingOutput
:members:


Expand Down
8 changes: 4 additions & 4 deletions docs/source/model_doc/prophetnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ ProphetNetTokenizer
ProphetNet specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_prophetnet.ProphetNetSeq2SeqLMOutput
.. autoclass:: transformers.models.prophetnet.modeling_prophetnet.ProphetNetSeq2SeqLMOutput
:members:

.. autoclass:: transformers.modeling_prophetnet.ProphetNetSeq2SeqModelOutput
.. autoclass:: transformers.models.prophetnet.modeling_prophetnet.ProphetNetSeq2SeqModelOutput
:members:

.. autoclass:: transformers.modeling_prophetnet.ProphetNetDecoderModelOutput
.. autoclass:: transformers.models.prophetnet.modeling_prophetnet.ProphetNetDecoderModelOutput
:members:

.. autoclass:: transformers.modeling_prophetnet.ProphetNetDecoderLMOutput
.. autoclass:: transformers.models.prophetnet.modeling_prophetnet.ProphetNetDecoderLMOutput
:members:

ProphetNetModel
Expand Down
4 changes: 2 additions & 2 deletions docs/source/model_doc/rag.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ RagTokenizer
Rag specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_rag.RetrievAugLMMarginOutput
.. autoclass:: transformers.models.rag.modeling_rag.RetrievAugLMMarginOutput
:members:

.. autoclass:: transformers.modeling_rag.RetrievAugLMOutput
.. autoclass:: transformers.models.rag.modeling_rag.RetrievAugLMOutput
:members:

RagRetriever
Expand Down
8 changes: 4 additions & 4 deletions docs/source/model_doc/transformerxl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ TransfoXLTokenizer
TransfoXL specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_transfo_xl.TransfoXLModelOutput
.. autoclass:: transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput
:members:

.. autoclass:: transformers.modeling_transfo_xl.TransfoXLLMHeadModelOutput
.. autoclass:: transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput
:members:

.. autoclass:: transformers.modeling_tf_transfo_xl.TFTransfoXLModelOutput
.. autoclass:: transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput
:members:

.. autoclass:: transformers.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput
.. autoclass:: transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput
:members:


Expand Down
2 changes: 1 addition & 1 deletion docs/source/model_doc/xlm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ XLMTokenizer
XLM specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_xlm.XLMForQuestionAnsweringOutput
.. autoclass:: transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput
:members:


Expand Down
26 changes: 13 additions & 13 deletions docs/source/model_doc/xlnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,43 +53,43 @@ XLNetTokenizer
XLNet specific outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.modeling_xlnet.XLNetModelOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetModelOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetLMHeadModelOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetForSequenceClassificationOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetForMultipleChoiceOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetForTokenClassificationOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput
:members:

.. autoclass:: transformers.modeling_xlnet.XLNetForQuestionAnsweringOutput
.. autoclass:: transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetModelOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetLMHeadModelOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput
:members:

.. autoclass:: transformers.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput
.. autoclass:: transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput
:members:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from torch.nn import CrossEntropyLoss, MSELoss

from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
from transformers.modeling_albert import (
from transformers.models.albert.modeling_albert import (
ALBERT_INPUTS_DOCSTRING,
ALBERT_START_DOCSTRING,
AlbertModel,
Expand Down
2 changes: 1 addition & 1 deletion examples/bert-loses-patience/pabee/modeling_pabee_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from torch.nn import CrossEntropyLoss, MSELoss

from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
from transformers.modeling_bert import (
from transformers.models.bert.modeling_bert import (
BERT_INPUTS_DOCSTRING,
BERT_START_DOCSTRING,
BertEncoder,
Expand Down
3 changes: 1 addition & 2 deletions examples/contrib/run_camembert.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import torch

from transformers.modeling_camembert import CamembertForMaskedLM
from transformers.tokenization_camembert import CamembertTokenizer
from transformers import CamembertForMaskedLM, CamembertTokenizer


def fill_mask(masked_input, model, tokenizer, topk=5):
Expand Down
10 changes: 8 additions & 2 deletions examples/contrib/run_swag.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@
from tqdm import tqdm, trange

import transformers
from transformers import WEIGHTS_NAME, AdamW, AutoConfig, AutoTokenizer, get_linear_schedule_with_warmup
from transformers.modeling_auto import AutoModelForMultipleChoice
from transformers import (
WEIGHTS_NAME,
AdamW,
AutoConfig,
AutoModelForMultipleChoice,
AutoTokenizer,
get_linear_schedule_with_warmup,
)
from transformers.trainer_utils import is_main_process


Expand Down
2 changes: 1 addition & 1 deletion examples/deebert/src/modeling_highway_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from torch.nn import CrossEntropyLoss, MSELoss

from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
from transformers.modeling_bert import (
from transformers.models.bert.modeling_bert import (
BERT_INPUTS_DOCSTRING,
BERT_START_DOCSTRING,
BertEmbeddings,
Expand Down
8 changes: 6 additions & 2 deletions examples/deebert/src/modeling_highway_roberta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
import torch.nn as nn
from torch.nn import CrossEntropyLoss, MSELoss

from transformers.configuration_roberta import RobertaConfig
from transformers import RobertaConfig
from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
from transformers.modeling_roberta import ROBERTA_INPUTS_DOCSTRING, ROBERTA_START_DOCSTRING, RobertaEmbeddings
from transformers.models.roberta.modeling_roberta import (
ROBERTA_INPUTS_DOCSTRING,
ROBERTA_START_DOCSTRING,
RobertaEmbeddings,
)

from .modeling_highway_bert import BertPreTrainedModel, DeeBertModel, HighwayException, entropy

Expand Down
Loading