Convention: name mixins mixins

This commit is contained in:
Julien Chaumond
2020-01-11 01:24:29 +00:00
parent 055e80cfad
commit 2f32dfd33b
3 changed files with 4 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ from .modeling_tf_pytorch_utils import load_pytorch_checkpoint_in_tf2_model
logger = logging.getLogger(__name__)
class TFModelUtils:
class TFModelUtilsMixin:
"""
A few utilities for `tf.keras.Model`s, to be used as a mixin.
"""
@@ -47,7 +47,7 @@ class TFModelUtils:
return self.count_params()
class TFPreTrainedModel(tf.keras.Model, TFModelUtils):
class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin):
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