[FeatureExtractorSavingUtils] Refactor PretrainedFeatureExtractor (#10594)

* save first version

* finish refactor

* finish refactor

* correct naming

* correct naming

* shorter names

* Update src/transformers/feature_extraction_common_utils.py

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

* change name

* finish

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
Patrick von Platen
2021-03-09 12:16:59 +03:00
committed by GitHub
parent b6a28e9ac9
commit 9a06b6b11b
10 changed files with 638 additions and 572 deletions

View File

@@ -727,8 +727,7 @@ class BatchEncoding(UserDict):
device (:obj:`str` or :obj:`torch.device`): The device to put the tensors on.
Returns:
:class:`~transformers.BatchEncoding`: The same instance of :class:`~transformers.BatchEncoding` after
modification.
:class:`~transformers.BatchEncoding`: The same instance after modification.
"""
# This check catches things like APEX blindly calling "to" on all inputs to a module