text stringlengths 5 58.6k | source stringclasses 470
values | url stringlengths 49 167 | source_section stringlengths 0 90 | file_type stringclasses 1
value | id stringlengths 3 6 |
|---|---|---|---|---|---|
No docstring available for LayoutLMv2FeatureExtractor
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2featureextractor | #layoutlmv2featureextractor | .md | 132_6 |
Constructs a LayoutLMv2 image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to `(size["height"], size["width"])`. Can be
overridden by `do_resize` in `preprocess`.
size (`Dict[str, int]` *optional*, defaults to `{"height": 224, "width": 2... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2imageprocessor | #layoutlmv2imageprocessor | .md | 132_7 |
Construct a LayoutLMv2 tokenizer. Based on WordPiece. [`LayoutLMv2Tokenizer`] can be used to turn words, word-level
bounding boxes and optional word labels to token-level `input_ids`, `attention_mask`, `token_type_ids`, `bbox`, and
optional `labels` (for token classification).
This tokenizer inherits from [`PreTraine... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2tokenizer | #layoutlmv2tokenizer | .md | 132_8 |
Construct a "fast" LayoutLMv2 tokenizer (backed by HuggingFace's *tokenizers* library). Based on WordPiece.
This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.
Args:
vocab_file (`str`):
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2tokenizerfast | #layoutlmv2tokenizerfast | .md | 132_9 |
Constructs a LayoutLMv2 processor which combines a LayoutLMv2 image processor and a LayoutLMv2 tokenizer into a
single processor.
[`LayoutLMv2Processor`] offers all the functionalities you need to prepare data for the model.
It first uses [`LayoutLMv2ImageProcessor`] to resize document images to a fixed size, and o... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2processor | #layoutlmv2processor | .md | 132_10 |
The bare LayoutLMv2 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general u... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2model | #layoutlmv2model | .md | 132_11 |
LayoutLMv2 Model with a sequence classification head on top (a linear layer on top of the concatenation of the
final hidden state of the [CLS] token, average-pooled initial visual embeddings and average-pooled final visual
embeddings, e.g. for document image classification tasks such as the
[RVL-CDIP](https://www.cs.cm... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2forsequenceclassification | #layoutlmv2forsequenceclassification | .md | 132_12 |
LayoutLMv2 Model with a token classification head on top (a linear layer on top of the text part of the hidden
states) e.g. for sequence labeling (information extraction) tasks such as
[FUNSD](https://guillaumejaume.github.io/FUNSD/), [SROIE](https://rrc.cvc.uab.es/?ch=13),
[CORD](https://github.com/clovaai/cord) and [... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2fortokenclassification | #layoutlmv2fortokenclassification | .md | 132_13 |
LayoutLMv2 Model with a span classification head on top for extractive question-answering tasks such as
[DocVQA](https://rrc.cvc.uab.es/?ch=17) (a linear layer on top of the text part of the hidden-states output to
compute `span start logits` and `span end logits`).
This model is a PyTorch [torch.nn.Module](https://p... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/layoutlmv2.md | https://huggingface.co/docs/transformers/en/model_doc/layoutlmv2/#layoutlmv2forquestionanswering | #layoutlmv2forquestionanswering | .md | 132_14 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/ | .md | 133_0 | |
<Tip warning={true}>
This model is in maintenance mode only, so we won't accept any new PRs changing its code.
If you run into any issues running this model, please reinstall the last version that supported this model: v4.30.0.
You can do so by running the following command: `pip install -U transformers==4.30.0`. ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#retribert | #retribert | .md | 133_1 |
The RetriBERT model was proposed in the blog post [Explain Anything Like I'm Five: A Model for Open Domain Long Form
Question Answering](https://yjernite.github.io/lfqa.html). RetriBERT is a small model that uses either a single or
pair of BERT encoders with lower-dimension projection for dense semantic indexing of tex... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#overview | #overview | .md | 133_2 |
This is the configuration class to store the configuration of a [`RetriBertModel`]. It is used to instantiate a
RetriBertModel model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the RetriBERT
[yjernit... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#retribertconfig | #retribertconfig | .md | 133_3 |
Constructs a RetriBERT tokenizer.
[`RetriBertTokenizer`] is identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting
and wordpiece.
This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer
to: this superclass for more information ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#retriberttokenizer | #retriberttokenizer | .md | 133_4 |
Construct a "fast" RetriBERT tokenizer (backed by HuggingFace's *tokenizers* library).
[`RetriBertTokenizerFast`] is identical to [`BertTokenizerFast`] and runs end-to-end tokenization: punctuation
splitting and wordpiece.
This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of the main meth... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#retriberttokenizerfast | #retriberttokenizerfast | .md | 133_5 |
Bert Based model to embed queries or document for document retrieval.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This model is als... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/retribert.md | https://huggingface.co/docs/transformers/en/model_doc/retribert/#retribertmodel | #retribertmodel | .md | 133_6 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/ | .md | 134_0 | |
Bark is a transformer-based text-to-speech model proposed by Suno AI in [suno-ai/bark](https://github.com/suno-ai/bark).
Bark is made of 4 main models:
- [`BarkSemanticModel`] (also referred to as the 'text' model): a causal auto-regressive transformer model that takes as input tokenized text, and predicts semantic... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#overview | #overview | .md | 134_1 |
Bark can be optimized with just a few extra lines of code, which **significantly reduces its memory footprint** and **accelerates inference**. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#optimizing-bark | #optimizing-bark | .md | 134_2 |
You can speed up inference and reduce memory footprint by 50% simply by loading the model in half-precision.
```python
from transformers import BarkModel
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
model = BarkModel.from_pretrained("suno/bark-small", torch_dtype=torch.float16).to(device)
``` | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#using-half-precision | #using-half-precision | .md | 134_3 |
As mentioned above, Bark is made up of 4 sub-models, which are called up sequentially during audio generation. In other words, while one sub-model is in use, the other sub-models are idle.
If you're using a CUDA device, a simple solution to benefit from an 80% reduction in memory footprint is to offload the submodels... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#using-cpu-offload | #using-cpu-offload | .md | 134_4 |
Better Transformer is an 🤗 Optimum feature that performs kernel fusion under the hood. You can gain 20% to 30% in speed with zero performance degradation. It only requires one line of code to export the model to 🤗 Better Transformer:
```python
model = model.to_bettertransformer()
```
Note that 🤗 Optimum must be... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#using-better-transformer | #using-better-transformer | .md | 134_5 |
Flash Attention 2 is an even faster, optimized version of the previous optimization.
##### Installation
First, check whether your hardware is compatible with Flash Attention 2. The latest list of compatible hardware can be found in the [official documentation](https://github.com/Dao-AILab/flash-attention#installati... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#using-flash-attention-2 | #using-flash-attention-2 | .md | 134_6 |
You can combine optimization techniques, and use CPU offload, half-precision and Flash Attention 2 (or 🤗 Better Transformer) all at once.
```python
from transformers import BarkModel
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
# load in fp16 and use Flash Attention 2
model = BarkModel.from... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#combining-optimization-techniques | #combining-optimization-techniques | .md | 134_7 |
Suno offers a library of voice presets in a number of languages [here](https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c).
These presets are also uploaded in the hub [here](https://huggingface.co/suno/bark-small/tree/main/speaker_embeddings) or [here](https://huggingface.co... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#usage-tips | #usage-tips | .md | 134_8 |
This is the configuration class to store the configuration of a [`BarkModel`]. It is used to instantiate a Bark
model according to the specified sub-models configurations, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Bark
[suno/bark... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkconfig | #barkconfig | .md | 134_9 |
Constructs a Bark processor which wraps a text tokenizer and optional Bark voice presets into a single processor.
Args:
tokenizer ([`PreTrainedTokenizer`]):
An instance of [`PreTrainedTokenizer`].
speaker_embeddings (`Dict[Dict[str]]`, *optional*):
Optional nested speaker embeddings dictionary. The first level contai... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkprocessor | #barkprocessor | .md | 134_10 |
The full Bark model, a text-to-speech model composed of 4 sub-models:
- [`BarkSemanticModel`] (also referred to as the 'text' model): a causal auto-regressive transformer model that
takes
as input tokenized text, and predicts semantic text tokens that capture the meaning of the text.
- [`BarkCoarseModel`] (also refered... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkmodel | #barkmodel | .md | 134_11 |
Bark semantic (or text) model. It shares the same architecture as the coarse model.
It is a GPT-2 like autoregressive model with a language modeling head on top.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as dow... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barksemanticmodel | #barksemanticmodel | .md | 134_12 |
Bark coarse acoustics model.
It shares the same architecture as the semantic (or text) model. It is a GPT-2 like autoregressive model with a
language modeling head on top.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (s... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkcoarsemodel | #barkcoarsemodel | .md | 134_13 |
Bark fine acoustics model. It is a non-causal GPT-like model with `config.n_codes_total` embedding layers and
language modeling heads, one for each codebook.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloa... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkfinemodel | #barkfinemodel | .md | 134_14 |
No docstring available for BarkCausalModel
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkcausalmodel | #barkcausalmodel | .md | 134_15 |
This is the configuration class to store the configuration of a [`BarkCoarseModel`]. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark [suno/bark](https://huggi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkcoarseconfig | #barkcoarseconfig | .md | 134_16 |
This is the configuration class to store the configuration of a [`BarkFineModel`]. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark [suno/bark](https://hugging... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barkfineconfig | #barkfineconfig | .md | 134_17 |
This is the configuration class to store the configuration of a [`BarkSemanticModel`]. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark [suno/bark](https://hug... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/bark.md | https://huggingface.co/docs/transformers/en/model_doc/bark/#barksemanticconfig | #barksemanticconfig | .md | 134_18 |
<!--Copyright 2023 The HuggingFace and Baidu Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/ | .md | 135_0 | |
<Tip warning={true}>
This model is in maintenance mode only, we don't accept any new PRs changing its code.
If you run into any issues running this model, please reinstall the last version that supported this model: v4.40.2.
You can do so by running the following command: `pip install -U transformers==4.40.2`.
</Ti... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniem | #erniem | .md | 135_1 |
The ErnieM model was proposed in [ERNIE-M: Enhanced Multilingual Representation by Aligning
Cross-lingual Semantics with Monolingual Corpora](https://arxiv.org/abs/2012.15674) by Xuan Ouyang, Shuohuan Wang, Chao Pang, Yu Sun,
Hao Tian, Hua Wu, Haifeng Wang.
The abstract from the paper is the following:
*Recent stu... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#overview | #overview | .md | 135_2 |
- Ernie-M is a BERT-like model so it is a stacked Transformer Encoder.
- Instead of using MaskedLM for pretraining (like BERT) the authors used two novel techniques: `Cross-attention Masked Language Modeling` and `Back-translation Masked Language Modeling`. For now these two LMHead objectives are not implemented here.
... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#usage-tips | #usage-tips | .md | 135_3 |
- [Text classification task guide](../tasks/sequence_classification)
- [Token classification task guide](../tasks/token_classification)
- [Question answering task guide](../tasks/question_answering)
- [Multiple choice task guide](../tasks/multiple_choice) | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#resources | #resources | .md | 135_4 |
This is the configuration class to store the configuration of a [`ErnieMModel`]. It is used to instantiate a
Ernie-M model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the `Ernie-M`
[susnato/ernie-m-b... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemconfig | #erniemconfig | .md | 135_5 |
Constructs a Ernie-M tokenizer. It uses the `sentencepiece` tools to cut the words to sub-words.
Args:
sentencepiece_model_file (`str`):
The file path of sentencepiece model.
vocab_file (`str`, *optional*):
The file path of the vocabulary.
do_lower_case (`str`, *optional*, defaults to `True`):
Whether or not to lower... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemtokenizer | #erniemtokenizer | .md | 135_6 |
The bare ErnieM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning head... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemmodel | #erniemmodel | .md | 135_7 |
ErnieM Model transformer with a sequence classification/regression head on top (a linear layer on top of
the pooled output) e.g. for GLUE tasks.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or sav... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemforsequenceclassification | #erniemforsequenceclassification | .md | 135_8 |
ErnieM Model with a multiple choice classification head on top (a linear layer on top of
the pooled output and a softmax) e.g. for RocStories/SWAG tasks.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloadi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemformultiplechoice | #erniemformultiplechoice | .md | 135_9 |
ErnieM Model with a token classification head on top (a linear layer on top of
the hidden-states output) e.g. for Named-Entity-Recognition (NER) tasks.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemfortokenclassification | #erniemfortokenclassification | .md | 135_10 |
ErnieM 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`).
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemforquestionanswering | #erniemforquestionanswering | .md | 135_11 |
ErnieMForInformationExtraction is a Ernie-M Model with two linear layer on top of the hidden-states output to
compute `start_prob` and `end_prob`, designed for Universal Information Extraction.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library impleme... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/ernie_m.md | https://huggingface.co/docs/transformers/en/model_doc/ernie_m/#erniemforinformationextraction | #erniemforinformationextraction | .md | 135_12 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/ | .md | 136_0 | |
The SegGPT model was proposed in [SegGPT: Segmenting Everything In Context](https://arxiv.org/abs/2304.03284) by Xinlong Wang, Xiaosong Zhang, Yue Cao, Wen Wang, Chunhua Shen, Tiejun Huang. SegGPT employs a decoder-only Transformer that can generate a segmentation mask given an input image, a prompt image and its corre... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/#overview | #overview | .md | 136_1 |
This is the configuration class to store the configuration of a [`SegGptModel`]. It is used to instantiate a SegGPT
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the SegGPT
[BAAI/seggpt-vit-large... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/#seggptconfig | #seggptconfig | .md | 136_2 |
Constructs a SegGpt image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `(size["height"],
size["width"])`. Can be overridden by the `do_resize` parameter in the `preprocess` method.
size (`dict`, *optional*, defaults to `... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/#seggptimageprocessor | #seggptimageprocessor | .md | 136_3 |
The bare SegGpt Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/#seggptmodel | #seggptmodel | .md | 136_4 |
SegGpt model with a decoder on top for one-shot image segmentation.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.
Parameters:
c... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/seggpt.md | https://huggingface.co/docs/transformers/en/model_doc/seggpt/#seggptforimagesegmentation | #seggptforimagesegmentation | .md | 136_5 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/ | .md | 137_0 | |
The FastSpeech2Conformer model was proposed with the paper [Recent Developments On Espnet Toolkit Boosted By Conformer](https://arxiv.org/abs/2010.13956) by Pengcheng Guo, Florian Boyer, Xuankai Chang, Tomoki Hayashi, Yosuke Higuchi, Hirofumi Inaguma, Naoyuki Kamo, Chenda Li, Daniel Garcia-Romero, Jiatong Shi, Jing Shi... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#overview | #overview | .md | 137_1 |
FastSpeech2's general structure with a Mel-spectrogram decoder was implemented, and the traditional transformer blocks were replaced with conformer blocks as done in the ESPnet library. | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#-model-architecture | #-model-architecture | .md | 137_2 |
 | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2-model-architecture | #fastspeech2-model-architecture | .md | 137_3 |
 | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#conformer-blocks | #conformer-blocks | .md | 137_4 |
 | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#convolution-module | #convolution-module | .md | 137_5 |
You can run FastSpeech2Conformer locally with the 🤗 Transformers library.
1. First install the 🤗 [Transformers library](https://github.com/huggingface/transformers), g2p-en:
```bash
pip install --upgrade pip
pip install --upgrade transformers g2p-en
```
2. Run inference via the Transformers modelling code with ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#-transformers-usage | #-transformers-usage | .md | 137_6 |
This is the configuration class to store the configuration of a [`FastSpeech2ConformerModel`]. It is used to
instantiate a FastSpeech2Conformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the
F... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformerconfig | #fastspeech2conformerconfig | .md | 137_7 |
This is the configuration class to store the configuration of a [`FastSpeech2ConformerHifiGanModel`]. It is used to
instantiate a FastSpeech2Conformer HiFi-GAN vocoder model according to the specified arguments, defining the model
architecture. Instantiating a configuration with the defaults will yield a similar config... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformerhifiganconfig | #fastspeech2conformerhifiganconfig | .md | 137_8 |
This is the configuration class to store the configuration of a [`FastSpeech2ConformerWithHifiGan`]. It is used to
instantiate a `FastSpeech2ConformerWithHifiGanModel` model according to the specified sub-models configurations,
defining the model architecture.
Instantiating a configuration with the defaults will yiel... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformerwithhifiganconfig | #fastspeech2conformerwithhifiganconfig | .md | 137_9 |
Construct a FastSpeech2Conformer tokenizer.
Args:
vocab_file (`str`):
Path to the vocabulary file.
bos_token (`str`, *optional*, defaults to `"<sos/eos>"`):
The begin of sequence token. Note that for FastSpeech2, it is the same as the `eos_token`.
eos_token (`str`, *optional*, defaults to `"<sos/eos>"`):
The end of s... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformertokenizer | #fastspeech2conformertokenizer | .md | 137_10 |
FastSpeech2Conformer Model.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This model is also a PyTorch [torch.nn.Module](https://pytorc... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformermodel | #fastspeech2conformermodel | .md | 137_11 |
HiFi-GAN vocoder.
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)
This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformerhifigan | #fastspeech2conformerhifigan | .md | 137_12 |
The FastSpeech2ConformerModel with a FastSpeech2ConformerHifiGan vocoder head that performs text-to-speech (waveform).
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embe... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/fastspeech2_conformer.md | https://huggingface.co/docs/transformers/en/model_doc/fastspeech2_conformer/#fastspeech2conformerwithhifigan | #fastspeech2conformerwithhifigan | .md | 137_13 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/ | .md | 138_0 | |
The X-CLIP model was proposed in [Expanding Language-Image Pretrained Models for General Video Recognition](https://arxiv.org/abs/2208.02816) by Bolin Ni, Houwen Peng, Minghao Chen, Songyang Zhang, Gaofeng Meng, Jianlong Fu, Shiming Xiang, Haibin Ling.
X-CLIP is a minimal extension of [CLIP](clip) for video. The model ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#overview | #overview | .md | 138_1 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with X-CLIP.
- Demo notebooks for X-CLIP can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/X-CLIP).
If you're interested in submitting a resource to be included here, please feel free... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#resources | #resources | .md | 138_2 |
Constructs an X-CLIP processor which wraps a VideoMAE image processor and a CLIP tokenizer into a single processor.
[`XCLIPProcessor`] offers all the functionalities of [`VideoMAEImageProcessor`] and [`CLIPTokenizerFast`]. See the
[`~XCLIPProcessor.__call__`] and [`~XCLIPProcessor.decode`] for more information.
Arg... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xclipprocessor | #xclipprocessor | .md | 138_3 |
[`XCLIPConfig`] is the configuration class to store the configuration of a [`XCLIPModel`]. It is used to
instantiate X-CLIP model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the X-CL... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xclipconfig | #xclipconfig | .md | 138_4 |
This is the configuration class to store the configuration of a [`XCLIPModel`]. It is used to instantiate an X-CLIP
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the X-CLIP
[microsoft/xclip-base-... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xcliptextconfig | #xcliptextconfig | .md | 138_5 |
This is the configuration class to store the configuration of a [`XCLIPModel`]. It is used to instantiate an X-CLIP
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the X-CLIP
[microsoft/xclip-base-... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xclipvisionconfig | #xclipvisionconfig | .md | 138_6 |
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.
Parameters:
config ([`XCLIPConfig`]): Model configuration class with all the para... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xclipmodel | #xclipmodel | .md | 138_7 |
No docstring available for XCLIPTextModel
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xcliptextmodel | #xcliptextmodel | .md | 138_8 |
No docstring available for XCLIPVisionModel
Methods: forward | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/xclip.md | https://huggingface.co/docs/transformers/en/model_doc/xclip/#xclipvisionmodel | #xclipvisionmodel | .md | 138_9 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/ | .md | 139_0 | |
The VideoMAE model was proposed in [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders ([MAE](vit_mae)) to video, claiming state-of-the-art performance ... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#overview | #overview | .md | 139_1 |
PyTorch includes a native scaled dot-product attention (SDPA) operator as part of `torch.nn.functional`. This function
encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the
[official documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.s... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#using-scaled-dot-product-attention-sdpa | #using-scaled-dot-product-attention-sdpa | .md | 139_2 |
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with VideoMAE. If
you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll
review it! The resource should ideally demonstrate something new instead of duplicating an... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#resources | #resources | .md | 139_3 |
This is the configuration class to store the configuration of a [`VideoMAEModel`]. It is used to instantiate a
VideoMAE model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the VideoMAE
[MCG-NJU/videoma... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaeconfig | #videomaeconfig | .md | 139_4 |
No docstring available for VideoMAEFeatureExtractor
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaefeatureextractor | #videomaefeatureextractor | .md | 139_5 |
Constructs a VideoMAE image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by the
`do_resize` parameter in the `preprocess` method.
size (`Dict[str, int]` *optional*, defaults to `{"shortest_edge"... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaeimageprocessor | #videomaeimageprocessor | .md | 139_6 |
The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usag... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaemodel | #videomaemodel | .md | 139_7 |
`VideoMAEForPreTraining` includes the decoder on top for self-supervised pre-training.
The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Modul... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaeforpretraining | #videomaeforpretraining | .md | 139_8 |
VideoMAE Model transformer with a video classification head on top (a linear layer on top of the average pooled hidden
states of all tokens) e.g. for ImageNet.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/videomae.md | https://huggingface.co/docs/transformers/en/model_doc/videomae/#videomaeforvideoclassification | #videomaeforvideoclassification | .md | 139_9 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/ | .md | 140_0 | |
The Vision Transformer (ViT) model was proposed in [An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk
Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigo... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#overview | #overview | .md | 140_1 |
- To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image, which can be
used for classification. The authors also add absolute position embeddings, and fee... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#usage-tips | #usage-tips | .md | 140_2 |
PyTorch includes a native scaled dot-product attention (SDPA) operator as part of `torch.nn.functional`. This function
encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the
[official documentation](https://pytorch.org/docs/stable/generated/torch.nn.functional.s... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#using-scaled-dot-product-attention-sdpa | #using-scaled-dot-product-attention-sdpa | .md | 140_3 |
Demo notebooks regarding inference as well as fine-tuning ViT on custom data can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer).
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViT. If you're interested in submit... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#resources | #resources | .md | 140_4 |
This is the configuration class to store the configuration of a [`ViTModel`]. It is used to instantiate an ViT
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the ViT
[google/vit-base-patch16-224](... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitconfig | #vitconfig | .md | 140_5 |
No docstring available for ViTFeatureExtractor
Methods: __call__ | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitfeatureextractor | #vitfeatureextractor | .md | 140_6 |
Constructs a ViT image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `(size["height"],
size["width"])`. Can be overridden by the `do_resize` parameter in the `preprocess` method.
size (`dict`, *optional*, defaults to `{"h... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitimageprocessor | #vitimageprocessor | .md | 140_7 |
Constructs a ViT image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `(size["height"],
size["width"])`. Can be overridden by the `do_resize` parameter in the `preprocess` method.
size (`dict`, *optional*, defaults to `{"h... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitimageprocessorfast | #vitimageprocessorfast | .md | 140_8 |
The bare ViT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitmodel | #vitmodel | .md | 140_9 |
ViT Model with a decoder on top for masked image modeling, as proposed in [SimMIM](https://arxiv.org/abs/2111.09886).
<Tip>
Note that we provide a script to pre-train this model on custom data in our [examples
directory](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining).
</... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitformaskedimagemodeling | #vitformaskedimagemodeling | .md | 140_10 |
ViT Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.
<Tip>
Note that it's possible to fine-tune ViT on higher resolution images than the ones it has been trained on, by
setting `interpolate_pos_encoding` to `True` in t... | /Users/nielsrogge/Documents/python_projecten/transformers/docs/source/en/model_doc/vit.md | https://huggingface.co/docs/transformers/en/model_doc/vit/#vitforimageclassification | #vitforimageclassification | .md | 140_11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.