"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "cb56590111b8f20eb8fc8e51d362b7acb092f19c"
Unverified Commit 73198509 authored by amyeroberts's avatar amyeroberts Committed by GitHub
Browse files

Replace FE references (#20702)

parent a95fd354
...@@ -27,13 +27,13 @@ class DonutProcessor(ProcessorMixin): ...@@ -27,13 +27,13 @@ class DonutProcessor(ProcessorMixin):
Constructs a Donut processor which wraps a Donut image processor and an XLMRoBERTa tokenizer into a single Constructs a Donut processor which wraps a Donut image processor and an XLMRoBERTa tokenizer into a single
processor. processor.
[`DonutProcessor`] offers all the functionalities of [`DonutFeatureExtractor`] and [`DonutProcessor`] offers all the functionalities of [`DonutImageProcessor`] and
[`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. See the [`~DonutProcessor.__call__`] and [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. See the [`~DonutProcessor.__call__`] and
[`~DonutProcessor.decode`] for more information. [`~DonutProcessor.decode`] for more information.
Args: Args:
image_processor ([`DonutFeatureExtractor`]): image_processor ([`DonutImageProcessor`]):
An instance of [`DonutFeatureExtractor`]. The image processor is a required input. An instance of [`DonutImageProcessor`]. The image processor is a required input.
tokenizer ([`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]): tokenizer ([`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]):
An instance of [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. The tokenizer is a required input. An instance of [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. The tokenizer is a required input.
""" """
...@@ -62,8 +62,8 @@ class DonutProcessor(ProcessorMixin): ...@@ -62,8 +62,8 @@ class DonutProcessor(ProcessorMixin):
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
""" """
When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor's When used in normal mode, this method forwards all its arguments to AutoImageProcessor's
[`~AutoFeatureExtractor.__call__`] and returns its output. If used in the context [`~AutoImageProcessor.__call__`] and returns its output. If used in the context
[`~DonutProcessor.as_target_processor`] this method forwards all its arguments to DonutTokenizer's [`~DonutProcessor.as_target_processor`] this method forwards all its arguments to DonutTokenizer's
[`~DonutTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information. [`~DonutTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information.
""" """
......
...@@ -29,15 +29,15 @@ class FlavaProcessor(ProcessorMixin): ...@@ -29,15 +29,15 @@ class FlavaProcessor(ProcessorMixin):
r""" r"""
Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor. Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor.
[`FlavaProcessor`] offers all the functionalities of [`FlavaFeatureExtractor`] and [`BertTokenizerFast`]. See the [`FlavaProcessor`] offers all the functionalities of [`FlavaImageProcessor`] and [`BertTokenizerFast`]. See the
[`~FlavaProcessor.__call__`] and [`~FlavaProcessor.decode`] for more information. [`~FlavaProcessor.__call__`] and [`~FlavaProcessor.decode`] for more information.
Args: Args:
image_processor ([`FlavaFeatureExtractor`]): The image processor is a required input. image_processor ([`FlavaImageProcessor`]): The image processor is a required input.
tokenizer ([`BertTokenizerFast`]): The tokenizer is a required input. tokenizer ([`BertTokenizerFast`]): The tokenizer is a required input.
""" """
attributes = ["image_processor", "tokenizer"] attributes = ["image_processor", "tokenizer"]
image_processor_class = "FlavaFeatureExtractor" image_processor_class = "FlavaImageProcessor"
tokenizer_class = ("BertTokenizer", "BertTokenizerFast") tokenizer_class = ("BertTokenizer", "BertTokenizerFast")
def __init__(self, image_processor=None, tokenizer=None, **kwargs): def __init__(self, image_processor=None, tokenizer=None, **kwargs):
...@@ -81,7 +81,7 @@ class FlavaProcessor(ProcessorMixin): ...@@ -81,7 +81,7 @@ class FlavaProcessor(ProcessorMixin):
**kwargs **kwargs
): ):
""" """
This method uses [`FLAVAFeatureExtractor.__call__`] method to prepare image(s) for the model, and This method uses [`FlavaImageProcessor.__call__`] method to prepare image(s) for the model, and
[`BertTokenizerFast.__call__`] to prepare text for the model. [`BertTokenizerFast.__call__`] to prepare text for the model.
Please refer to the docstring of the above two methods for more information. Please refer to the docstring of the above two methods for more information.
......
...@@ -28,17 +28,17 @@ class ViltProcessor(ProcessorMixin): ...@@ -28,17 +28,17 @@ class ViltProcessor(ProcessorMixin):
r""" r"""
Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor. Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor.
[`ViltProcessor`] offers all the functionalities of [`ViltFeatureExtractor`] and [`BertTokenizerFast`]. See the [`ViltProcessor`] offers all the functionalities of [`ViltImageProcessor`] and [`BertTokenizerFast`]. See the
docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information. docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information.
Args: Args:
image_processor (`ViltFeatureExtractor`): image_processor (`ViltImageProcessor`):
An instance of [`ViltFeatureExtractor`]. The image processor is a required input. An instance of [`ViltImageProcessor`]. The image processor is a required input.
tokenizer (`BertTokenizerFast`): tokenizer (`BertTokenizerFast`):
An instance of ['BertTokenizerFast`]. The tokenizer is a required input. An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
""" """
attributes = ["image_processor", "tokenizer"] attributes = ["image_processor", "tokenizer"]
image_processor_class = "ViltFeatureExtractor" image_processor_class = "ViltImageProcessor"
tokenizer_class = ("BertTokenizer", "BertTokenizerFast") tokenizer_class = ("BertTokenizer", "BertTokenizerFast")
def __init__(self, image_processor=None, tokenizer=None, **kwargs): def __init__(self, image_processor=None, tokenizer=None, **kwargs):
...@@ -80,7 +80,7 @@ class ViltProcessor(ProcessorMixin): ...@@ -80,7 +80,7 @@ class ViltProcessor(ProcessorMixin):
**kwargs **kwargs
) -> BatchEncoding: ) -> BatchEncoding:
""" """
This method uses [`ViltFeatureExtractor.__call__`] method to prepare image(s) for the model, and This method uses [`ViltImageProcessor.__call__`] method to prepare image(s) for the model, and
[`BertTokenizerFast.__call__`] to prepare text for the model. [`BertTokenizerFast.__call__`] to prepare text for the model.
Please refer to the docstring of the above two methods for more information. Please refer to the docstring of the above two methods for more information.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment