@@ -35,7 +35,7 @@ class TFPreTrainedModel(tf.keras.Model):
...
@@ -35,7 +35,7 @@ class TFPreTrainedModel(tf.keras.Model):
r""" Base class for all TF models.
r""" Base class for all TF models.
:class:`~transformers.TFPreTrainedModel` takes care of storing the configuration of the models and handles methods for loading/downloading/saving models
:class:`~transformers.TFPreTrainedModel` takes care of storing the configuration of the models and handles methods for loading/downloading/saving models
as well as a few methods commons to all models to (i) resize the input embeddings and (ii) prune heads in the self-attention heads.
as well as a few methods common to all models to (i) resize the input embeddings and (ii) prune heads in the self-attention heads.
Class attributes (overridden by derived classes):
Class attributes (overridden by derived classes):
- ``config_class``: a class derived from :class:`~transformers.PretrainedConfig` to use as configuration class for this model architecture.
- ``config_class``: a class derived from :class:`~transformers.PretrainedConfig` to use as configuration class for this model architecture.
...
@@ -51,7 +51,15 @@ class TFPreTrainedModel(tf.keras.Model):
...
@@ -51,7 +51,15 @@ class TFPreTrainedModel(tf.keras.Model):
config_class=None
config_class=None
pretrained_model_archive_map={}
pretrained_model_archive_map={}
base_model_prefix=""
base_model_prefix=""
dummy_inputs=tf.constant(DUMMY_INPUTS)# dummy inputs to build the network
# @add_start_docstrings("""XLNet Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layers on top of
# @add_start_docstrings("""XLNet Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layers on top of
# the hidden-states output to compute `span start logits` and `span end logits`). """,
# the hidden-states output to compute `span start logits` and `span end logits`). """,