import{S as Qh,i as Zh,s as ef,e as a,k as c,w as y,t as n,M as tf,c as s,d as t,m,a as r,x as w,h as i,b as d,N as of,G as e,g as _,y as $,q as T,o as x,B,v as af,L as Et}from"../../chunks/vendor-hf-doc-builder.js";import{T as ia}from"../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ft}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as R}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as kt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function sf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitConfig, BeitModel

# Initializing a BEiT beit-base-patch16-224-pt22k style configuration
configuration = BeitConfig()

# Initializing a model (with random weights) from the beit-base-patch16-224-pt22k style configuration
model = BeitModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitConfig, BeitModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BEiT beit-base-patch16-224-pt22k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BeitConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the beit-base-patch16-224-pt22k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=a("p"),v=n("Example:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Example:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function rf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function nf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, BeitModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224-pt22k")
model = BeitModel.from_pretrained("microsoft/beit-base-patch16-224-pt22k")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, BeitModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitModel.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">197</span>, <span class="hljs-number">768</span>]`}}),{c(){p=a("p"),v=n("Example:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Example:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function lf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function df(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, BeitForMaskedImageModeling
import torch
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224-pt22k")
model = BeitForMaskedImageModeling.from_pretrained("microsoft/beit-base-patch16-224-pt22k")

num_patches = (model.config.image_size // model.config.patch_size) ** 2
pixel_values = image_processor(images=image, return_tensors="pt").pixel_values
# create random boolean mask of shape (batch_size, num_patches)
bool_masked_pos = torch.randint(low=0, high=2, size=(1, num_patches)).bool()

outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
loss, logits = outputs.loss, outputs.logits
list(logits.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, BeitForMaskedImageModeling
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitForMaskedImageModeling.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>num_patches = (model.config.image_size // model.config.patch_size) ** <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># create random boolean mask of shape (batch_size, num_patches)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>bool_masked_pos = torch.randint(low=<span class="hljs-number">0</span>, high=<span class="hljs-number">2</span>, size=(<span class="hljs-number">1</span>, num_patches)).<span class="hljs-built_in">bool</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss, logits = outputs.loss, outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">196</span>, <span class="hljs-number">8192</span>]`}}),{c(){p=a("p"),v=n("Examples:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Examples:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function cf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function mf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, BeitForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224")
model = BeitForImageClassification.from_pretrained("microsoft/beit-base-patch16-224")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, BeitForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){p=a("p"),v=n("Example:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Example:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function pf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function hf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import AutoImageProcessor, BeitForSemanticSegmentation
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = AutoImageProcessor.from_pretrained("microsoft/beit-base-finetuned-ade-640-640")
model = BeitForSemanticSegmentation.from_pretrained("microsoft/beit-base-finetuned-ade-640-640")

inputs = image_processor(images=image, return_tensors="pt")
outputs = model(**inputs)
# logits are of shape (batch_size, num_labels, height, width)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, BeitForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-finetuned-ade-640-640&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-finetuned-ade-640-640&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){p=a("p"),v=n("Examples:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Examples:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function ff(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function gf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, FlaxBeitModel
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224-pt22k-ft22k")
model = FlaxBeitModel.from_pretrained("microsoft/beit-base-patch16-224-pt22k-ft22k")

inputs = image_processor(images=image, return_tensors="np")
outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, FlaxBeitModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k-ft22k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBeitModel.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k-ft22k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){p=a("p"),v=n("Examples:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Examples:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function uf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function _f(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, BeitForMaskedImageModeling
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224-pt22k")
model = BeitForMaskedImageModeling.from_pretrained("microsoft/beit-base-patch16-224-pt22k")

inputs = image_processor(images=image, return_tensors="np")
outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, BeitForMaskedImageModeling
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BeitForMaskedImageModeling.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){p=a("p"),v=n("Examples:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Examples:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function bf(I){let p,v,u,f,b;return{c(){p=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a("code"),f=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(h,"CODE",{});var k=r(u);f=i(k,"Module"),k.forEach(t),b=i(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(l,h){_(l,p,h),e(p,v),e(p,u),e(u,f),e(p,b)},d(l){l&&t(p)}}}function vf(I){let p,v,u,f,b;return f=new Ft({props:{code:`from transformers import BeitImageProcessor, FlaxBeitForImageClassification
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224")
model = FlaxBeitForImageClassification.from_pretrained("microsoft/beit-base-patch16-224")

inputs = image_processor(images=image, return_tensors="np")
outputs = model(**inputs)
logits = outputs.logits
# model predicts one of the 1000 ImageNet classes
predicted_class_idx = logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitImageProcessor, FlaxBeitForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = BeitImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBeitForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/beit-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[predicted_class_idx])`}}),{c(){p=a("p"),v=n("Example:"),u=c(),y(f.$$.fragment)},l(l){p=s(l,"P",{});var h=r(p);v=i(h,"Example:"),h.forEach(t),u=m(l),w(f.$$.fragment,l)},m(l,h){_(l,p,h),e(p,v),_(l,u,h),$(f,l,h),b=!0},p:Et,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){x(f.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(u),B(f,l)}}}function yf(I){let p,v,u,f,b,l,h,k,En,_r,ce,Ae,Ka,Pt,Fn,Xa,Pn,br,U,Mn,Mt,jn,zn,jt,Cn,An,zt,Sn,Nn,vr,la,qn,yr,da,Ya,Ln,wr,ca,Dn,$r,z,F,On,ma,Wn,Vn,pa,Rn,Un,Ct,Hn,Jn,ha,Gn,Kn,fa,Xn,Yn,ga,Qn,Zn,ua,ei,ti,oi,At,ai,St,si,ri,ni,Nt,ii,_a,li,di,ci,me,mi,Qa,pi,hi,qt,fi,gi,ui,pe,_i,Lt,bi,vi,Dt,yi,wi,$i,L,Ti,Za,xi,Bi,es,Ii,ki,ba,Ei,Fi,ts,Pi,Mi,Tr,Se,Cm,xr,Ot,ji,va,zi,Br,H,Ci,Wt,Ai,Si,Vt,Ni,qi,Rt,Li,Di,Ir,he,Ne,os,Ut,Oi,as,Wi,kr,fe,Ht,Vi,Jt,Ri,ya,Ui,Hi,Er,ge,Gt,Ji,Kt,Gi,wa,Ki,Xi,Fr,ue,qe,ss,Xt,Yi,rs,Qi,Pr,ee,Yt,Zi,_e,el,$a,tl,ol,Qt,al,sl,rl,Le,Mr,be,De,ns,Zt,nl,is,il,jr,D,eo,ll,ls,dl,cl,Ta,to,ml,Oe,oo,pl,ao,hl,xa,fl,gl,zr,ve,We,ds,so,ul,cs,_l,Cr,O,ro,bl,ms,vl,yl,Ve,no,wl,ps,$l,Tl,Re,io,xl,lo,Bl,Ba,Il,kl,Ar,ye,Ue,hs,co,El,fs,Fl,Sr,te,mo,Pl,po,Ml,ho,jl,zl,Cl,J,fo,Al,we,Sl,Ia,Nl,ql,gs,Ll,Dl,Ol,He,Wl,Je,Nr,$e,Ge,us,go,Vl,_s,Rl,qr,oe,uo,Ul,ae,Hl,ka,Jl,Gl,Ea,Kl,Xl,_o,Yl,Ql,Zl,G,bo,ed,Te,td,Fa,od,ad,bs,sd,rd,nd,Ke,id,Xe,Lr,xe,Ye,vs,vo,ld,ys,dd,Dr,W,yo,cd,ws,md,pd,wo,hd,$o,fd,gd,ud,K,To,_d,Be,bd,Pa,vd,yd,$s,wd,$d,Td,Qe,xd,Ze,Or,Ie,et,Ts,xo,Bd,xs,Id,Wr,V,Bo,kd,Bs,Ed,Fd,Io,Pd,ko,Md,jd,zd,X,Eo,Cd,ke,Ad,Ma,Sd,Nd,Is,qd,Ld,Dd,tt,Od,ot,Vr,Ee,at,ks,Fo,Wd,Es,Vd,Rr,P,Po,Rd,Fs,Ud,Hd,Mo,Jd,ja,Gd,Kd,Xd,jo,Yd,zo,Qd,Zd,ec,Ps,tc,oc,se,Ms,Co,ac,sc,js,Ao,rc,nc,zs,So,ic,lc,Cs,No,dc,cc,Y,qo,mc,Fe,pc,As,hc,fc,Ss,gc,uc,_c,st,bc,rt,Ur,Pe,nt,Ns,Lo,vc,qs,yc,Hr,M,Do,wc,Ls,$c,Tc,Oo,xc,za,Bc,Ic,kc,Wo,Ec,Vo,Fc,Pc,Mc,Ds,jc,zc,re,Os,Ro,Cc,Ac,Ws,Uo,Sc,Nc,Vs,Ho,qc,Lc,Rs,Jo,Dc,Oc,A,Go,Wc,Me,Vc,Us,Rc,Uc,Hs,Hc,Jc,Gc,it,Kc,je,Xc,Js,Yc,Qc,Gs,Zc,em,tm,lt,Jr,ze,dt,Ks,Ko,om,Xs,am,Gr,j,Xo,sm,Ys,rm,nm,Yo,im,Ca,lm,dm,cm,Qo,mm,Zo,pm,hm,fm,Qs,gm,um,ne,Zs,ea,_m,bm,er,ta,vm,ym,tr,oa,wm,$m,or,aa,Tm,xm,Q,sa,Bm,Ce,Im,ar,km,Em,sr,Fm,Pm,Mm,ct,jm,mt,Kr;return l=new R({}),Pt=new R({}),Ut=new R({}),Ht=new E({props:{name:"class transformers.models.beit.modeling_beit.BeitModelOutputWithPooling",anchor:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling",parameters:[{name:"last_hidden_state",val:": FloatTensor = None"},{name:"pooler_output",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the model.`,name:"last_hidden_state"},{anchor:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling.pooler_output",description:`<strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) &#x2014;
Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.`,name:"pooler_output"},{anchor:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L69"}}),Gt=new E({props:{name:"class transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling",anchor:"transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling",parameters:[{name:"last_hidden_state",val:": ndarray = None"},{name:"pooler_output",val:": ndarray = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[jax._src.numpy.ndarray.ndarray]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[jax._src.numpy.ndarray.ndarray]] = None"}],parametersDescription:[{anchor:"transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the model.`,name:"last_hidden_state"},{anchor:"transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling.pooler_output",description:`<strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) &#x2014;
Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.`,name:"pooler_output"},{anchor:"transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer plus
the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling.attentions",description:`<strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L46"}}),Xt=new R({}),Yt=new E({props:{name:"class transformers.BeitConfig",anchor:"transformers.BeitConfig",parameters:[{name:"vocab_size",val:" = 8192"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"is_encoder_decoder",val:" = False"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"use_mask_token",val:" = False"},{name:"use_absolute_position_embeddings",val:" = False"},{name:"use_relative_position_bias",val:" = False"},{name:"use_shared_relative_position_bias",val:" = False"},{name:"layer_scale_init_value",val:" = 0.1"},{name:"drop_path_rate",val:" = 0.1"},{name:"use_mean_pooling",val:" = True"},{name:"out_indices",val:" = [3, 5, 7, 11]"},{name:"pool_scales",val:" = [1, 2, 3, 6]"},{name:"use_auxiliary_head",val:" = True"},{name:"auxiliary_loss_weight",val:" = 0.4"},{name:"auxiliary_channels",val:" = 256"},{name:"auxiliary_num_convs",val:" = 1"},{name:"auxiliary_concat_input",val:" = False"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeitConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8092) &#x2014;
Vocabulary size of the BEiT model. Defines the number of different image tokens that can be used during
pre-training.`,name:"vocab_size"},{anchor:"transformers.BeitConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.BeitConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.BeitConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BeitConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BeitConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BeitConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BeitConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.BeitConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BeitConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BeitConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.BeitConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.BeitConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.BeitConfig.use_mask_token",description:`<strong>use_mask_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a mask token for masked image modeling.`,name:"use_mask_token"},{anchor:"transformers.BeitConfig.use_absolute_position_embeddings",description:`<strong>use_absolute_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use BERT-style absolute position embeddings.`,name:"use_absolute_position_embeddings"},{anchor:"transformers.BeitConfig.use_relative_position_bias",description:`<strong>use_relative_position_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use T5-style relative position embeddings in the self-attention layers.`,name:"use_relative_position_bias"},{anchor:"transformers.BeitConfig.use_shared_relative_position_bias",description:`<strong>use_shared_relative_position_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use the same relative position embeddings across all self-attention layers of the Transformer.`,name:"use_shared_relative_position_bias"},{anchor:"transformers.BeitConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Scale to use in the self-attention layers. 0.1 for base, 1e-5 for large. Set 0 to disable layer scale.`,name:"layer_scale_init_value"},{anchor:"transformers.BeitConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Stochastic depth rate per sample (when applied in the main path of residual layers).`,name:"drop_path_rate"},{anchor:"transformers.BeitConfig.use_mean_pooling",description:`<strong>use_mean_pooling</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to mean pool the final hidden states of the patches instead of using the final hidden state of the
CLS token, before applying the classification head.`,name:"use_mean_pooling"},{anchor:"transformers.BeitConfig.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 5, 7, 11]</code>) &#x2014;
Indices of the feature maps to use for semantic segmentation.`,name:"out_indices"},{anchor:"transformers.BeitConfig.pool_scales",description:`<strong>pool_scales</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 3, 6]</code>) &#x2014;
Pooling scales used in Pooling Pyramid Module applied on the last feature map.`,name:"pool_scales"},{anchor:"transformers.BeitConfig.use_auxiliary_head",description:`<strong>use_auxiliary_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use an auxiliary head during training.`,name:"use_auxiliary_head"},{anchor:"transformers.BeitConfig.auxiliary_loss_weight",description:`<strong>auxiliary_loss_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Weight of the cross-entropy loss of the auxiliary head.`,name:"auxiliary_loss_weight"},{anchor:"transformers.BeitConfig.auxiliary_channels",description:`<strong>auxiliary_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Number of channels to use in the auxiliary head.`,name:"auxiliary_channels"},{anchor:"transformers.BeitConfig.auxiliary_num_convs",description:`<strong>auxiliary_num_convs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of convolutional layers to use in the auxiliary head.`,name:"auxiliary_num_convs"},{anchor:"transformers.BeitConfig.auxiliary_concat_input",description:`<strong>auxiliary_concat_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to concatenate the output of the auxiliary head with the input before the classification layer.`,name:"auxiliary_concat_input"},{anchor:"transformers.BeitConfig.semantic_loss_ignore_index",description:`<strong>semantic_loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function of the semantic segmentation model.`,name:"semantic_loss_ignore_index"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/configuration_beit.py#L36"}}),Le=new kt({props:{anchor:"transformers.BeitConfig.example",$$slots:{default:[sf]},$$scope:{ctx:I}}}),Zt=new R({}),eo=new E({props:{name:"class transformers.BeitImageProcessor",anchor:"transformers.BeitImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_rescale",val:": bool = True"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_reduce_labels",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeitImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.BeitImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 256, &quot;width&quot;: 256}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.BeitImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.BeitImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image. If the input size is smaller than <code>crop_size</code> along any edge, the image
is padded with 0&#x2019;s and then center cropped. Can be overridden by the <code>do_center_crop</code> parameter in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.BeitImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Desired output size when applying center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.
Can be overridden by the <code>crop_size</code> parameter in the <code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.BeitImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.BeitImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.BeitImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.BeitImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
The mean to use if normalizing the image. This is a float or list of floats of length of the number of
channels of the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.BeitImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
The standard deviation to use if normalizing the image. This is a float or list of floats of length of the
number of channels of the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.BeitImageProcessor.do_reduce_labels",description:`<strong>do_reduce_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0 is
used for background, and background itself is not included in all classes of a dataset (e.g. ADE20k). The
background label will be replaced by 255. Can be overridden by the <code>do_reduce_labels</code> parameter in the
<code>preprocess</code> method.`,name:"do_reduce_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L50"}}),to=new E({props:{name:"__call__",anchor:"transformers.BeitImageProcessor.__call__",parameters:[{name:"images",val:""},{name:"segmentation_maps",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L339"}}),oo=new E({props:{name:"post_process_semantic_segmentation",anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForSemanticSegmentation">BeitForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If left to
None, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L486",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),so=new R({}),ro=new E({props:{name:"class transformers.BeitImageProcessor",anchor:"transformers.BeitImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_rescale",val:": bool = True"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_reduce_labels",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeitImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.BeitImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 256, &quot;width&quot;: 256}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.BeitImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.BeitImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image. If the input size is smaller than <code>crop_size</code> along any edge, the image
is padded with 0&#x2019;s and then center cropped. Can be overridden by the <code>do_center_crop</code> parameter in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.BeitImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Desired output size when applying center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.
Can be overridden by the <code>crop_size</code> parameter in the <code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.BeitImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.BeitImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.BeitImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.BeitImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
The mean to use if normalizing the image. This is a float or list of floats of length of the number of
channels of the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.BeitImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
The standard deviation to use if normalizing the image. This is a float or list of floats of length of the
number of channels of the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.BeitImageProcessor.do_reduce_labels",description:`<strong>do_reduce_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0 is
used for background, and background itself is not included in all classes of a dataset (e.g. ADE20k). The
background label will be replaced by 255. Can be overridden by the <code>do_reduce_labels</code> parameter in the
<code>preprocess</code> method.`,name:"do_reduce_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L50"}}),no=new E({props:{name:"preprocess",anchor:"transformers.BeitImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"segmentation_maps",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')], NoneType] = None"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_reduce_labels",val:": typing.Optional[bool] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeitImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.BeitImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.BeitImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing.`,name:"size"},{anchor:"transformers.BeitImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>, Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.BeitImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.BeitImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the image after center crop. If one edge the image is smaller than <code>crop_size</code>, it will be
padded with zeros and then cropped`,name:"crop_size"},{anchor:"transformers.BeitImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.BeitImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.BeitImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.BeitImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.BeitImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.BeitImageProcessor.preprocess.do_reduce_labels",description:`<strong>do_reduce_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_reduce_labels</code>) &#x2014;
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0
is used for background, and background itself is not included in all classes of a dataset (e.g.
ADE20k). The background label will be replaced by 255.`,name:"do_reduce_labels"},{anchor:"transformers.BeitImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.BeitImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L344"}}),io=new E({props:{name:"post_process_semantic_segmentation",anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForSemanticSegmentation">BeitForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.BeitImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If left to
None, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/image_processing_beit.py#L486",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),co=new R({}),mo=new E({props:{name:"class transformers.BeitModel",anchor:"transformers.BeitModel",parameters:[{name:"config",val:": BeitConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.BeitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L620"}}),fo=new E({props:{name:"forward",anchor:"transformers.BeitModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BeitModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor">BeitImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BeitModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BeitModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BeitModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BeitModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L647",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.models.beit.modeling_beit.BeitModelOutputWithPooling"
>transformers.models.beit.modeling_beit.BeitModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig"
>BeitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.models.beit.modeling_beit.BeitModelOutputWithPooling"
>transformers.models.beit.modeling_beit.BeitModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new ia({props:{$$slots:{default:[rf]},$$scope:{ctx:I}}}),Je=new kt({props:{anchor:"transformers.BeitModel.forward.example",$$slots:{default:[nf]},$$scope:{ctx:I}}}),go=new R({}),uo=new E({props:{name:"class transformers.BeitForMaskedImageModeling",anchor:"transformers.BeitForMaskedImageModeling",parameters:[{name:"config",val:": BeitConfig"}],parametersDescription:[{anchor:"transformers.BeitForMaskedImageModeling.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L732"}}),bo=new E({props:{name:"forward",anchor:"transformers.BeitForMaskedImageModeling.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BeitForMaskedImageModeling.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor">BeitImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BeitForMaskedImageModeling.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BeitForMaskedImageModeling.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BeitForMaskedImageModeling.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BeitForMaskedImageModeling.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BeitForMaskedImageModeling.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"},{anchor:"transformers.BeitForMaskedImageModeling.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L746",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig"
>BeitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ke=new ia({props:{$$slots:{default:[lf]},$$scope:{ctx:I}}}),Xe=new kt({props:{anchor:"transformers.BeitForMaskedImageModeling.forward.example",$$slots:{default:[df]},$$scope:{ctx:I}}}),vo=new R({}),yo=new E({props:{name:"class transformers.BeitForImageClassification",anchor:"transformers.BeitForImageClassification",parameters:[{name:"config",val:": BeitConfig"}],parametersDescription:[{anchor:"transformers.BeitForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L832"}}),To=new E({props:{name:"forward",anchor:"transformers.BeitForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BeitForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor">BeitImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BeitForImageClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BeitForImageClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BeitForImageClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BeitForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BeitForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L845",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig"
>BeitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qe=new ia({props:{$$slots:{default:[cf]},$$scope:{ctx:I}}}),Ze=new kt({props:{anchor:"transformers.BeitForImageClassification.forward.example",$$slots:{default:[mf]},$$scope:{ctx:I}}}),xo=new R({}),Bo=new E({props:{name:"class transformers.BeitForSemanticSegmentation",anchor:"transformers.BeitForSemanticSegmentation",parameters:[{name:"config",val:": BeitConfig"}],parametersDescription:[{anchor:"transformers.BeitForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L1156"}}),Eo=new E({props:{name:"forward",anchor:"transformers.BeitForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BeitForSemanticSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor">BeitImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BeitForSemanticSegmentation.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BeitForSemanticSegmentation.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BeitForSemanticSegmentation.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BeitForSemanticSegmentation.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BeitForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_beit.py#L1200",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig"
>BeitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, patch_size, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),tt=new ia({props:{$$slots:{default:[pf]},$$scope:{ctx:I}}}),ot=new kt({props:{anchor:"transformers.BeitForSemanticSegmentation.forward.example",$$slots:{default:[hf]},$$scope:{ctx:I}}}),Fo=new R({}),Po=new E({props:{name:"class transformers.FlaxBeitModel",anchor:"transformers.FlaxBeitModel",parameters:[{name:"config",val:": BeitConfig"},{name:"input_shape",val:" = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBeitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBeitModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L749"}}),qo=new E({props:{name:"__call__",anchor:"transformers.FlaxBeitModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"bool_masked_pos",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L635",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling"
>transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.beit.configuration_beit.BeitConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</li>
<li><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.</li>
<li><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer plus
the initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling"
>transformers.models.beit.modeling_flax_beit.FlaxBeitModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),st=new ia({props:{$$slots:{default:[ff]},$$scope:{ctx:I}}}),rt=new kt({props:{anchor:"transformers.FlaxBeitModel.__call__.example",$$slots:{default:[gf]},$$scope:{ctx:I}}}),Lo=new R({}),Do=new E({props:{name:"class transformers.FlaxBeitForMaskedImageModeling",anchor:"transformers.FlaxBeitForMaskedImageModeling",parameters:[{name:"config",val:": BeitConfig"},{name:"input_shape",val:" = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBeitForMaskedImageModeling.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBeitForMaskedImageModeling.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L833"}}),Go=new E({props:{name:"__call__",anchor:"transformers.FlaxBeitForMaskedImageModeling.__call__",parameters:[{name:"pixel_values",val:""},{name:"bool_masked_pos",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L635",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.beit.configuration_beit.BeitConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),it=new ia({props:{$$slots:{default:[uf]},$$scope:{ctx:I}}}),lt=new kt({props:{anchor:"transformers.FlaxBeitForMaskedImageModeling.__call__.example",$$slots:{default:[_f]},$$scope:{ctx:I}}}),Ko=new R({}),Xo=new E({props:{name:"class transformers.FlaxBeitForImageClassification",anchor:"transformers.FlaxBeitForImageClassification",parameters:[{name:"config",val:": BeitConfig"},{name:"input_shape",val:" = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBeitForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig">BeitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBeitForImageClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L920"}}),sa=new E({props:{name:"__call__",anchor:"transformers.FlaxBeitForImageClassification.__call__",parameters:[{name:"pixel_values",val:""},{name:"bool_masked_pos",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/beit/modeling_flax_beit.py#L635",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.beit.configuration_beit.BeitConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ct=new ia({props:{$$slots:{default:[bf]},$$scope:{ctx:I}}}),mt=new kt({props:{anchor:"transformers.FlaxBeitForImageClassification.__call__.example",$$slots:{default:[vf]},$$scope:{ctx:I}}}),{c(){p=a("meta"),v=c(),u=a("h1"),f=a("a"),b=a("span"),y(l.$$.fragment),h=c(),k=a("span"),En=n("BEiT"),_r=c(),ce=a("h2"),Ae=a("a"),Ka=a("span"),y(Pt.$$.fragment),Fn=c(),Xa=a("span"),Pn=n("Overview"),br=c(),U=a("p"),Mn=n("The BEiT model was proposed in "),Mt=a("a"),jn=n("BEiT: BERT Pre-Training of Image Transformers"),zn=n(` by
Hangbo Bao, Li Dong and Furu Wei. Inspired by BERT, BEiT is the first paper that makes self-supervised pre-training of
Vision Transformers (ViTs) outperform supervised pre-training. Rather than pre-training the model to predict the class
of an image (as done in the `),jt=a("a"),Cn=n("original ViT paper"),An=n(`), BEiT models are pre-trained to
predict visual tokens from the codebook of OpenAI\u2019s `),zt=a("a"),Sn=n("DALL-E model"),Nn=n(` given masked
patches.`),vr=c(),la=a("p"),qn=n("The abstract from the paper is the following:"),yr=c(),da=a("p"),Ya=a("em"),Ln=n(`We introduce a self-supervised vision representation model BEiT, which stands for Bidirectional Encoder representation
from Image Transformers. Following BERT developed in the natural language processing area, we propose a masked image
modeling task to pretrain vision Transformers. Specifically, each image has two views in our pre-training, i.e, image
patches (such as 16x16 pixels), and visual tokens (i.e., discrete tokens). We first \u201Ctokenize\u201D the original image into
visual tokens. Then we randomly mask some image patches and fed them into the backbone Transformer. The pre-training
objective is to recover the original visual tokens based on the corrupted image patches. After pre-training BEiT, we
directly fine-tune the model parameters on downstream tasks by appending task layers upon the pretrained encoder.
Experimental results on image classification and semantic segmentation show that our model achieves competitive results
with previous pre-training methods. For example, base-size BEiT achieves 83.2% top-1 accuracy on ImageNet-1K,
significantly outperforming from-scratch DeiT training (81.8%) with the same setup. Moreover, large-size BEiT obtains
86.3% only using ImageNet-1K, even outperforming ViT-L with supervised pre-training on ImageNet-22K (85.2%).`),wr=c(),ca=a("p"),Dn=n("Tips:"),$r=c(),z=a("ul"),F=a("li"),On=n(`BEiT models are regular Vision Transformers, but pre-trained in a self-supervised way rather than supervised. They
outperform both the `),ma=a("a"),Wn=n("original model (ViT)"),Vn=n(" as well as "),pa=a("a"),Rn=n("Data-efficient Image Transformers (DeiT)"),Un=n(` when fine-tuned on ImageNet-1K and CIFAR-100. You can check out demo notebooks regarding inference as well as
fine-tuning on custom data `),Ct=a("a"),Hn=n("here"),Jn=n(` (you can just replace
`),ha=a("a"),Gn=n("ViTFeatureExtractor"),Kn=n(" by "),fa=a("a"),Xn=n("BeitImageProcessor"),Yn=n(` and
`),ga=a("a"),Qn=n("ViTForImageClassification"),Zn=n(" by "),ua=a("a"),ei=n("BeitForImageClassification"),ti=n(")."),oi=c(),At=a("li"),ai=n(`There\u2019s also a demo notebook available which showcases how to combine DALL-E\u2019s image tokenizer with BEiT for
performing masked image modeling. You can find it `),St=a("a"),si=n("here"),ri=n("."),ni=c(),Nt=a("li"),ii=n(`As the BEiT models expect each image to be of the same size (resolution), one can use
`),_a=a("a"),li=n("BeitImageProcessor"),di=n(" to resize (or rescale) and normalize images for the model."),ci=c(),me=a("li"),mi=n(`Both the patch resolution and image resolution used during pre-training or fine-tuning are reflected in the name of
each checkpoint. For example, `),Qa=a("code"),pi=n("microsoft/beit-base-patch16-224"),hi=n(` refers to a base-sized architecture with patch
resolution of 16x16 and fine-tuning resolution of 224x224. All checkpoints can be found on the `),qt=a("a"),fi=n("hub"),gi=n("."),ui=c(),pe=a("li"),_i=n("The available checkpoints are either (1) pre-trained on "),Lt=a("a"),bi=n("ImageNet-22k"),vi=n(` (a collection of
14 million images and 22k classes) only, (2) also fine-tuned on ImageNet-22k or (3) also fine-tuned on `),Dt=a("a"),yi=n("ImageNet-1k"),wi=n(` (also referred to as ILSVRC 2012, a collection of 1.3 million
images and 1,000 classes).`),$i=c(),L=a("li"),Ti=n(`BEiT uses relative position embeddings, inspired by the T5 model. During pre-training, the authors shared the
relative position bias among the several self-attention layers. During fine-tuning, each layer\u2019s relative position
bias is initialized with the shared relative position bias obtained after pre-training. Note that, if one wants to
pre-train a model from scratch, one needs to either set the `),Za=a("code"),xi=n("use_relative_position_bias"),Bi=n(` or the
`),es=a("code"),Ii=n("use_relative_position_bias"),ki=n(" attribute of "),ba=a("a"),Ei=n("BeitConfig"),Fi=n(" to "),ts=a("code"),Pi=n("True"),Mi=n(` in order to add
position embeddings.`),Tr=c(),Se=a("img"),xr=c(),Ot=a("small"),ji=n("BEiT pre-training. Taken from the "),va=a("a"),zi=n("original paper."),Br=c(),H=a("p"),Ci=n("This model was contributed by "),Wt=a("a"),Ai=n("nielsr"),Si=n(`. The JAX/FLAX version of this model was
contributed by `),Vt=a("a"),Ni=n("kamalkraj"),qi=n(". The original code can be found "),Rt=a("a"),Li=n("here"),Di=n("."),Ir=c(),he=a("h2"),Ne=a("a"),os=a("span"),y(Ut.$$.fragment),Oi=c(),as=a("span"),Wi=n("BEiT specific outputs"),kr=c(),fe=a("div"),y(Ht.$$.fragment),Vi=c(),Jt=a("p"),Ri=n("Class for outputs of "),ya=a("a"),Ui=n("BeitModel"),Hi=n("."),Er=c(),ge=a("div"),y(Gt.$$.fragment),Ji=c(),Kt=a("p"),Gi=n("Class for outputs of "),wa=a("a"),Ki=n("FlaxBeitModel"),Xi=n("."),Fr=c(),ue=a("h2"),qe=a("a"),ss=a("span"),y(Xt.$$.fragment),Yi=c(),rs=a("span"),Qi=n("BeitConfig"),Pr=c(),ee=a("div"),y(Yt.$$.fragment),Zi=c(),_e=a("p"),el=n("This is the configuration class to store the configuration of a "),$a=a("a"),tl=n("BeitModel"),ol=n(`. It is used to instantiate an BEiT
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 BEiT
`),Qt=a("a"),al=n("microsoft/beit-base-patch16-224-pt22k"),sl=n(" architecture."),rl=c(),y(Le.$$.fragment),Mr=c(),be=a("h2"),De=a("a"),ns=a("span"),y(Zt.$$.fragment),nl=c(),is=a("span"),il=n("BeitFeatureExtractor"),jr=c(),D=a("div"),y(eo.$$.fragment),ll=c(),ls=a("p"),dl=n("Constructs a BEiT image processor."),cl=c(),Ta=a("div"),y(to.$$.fragment),ml=c(),Oe=a("div"),y(oo.$$.fragment),pl=c(),ao=a("p"),hl=n("Converts the output of "),xa=a("a"),fl=n("BeitForSemanticSegmentation"),gl=n(" into semantic segmentation maps. Only supports PyTorch."),zr=c(),ve=a("h2"),We=a("a"),ds=a("span"),y(so.$$.fragment),ul=c(),cs=a("span"),_l=n("BeitImageProcessor"),Cr=c(),O=a("div"),y(ro.$$.fragment),bl=c(),ms=a("p"),vl=n("Constructs a BEiT image processor."),yl=c(),Ve=a("div"),y(no.$$.fragment),wl=c(),ps=a("p"),$l=n("Preprocess an image or batch of images."),Tl=c(),Re=a("div"),y(io.$$.fragment),xl=c(),lo=a("p"),Bl=n("Converts the output of "),Ba=a("a"),Il=n("BeitForSemanticSegmentation"),kl=n(" into semantic segmentation maps. Only supports PyTorch."),Ar=c(),ye=a("h2"),Ue=a("a"),hs=a("span"),y(co.$$.fragment),El=c(),fs=a("span"),Fl=n("BeitModel"),Sr=c(),te=a("div"),y(mo.$$.fragment),Pl=c(),po=a("p"),Ml=n(`The bare Beit Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=a("a"),jl=n("torch.nn.Module"),zl=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cl=c(),J=a("div"),y(fo.$$.fragment),Al=c(),we=a("p"),Sl=n("The "),Ia=a("a"),Nl=n("BeitModel"),ql=n(" forward method, overrides the "),gs=a("code"),Ll=n("__call__"),Dl=n(" special method."),Ol=c(),y(He.$$.fragment),Wl=c(),y(Je.$$.fragment),Nr=c(),$e=a("h2"),Ge=a("a"),us=a("span"),y(go.$$.fragment),Vl=c(),_s=a("span"),Rl=n("BeitForMaskedImageModeling"),qr=c(),oe=a("div"),y(uo.$$.fragment),Ul=c(),ae=a("p"),Hl=n(`Beit Model transformer with a \u2018language\u2019 modeling head on top. BEiT does masked image modeling by predicting
visual tokens of a Vector-Quantize Variational Autoencoder (VQ-VAE), whereas other vision models like ViT and DeiT
predict RGB pixel values. As a result, this class is incompatible with `),ka=a("a"),Jl=n("AutoModelForMaskedImageModeling"),Gl=n(`, so you
will need to use `),Ea=a("a"),Kl=n("BeitForMaskedImageModeling"),Xl=n(` directly if you wish to do masked image modeling with BEiT.
This model is a PyTorch `),_o=a("a"),Yl=n("torch.nn.Module"),Ql=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zl=c(),G=a("div"),y(bo.$$.fragment),ed=c(),Te=a("p"),td=n("The "),Fa=a("a"),od=n("BeitForMaskedImageModeling"),ad=n(" forward method, overrides the "),bs=a("code"),sd=n("__call__"),rd=n(" special method."),nd=c(),y(Ke.$$.fragment),id=c(),y(Xe.$$.fragment),Lr=c(),xe=a("h2"),Ye=a("a"),vs=a("span"),y(vo.$$.fragment),ld=c(),ys=a("span"),dd=n("BeitForImageClassification"),Dr=c(),W=a("div"),y(yo.$$.fragment),cd=c(),ws=a("p"),md=n(`Beit Model transformer with an image classification head on top (a linear layer on top of the average of the final
hidden states of the patch tokens) e.g. for ImageNet.`),pd=c(),wo=a("p"),hd=n("This model is a PyTorch "),$o=a("a"),fd=n("torch.nn.Module"),gd=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ud=c(),K=a("div"),y(To.$$.fragment),_d=c(),Be=a("p"),bd=n("The "),Pa=a("a"),vd=n("BeitForImageClassification"),yd=n(" forward method, overrides the "),$s=a("code"),wd=n("__call__"),$d=n(" special method."),Td=c(),y(Qe.$$.fragment),xd=c(),y(Ze.$$.fragment),Or=c(),Ie=a("h2"),et=a("a"),Ts=a("span"),y(xo.$$.fragment),Bd=c(),xs=a("span"),Id=n("BeitForSemanticSegmentation"),Wr=c(),V=a("div"),y(Bo.$$.fragment),kd=c(),Bs=a("p"),Ed=n("Beit Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Fd=c(),Io=a("p"),Pd=n("This model is a PyTorch "),ko=a("a"),Md=n("torch.nn.Module"),jd=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zd=c(),X=a("div"),y(Eo.$$.fragment),Cd=c(),ke=a("p"),Ad=n("The "),Ma=a("a"),Sd=n("BeitForSemanticSegmentation"),Nd=n(" forward method, overrides the "),Is=a("code"),qd=n("__call__"),Ld=n(" special method."),Dd=c(),y(tt.$$.fragment),Od=c(),y(ot.$$.fragment),Vr=c(),Ee=a("h2"),at=a("a"),ks=a("span"),y(Fo.$$.fragment),Wd=c(),Es=a("span"),Vd=n("FlaxBeitModel"),Rr=c(),P=a("div"),y(Po.$$.fragment),Rd=c(),Fs=a("p"),Ud=n("The bare Beit Model transformer outputting raw hidden-states without any specific head on top."),Hd=c(),Mo=a("p"),Jd=n("This model inherits from "),ja=a("a"),Gd=n("FlaxPreTrainedModel"),Kd=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Xd=c(),jo=a("p"),Yd=n("This model is also a Flax Linen "),zo=a("a"),Qd=n("flax.linen.Module"),Zd=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ec=c(),Ps=a("p"),tc=n("Finally, this model supports inherent JAX features such as:"),oc=c(),se=a("ul"),Ms=a("li"),Co=a("a"),ac=n("Just-In-Time (JIT) compilation"),sc=c(),js=a("li"),Ao=a("a"),rc=n("Automatic Differentiation"),nc=c(),zs=a("li"),So=a("a"),ic=n("Vectorization"),lc=c(),Cs=a("li"),No=a("a"),dc=n("Parallelization"),cc=c(),Y=a("div"),y(qo.$$.fragment),mc=c(),Fe=a("p"),pc=n("The "),As=a("code"),hc=n("FlaxBeitPreTrainedModel"),fc=n(" forward method, overrides the "),Ss=a("code"),gc=n("__call__"),uc=n(" special method."),_c=c(),y(st.$$.fragment),bc=c(),y(rt.$$.fragment),Ur=c(),Pe=a("h2"),nt=a("a"),Ns=a("span"),y(Lo.$$.fragment),vc=c(),qs=a("span"),yc=n("FlaxBeitForMaskedImageModeling"),Hr=c(),M=a("div"),y(Do.$$.fragment),wc=c(),Ls=a("p"),$c=n("Beit Model transformer with a \u2018language\u2019 modeling head on top (to predict visual tokens)."),Tc=c(),Oo=a("p"),xc=n("This model inherits from "),za=a("a"),Bc=n("FlaxPreTrainedModel"),Ic=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),kc=c(),Wo=a("p"),Ec=n("This model is also a Flax Linen "),Vo=a("a"),Fc=n("flax.linen.Module"),Pc=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Mc=c(),Ds=a("p"),jc=n("Finally, this model supports inherent JAX features such as:"),zc=c(),re=a("ul"),Os=a("li"),Ro=a("a"),Cc=n("Just-In-Time (JIT) compilation"),Ac=c(),Ws=a("li"),Uo=a("a"),Sc=n("Automatic Differentiation"),Nc=c(),Vs=a("li"),Ho=a("a"),qc=n("Vectorization"),Lc=c(),Rs=a("li"),Jo=a("a"),Dc=n("Parallelization"),Oc=c(),A=a("div"),y(Go.$$.fragment),Wc=c(),Me=a("p"),Vc=n("The "),Us=a("code"),Rc=n("FlaxBeitPreTrainedModel"),Uc=n(" forward method, overrides the "),Hs=a("code"),Hc=n("__call__"),Jc=n(" special method."),Gc=c(),y(it.$$.fragment),Kc=c(),je=a("p"),Xc=n("bool_masked_pos ("),Js=a("code"),Yc=n("numpy.ndarray"),Qc=n(" of shape "),Gs=a("code"),Zc=n("(batch_size, num_patches)"),em=n(`):
Boolean masked positions. Indicates which patches are masked (1) and which aren\u2019t (0).`),tm=c(),y(lt.$$.fragment),Jr=c(),ze=a("h2"),dt=a("a"),Ks=a("span"),y(Ko.$$.fragment),om=c(),Xs=a("span"),am=n("FlaxBeitForImageClassification"),Gr=c(),j=a("div"),y(Xo.$$.fragment),sm=c(),Ys=a("p"),rm=n(`Beit Model transformer with an image classification head on top (a linear layer on top of the average of the final
hidden states of the patch tokens) e.g. for ImageNet.`),nm=c(),Yo=a("p"),im=n("This model inherits from "),Ca=a("a"),lm=n("FlaxPreTrainedModel"),dm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),cm=c(),Qo=a("p"),mm=n("This model is also a Flax Linen "),Zo=a("a"),pm=n("flax.linen.Module"),hm=n(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),fm=c(),Qs=a("p"),gm=n("Finally, this model supports inherent JAX features such as:"),um=c(),ne=a("ul"),Zs=a("li"),ea=a("a"),_m=n("Just-In-Time (JIT) compilation"),bm=c(),er=a("li"),ta=a("a"),vm=n("Automatic Differentiation"),ym=c(),tr=a("li"),oa=a("a"),wm=n("Vectorization"),$m=c(),or=a("li"),aa=a("a"),Tm=n("Parallelization"),xm=c(),Q=a("div"),y(sa.$$.fragment),Bm=c(),Ce=a("p"),Im=n("The "),ar=a("code"),km=n("FlaxBeitPreTrainedModel"),Em=n(" forward method, overrides the "),sr=a("code"),Fm=n("__call__"),Pm=n(" special method."),Mm=c(),y(ct.$$.fragment),jm=c(),y(mt.$$.fragment),this.h()},l(o){const g=tf('[data-svelte="svelte-1phssyn"]',document.head);p=s(g,"META",{name:!0,content:!0}),g.forEach(t),v=m(o),u=s(o,"H1",{class:!0});var ra=r(u);f=s(ra,"A",{id:!0,class:!0,href:!0});var rr=r(f);b=s(rr,"SPAN",{});var nr=r(b);w(l.$$.fragment,nr),nr.forEach(t),rr.forEach(t),h=m(ra),k=s(ra,"SPAN",{});var ir=r(k);En=i(ir,"BEiT"),ir.forEach(t),ra.forEach(t),_r=m(o),ce=s(o,"H2",{class:!0});var na=r(ce);Ae=s(na,"A",{id:!0,class:!0,href:!0});var lr=r(Ae);Ka=s(lr,"SPAN",{});var dr=r(Ka);w(Pt.$$.fragment,dr),dr.forEach(t),lr.forEach(t),Fn=m(na),Xa=s(na,"SPAN",{});var cr=r(Xa);Pn=i(cr,"Overview"),cr.forEach(t),na.forEach(t),br=m(o),U=s(o,"P",{});var ie=r(U);Mn=i(ie,"The BEiT model was proposed in "),Mt=s(ie,"A",{href:!0,rel:!0});var mr=r(Mt);jn=i(mr,"BEiT: BERT Pre-Training of Image Transformers"),mr.forEach(t),zn=i(ie,` by
Hangbo Bao, Li Dong and Furu Wei. Inspired by BERT, BEiT is the first paper that makes self-supervised pre-training of
Vision Transformers (ViTs) outperform supervised pre-training. Rather than pre-training the model to predict the class
of an image (as done in the `),jt=s(ie,"A",{href:!0,rel:!0});var pr=r(jt);Cn=i(pr,"original ViT paper"),pr.forEach(t),An=i(ie,`), BEiT models are pre-trained to
predict visual tokens from the codebook of OpenAI\u2019s `),zt=s(ie,"A",{href:!0,rel:!0});var hr=r(zt);Sn=i(hr,"DALL-E model"),hr.forEach(t),Nn=i(ie,` given masked
patches.`),ie.forEach(t),vr=m(o),la=s(o,"P",{});var fr=r(la);qn=i(fr,"The abstract from the paper is the following:"),fr.forEach(t),yr=m(o),da=s(o,"P",{});var gr=r(da);Ya=s(gr,"EM",{});var ur=r(Ya);Ln=i(ur,`We introduce a self-supervised vision representation model BEiT, which stands for Bidirectional Encoder representation
from Image Transformers. Following BERT developed in the natural language processing area, we propose a masked image
modeling task to pretrain vision Transformers. Specifically, each image has two views in our pre-training, i.e, image
patches (such as 16x16 pixels), and visual tokens (i.e., discrete tokens). We first \u201Ctokenize\u201D the original image into
visual tokens. Then we randomly mask some image patches and fed them into the backbone Transformer. The pre-training
objective is to recover the original visual tokens based on the corrupted image patches. After pre-training BEiT, we
directly fine-tune the model parameters on downstream tasks by appending task layers upon the pretrained encoder.
Experimental results on image classification and semantic segmentation show that our model achieves competitive results
with previous pre-training methods. For example, base-size BEiT achieves 83.2% top-1 accuracy on ImageNet-1K,
significantly outperforming from-scratch DeiT training (81.8%) with the same setup. Moreover, large-size BEiT obtains
86.3% only using ImageNet-1K, even outperforming ViT-L with supervised pre-training on ImageNet-22K (85.2%).`),ur.forEach(t),gr.forEach(t),wr=m(o),ca=s(o,"P",{});var Am=r(ca);Dn=i(Am,"Tips:"),Am.forEach(t),$r=m(o),z=s(o,"UL",{});var Z=r(z);F=s(Z,"LI",{});var C=r(F);On=i(C,`BEiT models are regular Vision Transformers, but pre-trained in a self-supervised way rather than supervised. They
outperform both the `),ma=s(C,"A",{href:!0});var Sm=r(ma);Wn=i(Sm,"original model (ViT)"),Sm.forEach(t),Vn=i(C," as well as "),pa=s(C,"A",{href:!0});var Nm=r(pa);Rn=i(Nm,"Data-efficient Image Transformers (DeiT)"),Nm.forEach(t),Un=i(C,` when fine-tuned on ImageNet-1K and CIFAR-100. You can check out demo notebooks regarding inference as well as
fine-tuning on custom data `),Ct=s(C,"A",{href:!0,rel:!0});var qm=r(Ct);Hn=i(qm,"here"),qm.forEach(t),Jn=i(C,` (you can just replace
`),ha=s(C,"A",{href:!0});var Lm=r(ha);Gn=i(Lm,"ViTFeatureExtractor"),Lm.forEach(t),Kn=i(C," by "),fa=s(C,"A",{href:!0});var Dm=r(fa);Xn=i(Dm,"BeitImageProcessor"),Dm.forEach(t),Yn=i(C,` and
`),ga=s(C,"A",{href:!0});var Om=r(ga);Qn=i(Om,"ViTForImageClassification"),Om.forEach(t),Zn=i(C," by "),ua=s(C,"A",{href:!0});var Wm=r(ua);ei=i(Wm,"BeitForImageClassification"),Wm.forEach(t),ti=i(C,")."),C.forEach(t),oi=m(Z),At=s(Z,"LI",{});var Xr=r(At);ai=i(Xr,`There\u2019s also a demo notebook available which showcases how to combine DALL-E\u2019s image tokenizer with BEiT for
performing masked image modeling. You can find it `),St=s(Xr,"A",{href:!0,rel:!0});var Vm=r(St);si=i(Vm,"here"),Vm.forEach(t),ri=i(Xr,"."),Xr.forEach(t),ni=m(Z),Nt=s(Z,"LI",{});var Yr=r(Nt);ii=i(Yr,`As the BEiT models expect each image to be of the same size (resolution), one can use
`),_a=s(Yr,"A",{href:!0});var Rm=r(_a);li=i(Rm,"BeitImageProcessor"),Rm.forEach(t),di=i(Yr," to resize (or rescale) and normalize images for the model."),Yr.forEach(t),ci=m(Z),me=s(Z,"LI",{});var Aa=r(me);mi=i(Aa,`Both the patch resolution and image resolution used during pre-training or fine-tuning are reflected in the name of
each checkpoint. For example, `),Qa=s(Aa,"CODE",{});var Um=r(Qa);pi=i(Um,"microsoft/beit-base-patch16-224"),Um.forEach(t),hi=i(Aa,` refers to a base-sized architecture with patch
resolution of 16x16 and fine-tuning resolution of 224x224. All checkpoints can be found on the `),qt=s(Aa,"A",{href:!0,rel:!0});var Hm=r(qt);fi=i(Hm,"hub"),Hm.forEach(t),gi=i(Aa,"."),Aa.forEach(t),ui=m(Z),pe=s(Z,"LI",{});var Sa=r(pe);_i=i(Sa,"The available checkpoints are either (1) pre-trained on "),Lt=s(Sa,"A",{href:!0,rel:!0});var Jm=r(Lt);bi=i(Jm,"ImageNet-22k"),Jm.forEach(t),vi=i(Sa,` (a collection of
14 million images and 22k classes) only, (2) also fine-tuned on ImageNet-22k or (3) also fine-tuned on `),Dt=s(Sa,"A",{href:!0,rel:!0});var Gm=r(Dt);yi=i(Gm,"ImageNet-1k"),Gm.forEach(t),wi=i(Sa,` (also referred to as ILSVRC 2012, a collection of 1.3 million
images and 1,000 classes).`),Sa.forEach(t),$i=m(Z),L=s(Z,"LI",{});var le=r(L);Ti=i(le,`BEiT uses relative position embeddings, inspired by the T5 model. During pre-training, the authors shared the
relative position bias among the several self-attention layers. During fine-tuning, each layer\u2019s relative position
bias is initialized with the shared relative position bias obtained after pre-training. Note that, if one wants to
pre-train a model from scratch, one needs to either set the `),Za=s(le,"CODE",{});var Km=r(Za);xi=i(Km,"use_relative_position_bias"),Km.forEach(t),Bi=i(le,` or the
`),es=s(le,"CODE",{});var Xm=r(es);Ii=i(Xm,"use_relative_position_bias"),Xm.forEach(t),ki=i(le," attribute of "),ba=s(le,"A",{href:!0});var Ym=r(ba);Ei=i(Ym,"BeitConfig"),Ym.forEach(t),Fi=i(le," to "),ts=s(le,"CODE",{});var Qm=r(ts);Pi=i(Qm,"True"),Qm.forEach(t),Mi=i(le,` in order to add
position embeddings.`),le.forEach(t),Z.forEach(t),Tr=m(o),Se=s(o,"IMG",{src:!0,alt:!0,width:!0}),xr=m(o),Ot=s(o,"SMALL",{});var zm=r(Ot);ji=i(zm,"BEiT pre-training. Taken from the "),va=s(zm,"A",{href:!0});var Zm=r(va);zi=i(Zm,"original paper."),Zm.forEach(t),zm.forEach(t),Br=m(o),H=s(o,"P",{});var pt=r(H);Ci=i(pt,"This model was contributed by "),Wt=s(pt,"A",{href:!0,rel:!0});var ep=r(Wt);Ai=i(ep,"nielsr"),ep.forEach(t),Si=i(pt,`. The JAX/FLAX version of this model was
contributed by `),Vt=s(pt,"A",{href:!0,rel:!0});var tp=r(Vt);Ni=i(tp,"kamalkraj"),tp.forEach(t),qi=i(pt,". The original code can be found "),Rt=s(pt,"A",{href:!0,rel:!0});var op=r(Rt);Li=i(op,"here"),op.forEach(t),Di=i(pt,"."),pt.forEach(t),Ir=m(o),he=s(o,"H2",{class:!0});var Qr=r(he);Ne=s(Qr,"A",{id:!0,class:!0,href:!0});var ap=r(Ne);os=s(ap,"SPAN",{});var sp=r(os);w(Ut.$$.fragment,sp),sp.forEach(t),ap.forEach(t),Oi=m(Qr),as=s(Qr,"SPAN",{});var rp=r(as);Wi=i(rp,"BEiT specific outputs"),rp.forEach(t),Qr.forEach(t),kr=m(o),fe=s(o,"DIV",{class:!0});var Zr=r(fe);w(Ht.$$.fragment,Zr),Vi=m(Zr),Jt=s(Zr,"P",{});var en=r(Jt);Ri=i(en,"Class for outputs of "),ya=s(en,"A",{href:!0});var np=r(ya);Ui=i(np,"BeitModel"),np.forEach(t),Hi=i(en,"."),en.forEach(t),Zr.forEach(t),Er=m(o),ge=s(o,"DIV",{class:!0});var tn=r(ge);w(Gt.$$.fragment,tn),Ji=m(tn),Kt=s(tn,"P",{});var on=r(Kt);Gi=i(on,"Class for outputs of "),wa=s(on,"A",{href:!0});var ip=r(wa);Ki=i(ip,"FlaxBeitModel"),ip.forEach(t),Xi=i(on,"."),on.forEach(t),tn.forEach(t),Fr=m(o),ue=s(o,"H2",{class:!0});var an=r(ue);qe=s(an,"A",{id:!0,class:!0,href:!0});var lp=r(qe);ss=s(lp,"SPAN",{});var dp=r(ss);w(Xt.$$.fragment,dp),dp.forEach(t),lp.forEach(t),Yi=m(an),rs=s(an,"SPAN",{});var cp=r(rs);Qi=i(cp,"BeitConfig"),cp.forEach(t),an.forEach(t),Pr=m(o),ee=s(o,"DIV",{class:!0});var Na=r(ee);w(Yt.$$.fragment,Na),Zi=m(Na),_e=s(Na,"P",{});var qa=r(_e);el=i(qa,"This is the configuration class to store the configuration of a "),$a=s(qa,"A",{href:!0});var mp=r($a);tl=i(mp,"BeitModel"),mp.forEach(t),ol=i(qa,`. It is used to instantiate an BEiT
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 BEiT
`),Qt=s(qa,"A",{href:!0,rel:!0});var pp=r(Qt);al=i(pp,"microsoft/beit-base-patch16-224-pt22k"),pp.forEach(t),sl=i(qa," architecture."),qa.forEach(t),rl=m(Na),w(Le.$$.fragment,Na),Na.forEach(t),Mr=m(o),be=s(o,"H2",{class:!0});var sn=r(be);De=s(sn,"A",{id:!0,class:!0,href:!0});var hp=r(De);ns=s(hp,"SPAN",{});var fp=r(ns);w(Zt.$$.fragment,fp),fp.forEach(t),hp.forEach(t),nl=m(sn),is=s(sn,"SPAN",{});var gp=r(is);il=i(gp,"BeitFeatureExtractor"),gp.forEach(t),sn.forEach(t),jr=m(o),D=s(o,"DIV",{class:!0});var ht=r(D);w(eo.$$.fragment,ht),ll=m(ht),ls=s(ht,"P",{});var up=r(ls);dl=i(up,"Constructs a BEiT image processor."),up.forEach(t),cl=m(ht),Ta=s(ht,"DIV",{class:!0});var _p=r(Ta);w(to.$$.fragment,_p),_p.forEach(t),ml=m(ht),Oe=s(ht,"DIV",{class:!0});var rn=r(Oe);w(oo.$$.fragment,rn),pl=m(rn),ao=s(rn,"P",{});var nn=r(ao);hl=i(nn,"Converts the output of "),xa=s(nn,"A",{href:!0});var bp=r(xa);fl=i(bp,"BeitForSemanticSegmentation"),bp.forEach(t),gl=i(nn," into semantic segmentation maps. Only supports PyTorch."),nn.forEach(t),rn.forEach(t),ht.forEach(t),zr=m(o),ve=s(o,"H2",{class:!0});var ln=r(ve);We=s(ln,"A",{id:!0,class:!0,href:!0});var vp=r(We);ds=s(vp,"SPAN",{});var yp=r(ds);w(so.$$.fragment,yp),yp.forEach(t),vp.forEach(t),ul=m(ln),cs=s(ln,"SPAN",{});var wp=r(cs);_l=i(wp,"BeitImageProcessor"),wp.forEach(t),ln.forEach(t),Cr=m(o),O=s(o,"DIV",{class:!0});var ft=r(O);w(ro.$$.fragment,ft),bl=m(ft),ms=s(ft,"P",{});var $p=r(ms);vl=i($p,"Constructs a BEiT image processor."),$p.forEach(t),yl=m(ft),Ve=s(ft,"DIV",{class:!0});var dn=r(Ve);w(no.$$.fragment,dn),wl=m(dn),ps=s(dn,"P",{});var Tp=r(ps);$l=i(Tp,"Preprocess an image or batch of images."),Tp.forEach(t),dn.forEach(t),Tl=m(ft),Re=s(ft,"DIV",{class:!0});var cn=r(Re);w(io.$$.fragment,cn),xl=m(cn),lo=s(cn,"P",{});var mn=r(lo);Bl=i(mn,"Converts the output of "),Ba=s(mn,"A",{href:!0});var xp=r(Ba);Il=i(xp,"BeitForSemanticSegmentation"),xp.forEach(t),kl=i(mn," into semantic segmentation maps. Only supports PyTorch."),mn.forEach(t),cn.forEach(t),ft.forEach(t),Ar=m(o),ye=s(o,"H2",{class:!0});var pn=r(ye);Ue=s(pn,"A",{id:!0,class:!0,href:!0});var Bp=r(Ue);hs=s(Bp,"SPAN",{});var Ip=r(hs);w(co.$$.fragment,Ip),Ip.forEach(t),Bp.forEach(t),El=m(pn),fs=s(pn,"SPAN",{});var kp=r(fs);Fl=i(kp,"BeitModel"),kp.forEach(t),pn.forEach(t),Sr=m(o),te=s(o,"DIV",{class:!0});var La=r(te);w(mo.$$.fragment,La),Pl=m(La),po=s(La,"P",{});var hn=r(po);Ml=i(hn,`The bare Beit Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=s(hn,"A",{href:!0,rel:!0});var Ep=r(ho);jl=i(Ep,"torch.nn.Module"),Ep.forEach(t),zl=i(hn,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),hn.forEach(t),Cl=m(La),J=s(La,"DIV",{class:!0});var gt=r(J);w(fo.$$.fragment,gt),Al=m(gt),we=s(gt,"P",{});var Da=r(we);Sl=i(Da,"The "),Ia=s(Da,"A",{href:!0});var Fp=r(Ia);Nl=i(Fp,"BeitModel"),Fp.forEach(t),ql=i(Da," forward method, overrides the "),gs=s(Da,"CODE",{});var Pp=r(gs);Ll=i(Pp,"__call__"),Pp.forEach(t),Dl=i(Da," special method."),Da.forEach(t),Ol=m(gt),w(He.$$.fragment,gt),Wl=m(gt),w(Je.$$.fragment,gt),gt.forEach(t),La.forEach(t),Nr=m(o),$e=s(o,"H2",{class:!0});var fn=r($e);Ge=s(fn,"A",{id:!0,class:!0,href:!0});var Mp=r(Ge);us=s(Mp,"SPAN",{});var jp=r(us);w(go.$$.fragment,jp),jp.forEach(t),Mp.forEach(t),Vl=m(fn),_s=s(fn,"SPAN",{});var zp=r(_s);Rl=i(zp,"BeitForMaskedImageModeling"),zp.forEach(t),fn.forEach(t),qr=m(o),oe=s(o,"DIV",{class:!0});var Oa=r(oe);w(uo.$$.fragment,Oa),Ul=m(Oa),ae=s(Oa,"P",{});var ut=r(ae);Hl=i(ut,`Beit Model transformer with a \u2018language\u2019 modeling head on top. BEiT does masked image modeling by predicting
visual tokens of a Vector-Quantize Variational Autoencoder (VQ-VAE), whereas other vision models like ViT and DeiT
predict RGB pixel values. As a result, this class is incompatible with `),ka=s(ut,"A",{href:!0});var Cp=r(ka);Jl=i(Cp,"AutoModelForMaskedImageModeling"),Cp.forEach(t),Gl=i(ut,`, so you
will need to use `),Ea=s(ut,"A",{href:!0});var Ap=r(Ea);Kl=i(Ap,"BeitForMaskedImageModeling"),Ap.forEach(t),Xl=i(ut,` directly if you wish to do masked image modeling with BEiT.
This model is a PyTorch `),_o=s(ut,"A",{href:!0,rel:!0});var Sp=r(_o);Yl=i(Sp,"torch.nn.Module"),Sp.forEach(t),Ql=i(ut,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ut.forEach(t),Zl=m(Oa),G=s(Oa,"DIV",{class:!0});var _t=r(G);w(bo.$$.fragment,_t),ed=m(_t),Te=s(_t,"P",{});var Wa=r(Te);td=i(Wa,"The "),Fa=s(Wa,"A",{href:!0});var Np=r(Fa);od=i(Np,"BeitForMaskedImageModeling"),Np.forEach(t),ad=i(Wa," forward method, overrides the "),bs=s(Wa,"CODE",{});var qp=r(bs);sd=i(qp,"__call__"),qp.forEach(t),rd=i(Wa," special method."),Wa.forEach(t),nd=m(_t),w(Ke.$$.fragment,_t),id=m(_t),w(Xe.$$.fragment,_t),_t.forEach(t),Oa.forEach(t),Lr=m(o),xe=s(o,"H2",{class:!0});var gn=r(xe);Ye=s(gn,"A",{id:!0,class:!0,href:!0});var Lp=r(Ye);vs=s(Lp,"SPAN",{});var Dp=r(vs);w(vo.$$.fragment,Dp),Dp.forEach(t),Lp.forEach(t),ld=m(gn),ys=s(gn,"SPAN",{});var Op=r(ys);dd=i(Op,"BeitForImageClassification"),Op.forEach(t),gn.forEach(t),Dr=m(o),W=s(o,"DIV",{class:!0});var bt=r(W);w(yo.$$.fragment,bt),cd=m(bt),ws=s(bt,"P",{});var Wp=r(ws);md=i(Wp,`Beit Model transformer with an image classification head on top (a linear layer on top of the average of the final
hidden states of the patch tokens) e.g. for ImageNet.`),Wp.forEach(t),pd=m(bt),wo=s(bt,"P",{});var un=r(wo);hd=i(un,"This model is a PyTorch "),$o=s(un,"A",{href:!0,rel:!0});var Vp=r($o);fd=i(Vp,"torch.nn.Module"),Vp.forEach(t),gd=i(un,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),un.forEach(t),ud=m(bt),K=s(bt,"DIV",{class:!0});var vt=r(K);w(To.$$.fragment,vt),_d=m(vt),Be=s(vt,"P",{});var Va=r(Be);bd=i(Va,"The "),Pa=s(Va,"A",{href:!0});var Rp=r(Pa);vd=i(Rp,"BeitForImageClassification"),Rp.forEach(t),yd=i(Va," forward method, overrides the "),$s=s(Va,"CODE",{});var Up=r($s);wd=i(Up,"__call__"),Up.forEach(t),$d=i(Va," special method."),Va.forEach(t),Td=m(vt),w(Qe.$$.fragment,vt),xd=m(vt),w(Ze.$$.fragment,vt),vt.forEach(t),bt.forEach(t),Or=m(o),Ie=s(o,"H2",{class:!0});var _n=r(Ie);et=s(_n,"A",{id:!0,class:!0,href:!0});var Hp=r(et);Ts=s(Hp,"SPAN",{});var Jp=r(Ts);w(xo.$$.fragment,Jp),Jp.forEach(t),Hp.forEach(t),Bd=m(_n),xs=s(_n,"SPAN",{});var Gp=r(xs);Id=i(Gp,"BeitForSemanticSegmentation"),Gp.forEach(t),_n.forEach(t),Wr=m(o),V=s(o,"DIV",{class:!0});var yt=r(V);w(Bo.$$.fragment,yt),kd=m(yt),Bs=s(yt,"P",{});var Kp=r(Bs);Ed=i(Kp,"Beit Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Kp.forEach(t),Fd=m(yt),Io=s(yt,"P",{});var bn=r(Io);Pd=i(bn,"This model is a PyTorch "),ko=s(bn,"A",{href:!0,rel:!0});var Xp=r(ko);Md=i(Xp,"torch.nn.Module"),Xp.forEach(t),jd=i(bn,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bn.forEach(t),zd=m(yt),X=s(yt,"DIV",{class:!0});var wt=r(X);w(Eo.$$.fragment,wt),Cd=m(wt),ke=s(wt,"P",{});var Ra=r(ke);Ad=i(Ra,"The "),Ma=s(Ra,"A",{href:!0});var Yp=r(Ma);Sd=i(Yp,"BeitForSemanticSegmentation"),Yp.forEach(t),Nd=i(Ra," forward method, overrides the "),Is=s(Ra,"CODE",{});var Qp=r(Is);qd=i(Qp,"__call__"),Qp.forEach(t),Ld=i(Ra," special method."),Ra.forEach(t),Dd=m(wt),w(tt.$$.fragment,wt),Od=m(wt),w(ot.$$.fragment,wt),wt.forEach(t),yt.forEach(t),Vr=m(o),Ee=s(o,"H2",{class:!0});var vn=r(Ee);at=s(vn,"A",{id:!0,class:!0,href:!0});var Zp=r(at);ks=s(Zp,"SPAN",{});var eh=r(ks);w(Fo.$$.fragment,eh),eh.forEach(t),Zp.forEach(t),Wd=m(vn),Es=s(vn,"SPAN",{});var th=r(Es);Vd=i(th,"FlaxBeitModel"),th.forEach(t),vn.forEach(t),Rr=m(o),P=s(o,"DIV",{class:!0});var S=r(P);w(Po.$$.fragment,S),Rd=m(S),Fs=s(S,"P",{});var oh=r(Fs);Ud=i(oh,"The bare Beit Model transformer outputting raw hidden-states without any specific head on top."),oh.forEach(t),Hd=m(S),Mo=s(S,"P",{});var yn=r(Mo);Jd=i(yn,"This model inherits from "),ja=s(yn,"A",{href:!0});var ah=r(ja);Gd=i(ah,"FlaxPreTrainedModel"),ah.forEach(t),Kd=i(yn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),yn.forEach(t),Xd=m(S),jo=s(S,"P",{});var wn=r(jo);Yd=i(wn,"This model is also a Flax Linen "),zo=s(wn,"A",{href:!0,rel:!0});var sh=r(zo);Qd=i(sh,"flax.linen.Module"),sh.forEach(t),Zd=i(wn,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),wn.forEach(t),ec=m(S),Ps=s(S,"P",{});var rh=r(Ps);tc=i(rh,"Finally, this model supports inherent JAX features such as:"),rh.forEach(t),oc=m(S),se=s(S,"UL",{});var $t=r(se);Ms=s($t,"LI",{});var nh=r(Ms);Co=s(nh,"A",{href:!0,rel:!0});var ih=r(Co);ac=i(ih,"Just-In-Time (JIT) compilation"),ih.forEach(t),nh.forEach(t),sc=m($t),js=s($t,"LI",{});var lh=r(js);Ao=s(lh,"A",{href:!0,rel:!0});var dh=r(Ao);rc=i(dh,"Automatic Differentiation"),dh.forEach(t),lh.forEach(t),nc=m($t),zs=s($t,"LI",{});var ch=r(zs);So=s(ch,"A",{href:!0,rel:!0});var mh=r(So);ic=i(mh,"Vectorization"),mh.forEach(t),ch.forEach(t),lc=m($t),Cs=s($t,"LI",{});var ph=r(Cs);No=s(ph,"A",{href:!0,rel:!0});var hh=r(No);dc=i(hh,"Parallelization"),hh.forEach(t),ph.forEach(t),$t.forEach(t),cc=m(S),Y=s(S,"DIV",{class:!0});var Tt=r(Y);w(qo.$$.fragment,Tt),mc=m(Tt),Fe=s(Tt,"P",{});var Ua=r(Fe);pc=i(Ua,"The "),As=s(Ua,"CODE",{});var fh=r(As);hc=i(fh,"FlaxBeitPreTrainedModel"),fh.forEach(t),fc=i(Ua," forward method, overrides the "),Ss=s(Ua,"CODE",{});var gh=r(Ss);gc=i(gh,"__call__"),gh.forEach(t),uc=i(Ua," special method."),Ua.forEach(t),_c=m(Tt),w(st.$$.fragment,Tt),bc=m(Tt),w(rt.$$.fragment,Tt),Tt.forEach(t),S.forEach(t),Ur=m(o),Pe=s(o,"H2",{class:!0});var $n=r(Pe);nt=s($n,"A",{id:!0,class:!0,href:!0});var uh=r(nt);Ns=s(uh,"SPAN",{});var _h=r(Ns);w(Lo.$$.fragment,_h),_h.forEach(t),uh.forEach(t),vc=m($n),qs=s($n,"SPAN",{});var bh=r(qs);yc=i(bh,"FlaxBeitForMaskedImageModeling"),bh.forEach(t),$n.forEach(t),Hr=m(o),M=s(o,"DIV",{class:!0});var N=r(M);w(Do.$$.fragment,N),wc=m(N),Ls=s(N,"P",{});var vh=r(Ls);$c=i(vh,"Beit Model transformer with a \u2018language\u2019 modeling head on top (to predict visual tokens)."),vh.forEach(t),Tc=m(N),Oo=s(N,"P",{});var Tn=r(Oo);xc=i(Tn,"This model inherits from "),za=s(Tn,"A",{href:!0});var yh=r(za);Bc=i(yh,"FlaxPreTrainedModel"),yh.forEach(t),Ic=i(Tn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Tn.forEach(t),kc=m(N),Wo=s(N,"P",{});var xn=r(Wo);Ec=i(xn,"This model is also a Flax Linen "),Vo=s(xn,"A",{href:!0,rel:!0});var wh=r(Vo);Fc=i(wh,"flax.linen.Module"),wh.forEach(t),Pc=i(xn,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),xn.forEach(t),Mc=m(N),Ds=s(N,"P",{});var $h=r(Ds);jc=i($h,"Finally, this model supports inherent JAX features such as:"),$h.forEach(t),zc=m(N),re=s(N,"UL",{});var xt=r(re);Os=s(xt,"LI",{});var Th=r(Os);Ro=s(Th,"A",{href:!0,rel:!0});var xh=r(Ro);Cc=i(xh,"Just-In-Time (JIT) compilation"),xh.forEach(t),Th.forEach(t),Ac=m(xt),Ws=s(xt,"LI",{});var Bh=r(Ws);Uo=s(Bh,"A",{href:!0,rel:!0});var Ih=r(Uo);Sc=i(Ih,"Automatic Differentiation"),Ih.forEach(t),Bh.forEach(t),Nc=m(xt),Vs=s(xt,"LI",{});var kh=r(Vs);Ho=s(kh,"A",{href:!0,rel:!0});var Eh=r(Ho);qc=i(Eh,"Vectorization"),Eh.forEach(t),kh.forEach(t),Lc=m(xt),Rs=s(xt,"LI",{});var Fh=r(Rs);Jo=s(Fh,"A",{href:!0,rel:!0});var Ph=r(Jo);Dc=i(Ph,"Parallelization"),Ph.forEach(t),Fh.forEach(t),xt.forEach(t),Oc=m(N),A=s(N,"DIV",{class:!0});var de=r(A);w(Go.$$.fragment,de),Wc=m(de),Me=s(de,"P",{});var Ha=r(Me);Vc=i(Ha,"The "),Us=s(Ha,"CODE",{});var Mh=r(Us);Rc=i(Mh,"FlaxBeitPreTrainedModel"),Mh.forEach(t),Uc=i(Ha," forward method, overrides the "),Hs=s(Ha,"CODE",{});var jh=r(Hs);Hc=i(jh,"__call__"),jh.forEach(t),Jc=i(Ha," special method."),Ha.forEach(t),Gc=m(de),w(it.$$.fragment,de),Kc=m(de),je=s(de,"P",{});var Ja=r(je);Xc=i(Ja,"bool_masked_pos ("),Js=s(Ja,"CODE",{});var zh=r(Js);Yc=i(zh,"numpy.ndarray"),zh.forEach(t),Qc=i(Ja," of shape "),Gs=s(Ja,"CODE",{});var Ch=r(Gs);Zc=i(Ch,"(batch_size, num_patches)"),Ch.forEach(t),em=i(Ja,`):
Boolean masked positions. Indicates which patches are masked (1) and which aren\u2019t (0).`),Ja.forEach(t),tm=m(de),w(lt.$$.fragment,de),de.forEach(t),N.forEach(t),Jr=m(o),ze=s(o,"H2",{class:!0});var Bn=r(ze);dt=s(Bn,"A",{id:!0,class:!0,href:!0});var Ah=r(dt);Ks=s(Ah,"SPAN",{});var Sh=r(Ks);w(Ko.$$.fragment,Sh),Sh.forEach(t),Ah.forEach(t),om=m(Bn),Xs=s(Bn,"SPAN",{});var Nh=r(Xs);am=i(Nh,"FlaxBeitForImageClassification"),Nh.forEach(t),Bn.forEach(t),Gr=m(o),j=s(o,"DIV",{class:!0});var q=r(j);w(Xo.$$.fragment,q),sm=m(q),Ys=s(q,"P",{});var qh=r(Ys);rm=i(qh,`Beit Model transformer with an image classification head on top (a linear layer on top of the average of the final
hidden states of the patch tokens) e.g. for ImageNet.`),qh.forEach(t),nm=m(q),Yo=s(q,"P",{});var In=r(Yo);im=i(In,"This model inherits from "),Ca=s(In,"A",{href:!0});var Lh=r(Ca);lm=i(Lh,"FlaxPreTrainedModel"),Lh.forEach(t),dm=i(In,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),In.forEach(t),cm=m(q),Qo=s(q,"P",{});var kn=r(Qo);mm=i(kn,"This model is also a Flax Linen "),Zo=s(kn,"A",{href:!0,rel:!0});var Dh=r(Zo);pm=i(Dh,"flax.linen.Module"),Dh.forEach(t),hm=i(kn,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),kn.forEach(t),fm=m(q),Qs=s(q,"P",{});var Oh=r(Qs);gm=i(Oh,"Finally, this model supports inherent JAX features such as:"),Oh.forEach(t),um=m(q),ne=s(q,"UL",{});var Bt=r(ne);Zs=s(Bt,"LI",{});var Wh=r(Zs);ea=s(Wh,"A",{href:!0,rel:!0});var Vh=r(ea);_m=i(Vh,"Just-In-Time (JIT) compilation"),Vh.forEach(t),Wh.forEach(t),bm=m(Bt),er=s(Bt,"LI",{});var Rh=r(er);ta=s(Rh,"A",{href:!0,rel:!0});var Uh=r(ta);vm=i(Uh,"Automatic Differentiation"),Uh.forEach(t),Rh.forEach(t),ym=m(Bt),tr=s(Bt,"LI",{});var Hh=r(tr);oa=s(Hh,"A",{href:!0,rel:!0});var Jh=r(oa);wm=i(Jh,"Vectorization"),Jh.forEach(t),Hh.forEach(t),$m=m(Bt),or=s(Bt,"LI",{});var Gh=r(or);aa=s(Gh,"A",{href:!0,rel:!0});var Kh=r(aa);Tm=i(Kh,"Parallelization"),Kh.forEach(t),Gh.forEach(t),Bt.forEach(t),xm=m(q),Q=s(q,"DIV",{class:!0});var It=r(Q);w(sa.$$.fragment,It),Bm=m(It),Ce=s(It,"P",{});var Ga=r(Ce);Im=i(Ga,"The "),ar=s(Ga,"CODE",{});var Xh=r(ar);km=i(Xh,"FlaxBeitPreTrainedModel"),Xh.forEach(t),Em=i(Ga," forward method, overrides the "),sr=s(Ga,"CODE",{});var Yh=r(sr);Fm=i(Yh,"__call__"),Yh.forEach(t),Pm=i(Ga," special method."),Ga.forEach(t),Mm=m(It),w(ct.$$.fragment,It),jm=m(It),w(mt.$$.fragment,It),It.forEach(t),q.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(wf)),d(f,"id","beit"),d(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(f,"href","#beit"),d(u,"class","relative group"),d(Ae,"id","overview"),d(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ae,"href","#overview"),d(ce,"class","relative group"),d(Mt,"href","https://arxiv.org/abs/2106.08254"),d(Mt,"rel","nofollow"),d(jt,"href","https://arxiv.org/abs/2010.11929"),d(jt,"rel","nofollow"),d(zt,"href","https://arxiv.org/abs/2102.12092"),d(zt,"rel","nofollow"),d(ma,"href","vit"),d(pa,"href","deit"),d(Ct,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer"),d(Ct,"rel","nofollow"),d(ha,"href","/docs/transformers/v4.25.1/en/model_doc/vit#transformers.ViTImageProcessor"),d(fa,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor"),d(ga,"href","/docs/transformers/v4.25.1/en/model_doc/vit#transformers.ViTForImageClassification"),d(ua,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForImageClassification"),d(St,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/BEiT"),d(St,"rel","nofollow"),d(_a,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitImageProcessor"),d(qt,"href","https://huggingface.co/models?search=microsoft/beit"),d(qt,"rel","nofollow"),d(Lt,"href","http://www.image-net.org/"),d(Lt,"rel","nofollow"),d(Dt,"href","http://www.image-net.org/challenges/LSVRC/2012/"),d(Dt,"rel","nofollow"),d(ba,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitConfig"),of(Se.src,Cm="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/beit_architecture.jpg")||d(Se,"src",Cm),d(Se,"alt","drawing"),d(Se,"width","600"),d(va,"href","https://arxiv.org/abs/2106.08254"),d(Wt,"href","https://huggingface.co/nielsr"),d(Wt,"rel","nofollow"),d(Vt,"href","https://huggingface.co/kamalkraj"),d(Vt,"rel","nofollow"),d(Rt,"href","https://github.com/microsoft/unilm/tree/master/beit"),d(Rt,"rel","nofollow"),d(Ne,"id","transformers.models.beit.modeling_beit.BeitModelOutputWithPooling"),d(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ne,"href","#transformers.models.beit.modeling_beit.BeitModelOutputWithPooling"),d(he,"class","relative group"),d(ya,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitModel"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wa,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.FlaxBeitModel"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(qe,"id","transformers.BeitConfig"),d(qe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(qe,"href","#transformers.BeitConfig"),d(ue,"class","relative group"),d($a,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitModel"),d(Qt,"href","https://huggingface.co/microsoft/beit-base-patch16-224-pt22k"),d(Qt,"rel","nofollow"),d(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(De,"id","transformers.BeitImageProcessor"),d(De,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(De,"href","#transformers.BeitImageProcessor"),d(be,"class","relative group"),d(Ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xa,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForSemanticSegmentation"),d(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(We,"id","transformers.BeitImageProcessor"),d(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(We,"href","#transformers.BeitImageProcessor"),d(ve,"class","relative group"),d(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ba,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForSemanticSegmentation"),d(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ue,"id","transformers.BeitModel"),d(Ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ue,"href","#transformers.BeitModel"),d(ye,"class","relative group"),d(ho,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ho,"rel","nofollow"),d(Ia,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitModel"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ge,"id","transformers.BeitForMaskedImageModeling"),d(Ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ge,"href","#transformers.BeitForMaskedImageModeling"),d($e,"class","relative group"),d(ka,"href","/docs/transformers/v4.25.1/en/model_doc/auto#transformers.AutoModelForMaskedImageModeling"),d(Ea,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForMaskedImageModeling"),d(_o,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(_o,"rel","nofollow"),d(Fa,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForMaskedImageModeling"),d(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ye,"id","transformers.BeitForImageClassification"),d(Ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ye,"href","#transformers.BeitForImageClassification"),d(xe,"class","relative group"),d($o,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d($o,"rel","nofollow"),d(Pa,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForImageClassification"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(et,"id","transformers.BeitForSemanticSegmentation"),d(et,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(et,"href","#transformers.BeitForSemanticSegmentation"),d(Ie,"class","relative group"),d(ko,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ko,"rel","nofollow"),d(Ma,"href","/docs/transformers/v4.25.1/en/model_doc/beit#transformers.BeitForSemanticSegmentation"),d(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(at,"id","transformers.FlaxBeitModel"),d(at,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(at,"href","#transformers.FlaxBeitModel"),d(Ee,"class","relative group"),d(ja,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(zo,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(zo,"rel","nofollow"),d(Co,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Co,"rel","nofollow"),d(Ao,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Ao,"rel","nofollow"),d(So,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(So,"rel","nofollow"),d(No,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(No,"rel","nofollow"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nt,"id","transformers.FlaxBeitForMaskedImageModeling"),d(nt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(nt,"href","#transformers.FlaxBeitForMaskedImageModeling"),d(Pe,"class","relative group"),d(za,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Vo,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Vo,"rel","nofollow"),d(Ro,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Ro,"rel","nofollow"),d(Uo,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Uo,"rel","nofollow"),d(Ho,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Ho,"rel","nofollow"),d(Jo,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Jo,"rel","nofollow"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(dt,"id","transformers.FlaxBeitForImageClassification"),d(dt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(dt,"href","#transformers.FlaxBeitForImageClassification"),d(ze,"class","relative group"),d(Ca,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Zo,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Zo,"rel","nofollow"),d(ea,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(ea,"rel","nofollow"),d(ta,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(ta,"rel","nofollow"),d(oa,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(oa,"rel","nofollow"),d(aa,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(aa,"rel","nofollow"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,p),_(o,v,g),_(o,u,g),e(u,f),e(f,b),$(l,b,null),e(u,h),e(u,k),e(k,En),_(o,_r,g),_(o,ce,g),e(ce,Ae),e(Ae,Ka),$(Pt,Ka,null),e(ce,Fn),e(ce,Xa),e(Xa,Pn),_(o,br,g),_(o,U,g),e(U,Mn),e(U,Mt),e(Mt,jn),e(U,zn),e(U,jt),e(jt,Cn),e(U,An),e(U,zt),e(zt,Sn),e(U,Nn),_(o,vr,g),_(o,la,g),e(la,qn),_(o,yr,g),_(o,da,g),e(da,Ya),e(Ya,Ln),_(o,wr,g),_(o,ca,g),e(ca,Dn),_(o,$r,g),_(o,z,g),e(z,F),e(F,On),e(F,ma),e(ma,Wn),e(F,Vn),e(F,pa),e(pa,Rn),e(F,Un),e(F,Ct),e(Ct,Hn),e(F,Jn),e(F,ha),e(ha,Gn),e(F,Kn),e(F,fa),e(fa,Xn),e(F,Yn),e(F,ga),e(ga,Qn),e(F,Zn),e(F,ua),e(ua,ei),e(F,ti),e(z,oi),e(z,At),e(At,ai),e(At,St),e(St,si),e(At,ri),e(z,ni),e(z,Nt),e(Nt,ii),e(Nt,_a),e(_a,li),e(Nt,di),e(z,ci),e(z,me),e(me,mi),e(me,Qa),e(Qa,pi),e(me,hi),e(me,qt),e(qt,fi),e(me,gi),e(z,ui),e(z,pe),e(pe,_i),e(pe,Lt),e(Lt,bi),e(pe,vi),e(pe,Dt),e(Dt,yi),e(pe,wi),e(z,$i),e(z,L),e(L,Ti),e(L,Za),e(Za,xi),e(L,Bi),e(L,es),e(es,Ii),e(L,ki),e(L,ba),e(ba,Ei),e(L,Fi),e(L,ts),e(ts,Pi),e(L,Mi),_(o,Tr,g),_(o,Se,g),_(o,xr,g),_(o,Ot,g),e(Ot,ji),e(Ot,va),e(va,zi),_(o,Br,g),_(o,H,g),e(H,Ci),e(H,Wt),e(Wt,Ai),e(H,Si),e(H,Vt),e(Vt,Ni),e(H,qi),e(H,Rt),e(Rt,Li),e(H,Di),_(o,Ir,g),_(o,he,g),e(he,Ne),e(Ne,os),$(Ut,os,null),e(he,Oi),e(he,as),e(as,Wi),_(o,kr,g),_(o,fe,g),$(Ht,fe,null),e(fe,Vi),e(fe,Jt),e(Jt,Ri),e(Jt,ya),e(ya,Ui),e(Jt,Hi),_(o,Er,g),_(o,ge,g),$(Gt,ge,null),e(ge,Ji),e(ge,Kt),e(Kt,Gi),e(Kt,wa),e(wa,Ki),e(Kt,Xi),_(o,Fr,g),_(o,ue,g),e(ue,qe),e(qe,ss),$(Xt,ss,null),e(ue,Yi),e(ue,rs),e(rs,Qi),_(o,Pr,g),_(o,ee,g),$(Yt,ee,null),e(ee,Zi),e(ee,_e),e(_e,el),e(_e,$a),e($a,tl),e(_e,ol),e(_e,Qt),e(Qt,al),e(_e,sl),e(ee,rl),$(Le,ee,null),_(o,Mr,g),_(o,be,g),e(be,De),e(De,ns),$(Zt,ns,null),e(be,nl),e(be,is),e(is,il),_(o,jr,g),_(o,D,g),$(eo,D,null),e(D,ll),e(D,ls),e(ls,dl),e(D,cl),e(D,Ta),$(to,Ta,null),e(D,ml),e(D,Oe),$(oo,Oe,null),e(Oe,pl),e(Oe,ao),e(ao,hl),e(ao,xa),e(xa,fl),e(ao,gl),_(o,zr,g),_(o,ve,g),e(ve,We),e(We,ds),$(so,ds,null),e(ve,ul),e(ve,cs),e(cs,_l),_(o,Cr,g),_(o,O,g),$(ro,O,null),e(O,bl),e(O,ms),e(ms,vl),e(O,yl),e(O,Ve),$(no,Ve,null),e(Ve,wl),e(Ve,ps),e(ps,$l),e(O,Tl),e(O,Re),$(io,Re,null),e(Re,xl),e(Re,lo),e(lo,Bl),e(lo,Ba),e(Ba,Il),e(lo,kl),_(o,Ar,g),_(o,ye,g),e(ye,Ue),e(Ue,hs),$(co,hs,null),e(ye,El),e(ye,fs),e(fs,Fl),_(o,Sr,g),_(o,te,g),$(mo,te,null),e(te,Pl),e(te,po),e(po,Ml),e(po,ho),e(ho,jl),e(po,zl),e(te,Cl),e(te,J),$(fo,J,null),e(J,Al),e(J,we),e(we,Sl),e(we,Ia),e(Ia,Nl),e(we,ql),e(we,gs),e(gs,Ll),e(we,Dl),e(J,Ol),$(He,J,null),e(J,Wl),$(Je,J,null),_(o,Nr,g),_(o,$e,g),e($e,Ge),e(Ge,us),$(go,us,null),e($e,Vl),e($e,_s),e(_s,Rl),_(o,qr,g),_(o,oe,g),$(uo,oe,null),e(oe,Ul),e(oe,ae),e(ae,Hl),e(ae,ka),e(ka,Jl),e(ae,Gl),e(ae,Ea),e(Ea,Kl),e(ae,Xl),e(ae,_o),e(_o,Yl),e(ae,Ql),e(oe,Zl),e(oe,G),$(bo,G,null),e(G,ed),e(G,Te),e(Te,td),e(Te,Fa),e(Fa,od),e(Te,ad),e(Te,bs),e(bs,sd),e(Te,rd),e(G,nd),$(Ke,G,null),e(G,id),$(Xe,G,null),_(o,Lr,g),_(o,xe,g),e(xe,Ye),e(Ye,vs),$(vo,vs,null),e(xe,ld),e(xe,ys),e(ys,dd),_(o,Dr,g),_(o,W,g),$(yo,W,null),e(W,cd),e(W,ws),e(ws,md),e(W,pd),e(W,wo),e(wo,hd),e(wo,$o),e($o,fd),e(wo,gd),e(W,ud),e(W,K),$(To,K,null),e(K,_d),e(K,Be),e(Be,bd),e(Be,Pa),e(Pa,vd),e(Be,yd),e(Be,$s),e($s,wd),e(Be,$d),e(K,Td),$(Qe,K,null),e(K,xd),$(Ze,K,null),_(o,Or,g),_(o,Ie,g),e(Ie,et),e(et,Ts),$(xo,Ts,null),e(Ie,Bd),e(Ie,xs),e(xs,Id),_(o,Wr,g),_(o,V,g),$(Bo,V,null),e(V,kd),e(V,Bs),e(Bs,Ed),e(V,Fd),e(V,Io),e(Io,Pd),e(Io,ko),e(ko,Md),e(Io,jd),e(V,zd),e(V,X),$(Eo,X,null),e(X,Cd),e(X,ke),e(ke,Ad),e(ke,Ma),e(Ma,Sd),e(ke,Nd),e(ke,Is),e(Is,qd),e(ke,Ld),e(X,Dd),$(tt,X,null),e(X,Od),$(ot,X,null),_(o,Vr,g),_(o,Ee,g),e(Ee,at),e(at,ks),$(Fo,ks,null),e(Ee,Wd),e(Ee,Es),e(Es,Vd),_(o,Rr,g),_(o,P,g),$(Po,P,null),e(P,Rd),e(P,Fs),e(Fs,Ud),e(P,Hd),e(P,Mo),e(Mo,Jd),e(Mo,ja),e(ja,Gd),e(Mo,Kd),e(P,Xd),e(P,jo),e(jo,Yd),e(jo,zo),e(zo,Qd),e(jo,Zd),e(P,ec),e(P,Ps),e(Ps,tc),e(P,oc),e(P,se),e(se,Ms),e(Ms,Co),e(Co,ac),e(se,sc),e(se,js),e(js,Ao),e(Ao,rc),e(se,nc),e(se,zs),e(zs,So),e(So,ic),e(se,lc),e(se,Cs),e(Cs,No),e(No,dc),e(P,cc),e(P,Y),$(qo,Y,null),e(Y,mc),e(Y,Fe),e(Fe,pc),e(Fe,As),e(As,hc),e(Fe,fc),e(Fe,Ss),e(Ss,gc),e(Fe,uc),e(Y,_c),$(st,Y,null),e(Y,bc),$(rt,Y,null),_(o,Ur,g),_(o,Pe,g),e(Pe,nt),e(nt,Ns),$(Lo,Ns,null),e(Pe,vc),e(Pe,qs),e(qs,yc),_(o,Hr,g),_(o,M,g),$(Do,M,null),e(M,wc),e(M,Ls),e(Ls,$c),e(M,Tc),e(M,Oo),e(Oo,xc),e(Oo,za),e(za,Bc),e(Oo,Ic),e(M,kc),e(M,Wo),e(Wo,Ec),e(Wo,Vo),e(Vo,Fc),e(Wo,Pc),e(M,Mc),e(M,Ds),e(Ds,jc),e(M,zc),e(M,re),e(re,Os),e(Os,Ro),e(Ro,Cc),e(re,Ac),e(re,Ws),e(Ws,Uo),e(Uo,Sc),e(re,Nc),e(re,Vs),e(Vs,Ho),e(Ho,qc),e(re,Lc),e(re,Rs),e(Rs,Jo),e(Jo,Dc),e(M,Oc),e(M,A),$(Go,A,null),e(A,Wc),e(A,Me),e(Me,Vc),e(Me,Us),e(Us,Rc),e(Me,Uc),e(Me,Hs),e(Hs,Hc),e(Me,Jc),e(A,Gc),$(it,A,null),e(A,Kc),e(A,je),e(je,Xc),e(je,Js),e(Js,Yc),e(je,Qc),e(je,Gs),e(Gs,Zc),e(je,em),e(A,tm),$(lt,A,null),_(o,Jr,g),_(o,ze,g),e(ze,dt),e(dt,Ks),$(Ko,Ks,null),e(ze,om),e(ze,Xs),e(Xs,am),_(o,Gr,g),_(o,j,g),$(Xo,j,null),e(j,sm),e(j,Ys),e(Ys,rm),e(j,nm),e(j,Yo),e(Yo,im),e(Yo,Ca),e(Ca,lm),e(Yo,dm),e(j,cm),e(j,Qo),e(Qo,mm),e(Qo,Zo),e(Zo,pm),e(Qo,hm),e(j,fm),e(j,Qs),e(Qs,gm),e(j,um),e(j,ne),e(ne,Zs),e(Zs,ea),e(ea,_m),e(ne,bm),e(ne,er),e(er,ta),e(ta,vm),e(ne,ym),e(ne,tr),e(tr,oa),e(oa,wm),e(ne,$m),e(ne,or),e(or,aa),e(aa,Tm),e(j,xm),e(j,Q),$(sa,Q,null),e(Q,Bm),e(Q,Ce),e(Ce,Im),e(Ce,ar),e(ar,km),e(Ce,Em),e(Ce,sr),e(sr,Fm),e(Ce,Pm),e(Q,Mm),$(ct,Q,null),e(Q,jm),$(mt,Q,null),Kr=!0},p(o,[g]){const ra={};g&2&&(ra.$$scope={dirty:g,ctx:o}),Le.$set(ra);const rr={};g&2&&(rr.$$scope={dirty:g,ctx:o}),He.$set(rr);const nr={};g&2&&(nr.$$scope={dirty:g,ctx:o}),Je.$set(nr);const ir={};g&2&&(ir.$$scope={dirty:g,ctx:o}),Ke.$set(ir);const na={};g&2&&(na.$$scope={dirty:g,ctx:o}),Xe.$set(na);const lr={};g&2&&(lr.$$scope={dirty:g,ctx:o}),Qe.$set(lr);const dr={};g&2&&(dr.$$scope={dirty:g,ctx:o}),Ze.$set(dr);const cr={};g&2&&(cr.$$scope={dirty:g,ctx:o}),tt.$set(cr);const ie={};g&2&&(ie.$$scope={dirty:g,ctx:o}),ot.$set(ie);const mr={};g&2&&(mr.$$scope={dirty:g,ctx:o}),st.$set(mr);const pr={};g&2&&(pr.$$scope={dirty:g,ctx:o}),rt.$set(pr);const hr={};g&2&&(hr.$$scope={dirty:g,ctx:o}),it.$set(hr);const fr={};g&2&&(fr.$$scope={dirty:g,ctx:o}),lt.$set(fr);const gr={};g&2&&(gr.$$scope={dirty:g,ctx:o}),ct.$set(gr);const ur={};g&2&&(ur.$$scope={dirty:g,ctx:o}),mt.$set(ur)},i(o){Kr||(T(l.$$.fragment,o),T(Pt.$$.fragment,o),T(Ut.$$.fragment,o),T(Ht.$$.fragment,o),T(Gt.$$.fragment,o),T(Xt.$$.fragment,o),T(Yt.$$.fragment,o),T(Le.$$.fragment,o),T(Zt.$$.fragment,o),T(eo.$$.fragment,o),T(to.$$.fragment,o),T(oo.$$.fragment,o),T(so.$$.fragment,o),T(ro.$$.fragment,o),T(no.$$.fragment,o),T(io.$$.fragment,o),T(co.$$.fragment,o),T(mo.$$.fragment,o),T(fo.$$.fragment,o),T(He.$$.fragment,o),T(Je.$$.fragment,o),T(go.$$.fragment,o),T(uo.$$.fragment,o),T(bo.$$.fragment,o),T(Ke.$$.fragment,o),T(Xe.$$.fragment,o),T(vo.$$.fragment,o),T(yo.$$.fragment,o),T(To.$$.fragment,o),T(Qe.$$.fragment,o),T(Ze.$$.fragment,o),T(xo.$$.fragment,o),T(Bo.$$.fragment,o),T(Eo.$$.fragment,o),T(tt.$$.fragment,o),T(ot.$$.fragment,o),T(Fo.$$.fragment,o),T(Po.$$.fragment,o),T(qo.$$.fragment,o),T(st.$$.fragment,o),T(rt.$$.fragment,o),T(Lo.$$.fragment,o),T(Do.$$.fragment,o),T(Go.$$.fragment,o),T(it.$$.fragment,o),T(lt.$$.fragment,o),T(Ko.$$.fragment,o),T(Xo.$$.fragment,o),T(sa.$$.fragment,o),T(ct.$$.fragment,o),T(mt.$$.fragment,o),Kr=!0)},o(o){x(l.$$.fragment,o),x(Pt.$$.fragment,o),x(Ut.$$.fragment,o),x(Ht.$$.fragment,o),x(Gt.$$.fragment,o),x(Xt.$$.fragment,o),x(Yt.$$.fragment,o),x(Le.$$.fragment,o),x(Zt.$$.fragment,o),x(eo.$$.fragment,o),x(to.$$.fragment,o),x(oo.$$.fragment,o),x(so.$$.fragment,o),x(ro.$$.fragment,o),x(no.$$.fragment,o),x(io.$$.fragment,o),x(co.$$.fragment,o),x(mo.$$.fragment,o),x(fo.$$.fragment,o),x(He.$$.fragment,o),x(Je.$$.fragment,o),x(go.$$.fragment,o),x(uo.$$.fragment,o),x(bo.$$.fragment,o),x(Ke.$$.fragment,o),x(Xe.$$.fragment,o),x(vo.$$.fragment,o),x(yo.$$.fragment,o),x(To.$$.fragment,o),x(Qe.$$.fragment,o),x(Ze.$$.fragment,o),x(xo.$$.fragment,o),x(Bo.$$.fragment,o),x(Eo.$$.fragment,o),x(tt.$$.fragment,o),x(ot.$$.fragment,o),x(Fo.$$.fragment,o),x(Po.$$.fragment,o),x(qo.$$.fragment,o),x(st.$$.fragment,o),x(rt.$$.fragment,o),x(Lo.$$.fragment,o),x(Do.$$.fragment,o),x(Go.$$.fragment,o),x(it.$$.fragment,o),x(lt.$$.fragment,o),x(Ko.$$.fragment,o),x(Xo.$$.fragment,o),x(sa.$$.fragment,o),x(ct.$$.fragment,o),x(mt.$$.fragment,o),Kr=!1},d(o){t(p),o&&t(v),o&&t(u),B(l),o&&t(_r),o&&t(ce),B(Pt),o&&t(br),o&&t(U),o&&t(vr),o&&t(la),o&&t(yr),o&&t(da),o&&t(wr),o&&t(ca),o&&t($r),o&&t(z),o&&t(Tr),o&&t(Se),o&&t(xr),o&&t(Ot),o&&t(Br),o&&t(H),o&&t(Ir),o&&t(he),B(Ut),o&&t(kr),o&&t(fe),B(Ht),o&&t(Er),o&&t(ge),B(Gt),o&&t(Fr),o&&t(ue),B(Xt),o&&t(Pr),o&&t(ee),B(Yt),B(Le),o&&t(Mr),o&&t(be),B(Zt),o&&t(jr),o&&t(D),B(eo),B(to),B(oo),o&&t(zr),o&&t(ve),B(so),o&&t(Cr),o&&t(O),B(ro),B(no),B(io),o&&t(Ar),o&&t(ye),B(co),o&&t(Sr),o&&t(te),B(mo),B(fo),B(He),B(Je),o&&t(Nr),o&&t($e),B(go),o&&t(qr),o&&t(oe),B(uo),B(bo),B(Ke),B(Xe),o&&t(Lr),o&&t(xe),B(vo),o&&t(Dr),o&&t(W),B(yo),B(To),B(Qe),B(Ze),o&&t(Or),o&&t(Ie),B(xo),o&&t(Wr),o&&t(V),B(Bo),B(Eo),B(tt),B(ot),o&&t(Vr),o&&t(Ee),B(Fo),o&&t(Rr),o&&t(P),B(Po),B(qo),B(st),B(rt),o&&t(Ur),o&&t(Pe),B(Lo),o&&t(Hr),o&&t(M),B(Do),B(Go),B(it),B(lt),o&&t(Jr),o&&t(ze),B(Ko),o&&t(Gr),o&&t(j),B(Xo),B(sa),B(ct),B(mt)}}}const wf={local:"beit",sections:[{local:"overview",title:"Overview"},{local:"transformers.models.beit.modeling_beit.BeitModelOutputWithPooling",title:"BEiT specific outputs"},{local:"transformers.BeitConfig",title:"BeitConfig"},{local:"transformers.BeitImageProcessor",title:"BeitFeatureExtractor"},{local:"transformers.BeitImageProcessor",title:"BeitImageProcessor"},{local:"transformers.BeitModel",title:"BeitModel"},{local:"transformers.BeitForMaskedImageModeling",title:"BeitForMaskedImageModeling"},{local:"transformers.BeitForImageClassification",title:"BeitForImageClassification"},{local:"transformers.BeitForSemanticSegmentation",title:"BeitForSemanticSegmentation"},{local:"transformers.FlaxBeitModel",title:"FlaxBeitModel"},{local:"transformers.FlaxBeitForMaskedImageModeling",title:"FlaxBeitForMaskedImageModeling"},{local:"transformers.FlaxBeitForImageClassification",title:"FlaxBeitForImageClassification"}],title:"BEiT"};function $f(I){return af(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ff extends Qh{constructor(p){super();Zh(this,p,$f,yf,ef,{})}}export{Ff as default,wf as metadata};
