import{S as yp,i as $p,s as Tp,e as a,k as m,w as b,t as s,M as wp,c as n,d as t,m as p,a as r,x as k,h as i,b as d,G as e,g as u,y as F,q as y,o as $,B as T,v as xp,L as yo}from"../../chunks/vendor-hf-doc-builder.js";import{T as Yt}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as $o}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as C}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Fo}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Mp(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import FlavaConfig, FlavaModel, FlavaForPreTraining

# Initializing a FlavaConfig with style configuration
configuration = FlavaConfig()

# Initializing a FlavaModel and FlavaForPreTraining model (with random weights) from the style configuration
model = FlavaModel(configuration)
model_pre = FlavaForPreTraining(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaConfig with style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = FlavaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaModel and FlavaForPreTraining model (with random weights) from the style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaModel(configuration)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_pre = FlavaForPreTraining(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
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration_pre = model_pre.config`}}),{c(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function zp(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import FlavaTextConfig, FlavaTextModel

# Initializing a FlavaTextModel with  style configuration
configuration = FlavaTextConfig()

# Initializing a FlavaTextModel model (with random weights) from the style configuration
model = FlavaTextModel(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> FlavaTextConfig, FlavaTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaTextModel with  style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = FlavaTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaTextModel model (with random weights) from the style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaTextModel(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(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Pp(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import FlavaImageConfig, FlavaImageModel

# Initializing a FlavaImageModel with  style configuration
configuration = FlavaImageConfig()

# Initializing a FlavaImageModel model (with random weights) from the style configuration
model = FlavaImageModel(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> FlavaImageConfig, FlavaImageModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaImageModel with  style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = FlavaImageConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaImageModel model (with random weights) from the style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaImageModel(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(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Ip(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import FlavaMultimodalConfig, FlavaMultimodalModel

# Initializing a FlavaMultimodalModel with  style configuration
configuration = FlavaMultimodalConfig()

# Initializing a FlavaMultimodalModel model (with random weights) from the style configuration
model = FlavaMultimodalModel(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> FlavaMultimodalConfig, FlavaMultimodalModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaMultimodalModel with  style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = FlavaMultimodalConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FlavaMultimodalModel model (with random weights) from the style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaMultimodalModel(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(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Cp(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Ap(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Ep(x){let c,w,_,g,v;return g=new $o({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, FlavaModel

model = FlavaModel.from_pretrained("facebook/flava-full")
processor = AutoProcessor.from_pretrained("facebook/flava-full")

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

inputs = processor(text=["a photo of a cat"], images=image, return_tensors="pt", padding=True)

outputs = model(**inputs)
logits_per_image = outputs.contrastive_logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, FlavaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaModel.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)

<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>inputs = processor(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.contrastive_logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){c=a("p"),w=s("Examples:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Examples:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Np(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function qp(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function jp(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Op(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import AutoTokenizer, FlavaTextModel
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/flava-full")
model = FlavaTextModel.from_pretrained("facebook/flava-full")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
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> AutoTokenizer, FlavaTextModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaTextModel.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, 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>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Lp(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Dp(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import AutoImageProcessor, FlavaImageModel
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/flava-full")
model = FlavaImageModel.from_pretrained("facebook/flava-full")

inputs = image_processor(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> AutoImageProcessor, FlavaImageModel
<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>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaImageModel.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Wp(x){let c,w,_,g,v;return{c(){c=a("p"),w=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=s("Module"),v=s(`
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){c=n(l,"P",{});var f=r(c);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(f,"CODE",{});var z=r(_);g=i(z,"Module"),z.forEach(t),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){u(l,c,f),e(c,w),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Sp(x){let c,w,_,g,v;return g=new $o({props:{code:`from transformers import AutoTokenizer, FlavaMultimodalModel
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/flava-full")
model = FlavaMultimodalModel.from_pretrained("facebook/flava-full")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
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> AutoTokenizer, FlavaMultimodalModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlavaMultimodalModel.from_pretrained(<span class="hljs-string">&quot;facebook/flava-full&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, 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>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=a("p"),w=s("Example:"),_=m(),b(g.$$.fragment)},l(l){c=n(l,"P",{});var f=r(c);w=i(f,"Example:"),f.forEach(t),_=p(l),k(g.$$.fragment,l)},m(l,f){u(l,c,f),e(c,w),u(l,_,f),F(g,l,f),v=!0},p:yo,i(l){v||(y(g.$$.fragment,l),v=!0)},o(l){$(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),T(g,l)}}}function Vp(x){let c,w,_,g,v,l,f,z,hs,Zn,se,Ee,Ka,To,gs,Ya,us,Xn,Ne,_s,wo,vs,bs,Qn,Zt,ks,er,Xt,Fs,or,Qt,Za,ys,tr,Y,$s,xo,Ts,ws,Mo,xs,Ms,ar,ie,qe,Xa,zo,zs,Qa,Ps,nr,P,Po,Is,Z,ea,Cs,As,oa,Es,Ns,Io,qs,js,Os,le,Ls,ta,Ds,Ws,aa,Ss,Vs,Bs,je,Rs,Oe,Co,Us,Ao,Hs,na,Gs,Js,Ks,Le,Eo,Ys,No,Zs,ra,Xs,Qs,rr,de,De,en,qo,ei,on,oi,sr,A,jo,ti,Oo,ai,sa,ni,ri,si,Lo,ii,Do,li,di,ci,ce,mi,ia,pi,fi,la,hi,gi,ui,We,ir,me,Se,tn,Wo,_i,an,vi,lr,E,So,bi,Vo,ki,da,Fi,yi,$i,Bo,Ti,Ro,wi,xi,Mi,pe,zi,ca,Pi,Ii,ma,Ci,Ai,Ei,Ve,dr,fe,Be,nn,Uo,Ni,rn,qi,cr,N,Ho,ji,Go,Oi,pa,Li,Di,Wi,Jo,Si,Ko,Vi,Bi,Ri,he,Ui,fa,Hi,Gi,ha,Ji,Ki,Yi,Re,mr,ge,Ue,sn,Yo,Zi,ln,Xi,pr,Zo,Xo,fr,ue,He,dn,Qo,Qi,cn,el,hr,q,et,ol,mn,tl,al,O,ga,nl,rl,ua,sl,il,_a,ll,dl,pn,cl,ml,va,pl,fl,hl,Ge,ot,gl,tt,ul,ba,_l,vl,bl,Je,at,kl,nt,Fl,ka,yl,$l,gr,_e,Ke,fn,rt,Tl,hn,wl,ur,st,it,_r,ve,Ye,gn,lt,xl,un,Ml,vr,U,dt,zl,_n,Pl,Il,Ze,ct,Cl,vn,Al,br,be,Xe,bn,mt,El,kn,Nl,kr,L,pt,ql,Fn,jl,Ol,ft,Ll,ht,Dl,Wl,Sl,X,gt,Vl,ke,Bl,Fa,Rl,Ul,yn,Hl,Gl,Jl,Qe,Fr,Fe,eo,$n,ut,Kl,Tn,Yl,yr,j,_t,Zl,vt,Xl,bt,Ql,ed,od,D,kt,td,ye,ad,ya,nd,rd,wn,sd,id,ld,oo,dd,to,cd,Q,Ft,md,$e,pd,$a,fd,hd,xn,gd,ud,_d,ao,vd,ee,yt,bd,Te,kd,Ta,Fd,yd,Mn,$d,Td,wd,no,$r,we,ro,zn,$t,xd,Pn,Md,Tr,I,Tt,zd,wt,Pd,In,Id,Cd,Ad,xt,Ed,Mt,Nd,qd,jd,wa,zt,Od,xa,Pt,Ld,Ma,It,wr,xe,so,Cn,Ct,Dd,An,Wd,xr,H,At,Sd,Et,Vd,Nt,Bd,Rd,Ud,W,qt,Hd,Me,Gd,za,Jd,Kd,En,Yd,Zd,Xd,io,Qd,lo,Mr,ze,co,Nn,jt,ec,qn,oc,zr,G,Ot,tc,Lt,ac,Dt,nc,rc,sc,S,Wt,ic,Pe,lc,Pa,dc,cc,jn,mc,pc,fc,mo,hc,po,Pr,Ie,fo,On,St,gc,Ln,uc,Ir,J,Vt,_c,Bt,vc,Rt,bc,kc,Fc,V,Ut,yc,Ce,$c,Ia,Tc,wc,Dn,xc,Mc,zc,ho,Pc,go,Cr;return l=new C({}),To=new C({}),zo=new C({}),Po=new M({props:{name:"class transformers.FlavaConfig",anchor:"transformers.FlavaConfig",parameters:[{name:"image_config",val:": typing.Dict[str, typing.Any] = None"},{name:"text_config",val:": typing.Dict[str, typing.Any] = None"},{name:"multimodal_config",val:": typing.Dict[str, typing.Any] = None"},{name:"image_codebook_config",val:": typing.Dict[str, typing.Any] = None"},{name:"hidden_size",val:": int = 768"},{name:"layer_norm_eps",val:": float = 1e-12"},{name:"projection_dim",val:": int = 768"},{name:"init_codebook",val:": bool = True"},{name:"logit_scale_init_value",val:": float = 2.6592"},{name:"initializer_range",val:": float = 0.02"},{name:"ce_ignore_index",val:": int = -100"},{name:"mim_weight",val:": float = 1.0"},{name:"mlm_weight",val:": float = 1.0"},{name:"global_contrastive_weight",val:": float = 1.0"},{name:"itm_weight",val:": float = 1.0"},{name:"mmm_image_weight",val:": float = 1.0"},{name:"mmm_text_weight",val:": float = 1.0"},{name:"global_backprop_contrastive",val:": bool = True"},{name:"skip_unmasked_multimodal_encoder",val:": bool = True"},{name:"return_loss",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextConfig">FlavaTextConfig</a>.`,name:"text_config"},{anchor:"transformers.FlavaConfig.image_config",description:`<strong>image_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageConfig">FlavaImageConfig</a>.`,name:"image_config"},{anchor:"transformers.FlavaConfig.multimodal_config",description:`<strong>multimodal_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalConfig">FlavaMultimodalConfig</a>.`,name:"multimodal_config"},{anchor:"transformers.FlavaConfig.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.FlavaConfig.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.FlavaConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and image projection layers.`,name:"projection_dim"},{anchor:"transformers.FlavaConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original FLAVA/CLIP
implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.FlavaConfig.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.FlavaConfig.ce_ignore_index",description:`<strong>ce_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
Cross entropy index to ignore.`,name:"ce_ignore_index"},{anchor:"transformers.FlavaConfig.mim_weight",description:`<strong>mim_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to MIM (Masked Image Modeling) unimodal loss`,name:"mim_weight"},{anchor:"transformers.FlavaConfig.mlm_weight",description:`<strong>mlm_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to MLM (Masked Language Modeling) unimodal loss`,name:"mlm_weight"},{anchor:"transformers.FlavaConfig.global_contrastive_weight",description:`<strong>global_contrastive_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to global contrastive cross-alignment loss.`,name:"global_contrastive_weight"},{anchor:"transformers.FlavaConfig.itm_weight",description:`<strong>itm_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to image-text matching multimodal loss.`,name:"itm_weight"},{anchor:"transformers.FlavaConfig.mmm_image_weight",description:`<strong>mmm_image_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to MMM loss&#x2019;s image part.`,name:"mmm_image_weight"},{anchor:"transformers.FlavaConfig.mmm_text_weight",description:`<strong>mmm_text_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Weight to be assigned to MMM loss&#x2019;s text part.`,name:"mmm_text_weight"},{anchor:"transformers.FlavaConfig.global_backprop_contrastive",description:`<strong>global_backprop_contrastive</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use global backpropgation through all workers in contrastive loss.`,name:"global_backprop_contrastive"},{anchor:"transformers.FlavaConfig.skip_unmasked_multimodal_encoder",description:`<strong>skip_unmasked_multimodal_encoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to skip running unmasked multimodal encoder whose outputs are not used by FLAVA losses.`,name:"skip_unmasked_multimodal_encoder"},{anchor:"transformers.FlavaConfig.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return loss or not`,name:"return_loss"},{anchor:"transformers.FlavaConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L463"}}),je=new Fo({props:{anchor:"transformers.FlavaConfig.example",$$slots:{default:[Mp]},$$scope:{ctx:x}}}),Co=new M({props:{name:"from_configs",anchor:"transformers.FlavaConfig.from_configs",parameters:[{name:"image_config",val:": FlavaImageConfig"},{name:"text_config",val:": FlavaTextConfig"},{name:"multimodal_config",val:": FlavaMultimodalConfig"},{name:"image_codebook_config",val:": FlavaImageCodebookConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L617",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaConfig"
>FlavaConfig</a></p>
`}}),Eo=new M({props:{name:"to_dict",anchor:"transformers.FlavaConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L642",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, any]</code></p>
`}}),qo=new C({}),jo=new M({props:{name:"class transformers.FlavaTextConfig",anchor:"transformers.FlavaTextConfig",parameters:[{name:"vocab_size",val:": int = 30522"},{name:"type_vocab_size",val:": int = 2"},{name:"max_position_embeddings",val:": int = 512"},{name:"position_embedding_type",val:": str = 'absolute'"},{name:"hidden_size",val:": int = 768"},{name:"num_hidden_layers",val:": int = 12"},{name:"num_attention_heads",val:": int = 12"},{name:"intermediate_size",val:": int = 3072"},{name:"hidden_act",val:": str = 'gelu'"},{name:"hidden_dropout_prob",val:": float = 0.0"},{name:"attention_probs_dropout_prob",val:": float = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"layer_norm_eps",val:": float = 1e-12"},{name:"pad_token_id",val:": int = 0"},{name:"qkv_bias",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel">FlavaTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.FlavaTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel">FlavaTextModel</a>. Note that even though
text encoder allows <code>token_type_ids</code>&#x2019;s value as 2, for text-only pretraining and fine-tuning, only 1 is
used similar to RoBERTa.`,name:"type_vocab_size"},{anchor:"transformers.FlavaTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048). For VL, max_length passed to model is 77.`,name:"max_position_embeddings"},{anchor:"transformers.FlavaTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.FlavaTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.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.FlavaTextConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L150"}}),We=new Fo({props:{anchor:"transformers.FlavaTextConfig.example",$$slots:{default:[zp]},$$scope:{ctx:x}}}),Wo=new C({}),So=new M({props:{name:"class transformers.FlavaImageConfig",anchor:"transformers.FlavaImageConfig",parameters:[{name:"hidden_size",val:": int = 768"},{name:"num_hidden_layers",val:": int = 12"},{name:"num_attention_heads",val:": int = 12"},{name:"intermediate_size",val:": int = 3072"},{name:"hidden_act",val:": int = 'gelu'"},{name:"hidden_dropout_prob",val:": float = 0.0"},{name:"attention_probs_dropout_prob",val:": float = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"layer_norm_eps",val:": float = 1e-12"},{name:"image_size",val:": int = 224"},{name:"patch_size",val:": int = 16"},{name:"num_channels",val:": int = 3"},{name:"qkv_bias",val:": bool = True"},{name:"mask_token",val:": bool = True"},{name:"vocab_size",val:": int = 8192"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.FlavaImageConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.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.FlavaImageConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.FlavaImageConfig.mask_token",description:`<strong>mask_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use a mask token or not. Used in MIM (Masked Image Modeling) loss for FLAVA.`,name:"mask_token"},{anchor:"transformers.FlavaImageConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
Vocabulary size of the <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageCodebook">FlavaImageCodebook</a> used in conjunction with <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel">FlavaImageModel</a> for MIM (Masked
Image Modeling) loss for FLAVA.`,name:"vocab_size"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L32"}}),Ve=new Fo({props:{anchor:"transformers.FlavaImageConfig.example",$$slots:{default:[Pp]},$$scope:{ctx:x}}}),Uo=new C({}),Ho=new M({props:{name:"class transformers.FlavaMultimodalConfig",anchor:"transformers.FlavaMultimodalConfig",parameters:[{name:"hidden_size",val:": int = 768"},{name:"num_hidden_layers",val:": int = 6"},{name:"num_attention_heads",val:": int = 12"},{name:"intermediate_size",val:": int = 3072"},{name:"hidden_act",val:": int = 'gelu'"},{name:"hidden_dropout_prob",val:": int = 0.0"},{name:"attention_probs_dropout_prob",val:": int = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"layer_norm_eps",val:": float = 1e-12"},{name:"qkv_bias",val:": bool = True"},{name:"use_cls_token",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaMultimodalConfig.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.FlavaMultimodalConfig.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.FlavaMultimodalConfig.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.FlavaMultimodalConfig.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.FlavaMultimodalConfig.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.FlavaMultimodalConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.FlavaMultimodalConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.FlavaMultimodalConfig.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.FlavaMultimodalConfig.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.FlavaMultimodalConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.FlavaMultimodalConfig.use_cls_token",description:`<strong>use_cls_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use an extra CLS token for multimodal settings. Usually needed by the FLAVA model.`,name:"use_cls_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L278"}}),Re=new Fo({props:{anchor:"transformers.FlavaMultimodalConfig.example",$$slots:{default:[Ip]},$$scope:{ctx:x}}}),Yo=new C({}),Xo=new M({props:{name:"class transformers.FlavaImageCodebookConfig",anchor:"transformers.FlavaImageCodebookConfig",parameters:[{name:"num_groups",val:": int = 4"},{name:"input_channels",val:": int = 3"},{name:"num_blocks_per_group",val:": int = 2"},{name:"hidden_size",val:": int = 256"},{name:"vocab_size",val:": int = 8192"},{name:"freeze",val:": int = True"},{name:"initializer_range",val:": float = 0.02"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/configuration_flava.py#L379"}}),Qo=new C({}),et=new M({props:{name:"class transformers.FlavaProcessor",anchor:"transformers.FlavaProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaProcessor.image_processor",description:'<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageProcessor">FlavaImageProcessor</a>) &#x2014; The image processor is a required input.',name:"image_processor"},{anchor:"transformers.FlavaProcessor.tokenizer",description:'<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>) &#x2014; The tokenizer is a required input.',name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/processing_flava.py#L28"}}),ot=new M({props:{name:"batch_decode",anchor:"transformers.FlavaProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/processing_flava.py#L129"}}),at=new M({props:{name:"decode",anchor:"transformers.FlavaProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/processing_flava.py#L136"}}),rt=new C({}),it=new M({props:{name:"class transformers.FlavaFeatureExtractor",anchor:"transformers.FlavaFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/feature_extraction_flava.py#L26"}}),lt=new C({}),dt=new M({props:{name:"class transformers.FlavaImageProcessor",anchor:"transformers.FlavaImageProcessor",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:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"return_image_mask",val:": bool = False"},{name:"input_size_patches",val:": int = 14"},{name:"total_mask_patches",val:": int = 75"},{name:"mask_group_min_patches",val:": int = 16"},{name:"mask_group_max_patches",val:": typing.Optional[int] = None"},{name:"mask_group_min_aspect_ratio",val:": float = 0.3"},{name:"mask_group_max_aspect_ratio",val:": typing.Optional[float] = None"},{name:"return_codebook_pixels",val:": bool = False"},{name:"codebook_do_resize",val:": bool = True"},{name:"codebook_size",val:": bool = None"},{name:"codebook_resample",val:": int = <Resampling.LANCZOS: 1>"},{name:"codebook_do_center_crop",val:": bool = True"},{name:"codebook_crop_size",val:": int = None"},{name:"codebook_do_rescale",val:": bool = True"},{name:"codebook_rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"codebook_do_map_pixels",val:": bool = True"},{name:"codebook_do_normalize",val:": bool = True"},{name:"codebook_image_mean",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"codebook_image_std",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaImageProcessor.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 <code>preprocess</code>.`,name:"do_resize"},{anchor:"transformers.FlavaImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after resizing. Can be overridden by the <code>size</code> parameter in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.FlavaImageProcessor.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
<code>preprocess</code>.`,name:"resample"},{anchor:"transformers.FlavaImageProcessor.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 images. Can be overridden by the <code>do_center_crop</code> parameter in <code>preprocess</code>.`,name:"do_center_crop"},{anchor:"transformers.FlavaImageProcessor.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>):
Size of image after the center crop <code>(crop_size[&quot;height&quot;], crop_size[&quot;width&quot;])</code>. Can be overridden by the
<code>crop_size</code> parameter in <code>preprocess</code>.`,name:"crop_size"},{anchor:"transformers.FlavaImageProcessor.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 <code>preprocess</code>.`,name:"do_rescale"},{anchor:"transformers.FlavaImageProcessor.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
<code>preprocess</code>.`,name:"rescale_factor"},{anchor:"transformers.FlavaImageProcessor.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 <code>preprocess</code>.`,name:"do_normalize"},{anchor:"transformers.FlavaImageProcessor.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;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.FlavaImageProcessor.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;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.FlavaImageProcessor.return_image_mask",description:`<strong>return_image_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return the image mask. Can be overridden by the <code>return_image_mask</code> parameter in <code>preprocess</code>.`,name:"return_image_mask"},{anchor:"transformers.FlavaImageProcessor.input_size_patches",description:`<strong>input_size_patches</strong> (<code>int</code>, <em>optional</em>, defaults to 14) &#x2014;
Number of patches in the image in height and width direction. 14x14 = 196 total patches. Can be overridden
by the <code>input_size_patches</code> parameter in <code>preprocess</code>.`,name:"input_size_patches"},{anchor:"transformers.FlavaImageProcessor.total_mask_patches",description:`<strong>total_mask_patches</strong> (<code>int</code>, <em>optional</em>, defaults to 75) &#x2014;
Total number of patches that should be masked. Can be overridden by the <code>total_mask_patches</code> parameter in
<code>preprocess</code>.`,name:"total_mask_patches"},{anchor:"transformers.FlavaImageProcessor.mask_group_min_patches",description:`<strong>mask_group_min_patches</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Minimum number of patches that should be masked. Can be overridden by the <code>mask_group_min_patches</code>
parameter in <code>preprocess</code>.`,name:"mask_group_min_patches"},{anchor:"transformers.FlavaImageProcessor.mask_group_max_patches",description:`<strong>mask_group_max_patches</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum number of patches that should be masked. Can be overridden by the <code>mask_group_max_patches</code>
parameter in <code>preprocess</code>.`,name:"mask_group_max_patches"},{anchor:"transformers.FlavaImageProcessor.mask_group_min_aspect_ratio",description:`<strong>mask_group_min_aspect_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.3) &#x2014;
Minimum aspect ratio of the mask window. Can be overridden by the <code>mask_group_min_aspect_ratio</code> parameter
in <code>preprocess</code>.`,name:"mask_group_min_aspect_ratio"},{anchor:"transformers.FlavaImageProcessor.mask_group_max_aspect_ratio",description:`<strong>mask_group_max_aspect_ratio</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Maximum aspect ratio of the mask window. Can be overridden by the <code>mask_group_max_aspect_ratio</code> parameter
in <code>preprocess</code>.`,name:"mask_group_max_aspect_ratio"},{anchor:"transformers.FlavaImageProcessor.codebook_do_resize",description:`<strong>codebook_do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the input for codebook to a certain. Can be overridden by the <code>codebook_do_resize</code>
parameter in <code>preprocess</code>. <code>codebook_size</code>.`,name:"codebook_do_resize"},{anchor:"transformers.FlavaImageProcessor.codebook_size",description:`<strong>codebook_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Resize the input for codebook to the given size. Can be overridden by the <code>codebook_size</code> parameter in
<code>preprocess</code>.`,name:"codebook_size"},{anchor:"transformers.FlavaImageProcessor.codebook_resample",description:`<strong>codebook_resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.LANCZOS</code>) &#x2014;
Resampling filter to use if resizing the codebook image. Can be overridden by the <code>codebook_resample</code>
parameter in <code>preprocess</code>.`,name:"codebook_resample"},{anchor:"transformers.FlavaImageProcessor.codebook_do_center_crop",description:`<strong>codebook_do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to crop the input for codebook at the center. If the input size is smaller than
<code>codebook_crop_size</code> along any edge, the image is padded with 0&#x2019;s and then center cropped. Can be
overridden by the <code>codebook_do_center_crop</code> parameter in <code>preprocess</code>.`,name:"codebook_do_center_crop"},{anchor:"transformers.FlavaImageProcessor.codebook_crop_size",description:`<strong>codebook_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 for codebook input when applying center-cropping. Can be overridden by the
<code>codebook_crop_size</code> parameter in <code>preprocess</code>.`,name:"codebook_crop_size"},{anchor:"transformers.FlavaImageProcessor.codebook_do_rescale",description:`<strong>codebook_do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the input for codebook by the specified scale <code>codebook_rescale_factor</code>. Can be
overridden by the <code>codebook_do_rescale</code> parameter in <code>preprocess</code>.`,name:"codebook_do_rescale"},{anchor:"transformers.FlavaImageProcessor.codebook_rescale_factor",description:`<strong>codebook_rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Defines the scale factor to use if rescaling the codebook image. Can be overridden by the
<code>codebook_rescale_factor</code> parameter in <code>preprocess</code>.`,name:"codebook_rescale_factor"},{anchor:"transformers.FlavaImageProcessor.codebook_do_map_pixels",description:`<strong>codebook_do_map_pixels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to map the pixel values of the codebook input to (1 - 2e)x + e. Can be overridden by the
<code>codebook_do_map_pixels</code> parameter in <code>preprocess</code>.`,name:"codebook_do_map_pixels"},{anchor:"transformers.FlavaImageProcessor.codebook_do_normalize",description:`<strong>codebook_do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input for codebook with <code>codebook_image_mean</code> and <code>codebook_image_std</code>. Can
be overridden by the <code>codebook_do_normalize</code> parameter in <code>preprocess</code>.`,name:"codebook_do_normalize"},{anchor:"transformers.FlavaImageProcessor.codebook_image_mean",description:`<strong>codebook_image_mean</strong> (<code>Optional[Union[float, Iterable[float]]]</code>, <em>optional</em>, defaults to <code>[0, 0, 0]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images for codebook. Can be overridden
by the <code>codebook_image_mean</code> parameter in <code>preprocess</code>.`,name:"codebook_image_mean"},{anchor:"transformers.FlavaImageProcessor.codebook_image_std",description:`<strong>codebook_image_std</strong> (<code>Optional[Union[float, Iterable[float]]]</code>, <em>optional</em>, defaults to <code>[0.5, 0.5, 0.5]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images for codebook. Can
be overridden by the <code>codebook_image_std</code> parameter in <code>preprocess</code>.`,name:"codebook_image_std"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/image_processing_flava.py#L134"}}),ct=new M({props:{name:"preprocess",anchor:"transformers.FlavaImageProcessor.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:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[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:"return_image_mask",val:": typing.Optional[bool] = None"},{name:"input_size_patches",val:": typing.Optional[int] = None"},{name:"total_mask_patches",val:": typing.Optional[int] = None"},{name:"mask_group_min_patches",val:": typing.Optional[int] = None"},{name:"mask_group_max_patches",val:": typing.Optional[int] = None"},{name:"mask_group_min_aspect_ratio",val:": typing.Optional[float] = None"},{name:"mask_group_max_aspect_ratio",val:": typing.Optional[float] = None"},{name:"return_codebook_pixels",val:": typing.Optional[bool] = None"},{name:"codebook_do_resize",val:": typing.Optional[bool] = None"},{name:"codebook_size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"codebook_resample",val:": typing.Optional[int] = None"},{name:"codebook_do_center_crop",val:": typing.Optional[bool] = None"},{name:"codebook_crop_size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"codebook_do_rescale",val:": typing.Optional[bool] = None"},{name:"codebook_rescale_factor",val:": typing.Optional[float] = None"},{name:"codebook_do_map_pixels",val:": typing.Optional[bool] = None"},{name:"codebook_do_normalize",val:": typing.Optional[bool] = None"},{name:"codebook_image_mean",val:": typing.Optional[typing.Iterable[float]] = None"},{name:"codebook_image_std",val:": typing.Optional[typing.Iterable[float]] = None"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlavaImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.FlavaImageProcessor.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.FlavaImageProcessor.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.`,name:"size"},{anchor:"transformers.FlavaImageProcessor.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.FlavaImageProcessor.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.FlavaImageProcessor.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 center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.FlavaImageProcessor.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.FlavaImageProcessor.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.FlavaImageProcessor.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.FlavaImageProcessor.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.FlavaImageProcessor.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.FlavaImageProcessor.preprocess.return_image_mask",description:`<strong>return_image_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.return_image_mask</code>) &#x2014;
Whether to return the image mask.`,name:"return_image_mask"},{anchor:"transformers.FlavaImageProcessor.preprocess.input_size_patches",description:`<strong>input_size_patches</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.input_size_patches</code>) &#x2014;
Size of the patches to extract from the image.`,name:"input_size_patches"},{anchor:"transformers.FlavaImageProcessor.preprocess.total_mask_patches",description:`<strong>total_mask_patches</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.total_mask_patches</code>) &#x2014;
Total number of patches to extract from the image.`,name:"total_mask_patches"},{anchor:"transformers.FlavaImageProcessor.preprocess.mask_group_min_patches",description:`<strong>mask_group_min_patches</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.mask_group_min_patches</code>) &#x2014;
Minimum number of patches to extract from the image.`,name:"mask_group_min_patches"},{anchor:"transformers.FlavaImageProcessor.preprocess.mask_group_max_patches",description:`<strong>mask_group_max_patches</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.mask_group_max_patches</code>) &#x2014;
Maximum number of patches to extract from the image.`,name:"mask_group_max_patches"},{anchor:"transformers.FlavaImageProcessor.preprocess.mask_group_min_aspect_ratio",description:`<strong>mask_group_min_aspect_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.mask_group_min_aspect_ratio</code>) &#x2014;
Minimum aspect ratio of the patches to extract from the image.`,name:"mask_group_min_aspect_ratio"},{anchor:"transformers.FlavaImageProcessor.preprocess.mask_group_max_aspect_ratio",description:`<strong>mask_group_max_aspect_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.mask_group_max_aspect_ratio</code>) &#x2014;
Maximum aspect ratio of the patches to extract from the image.`,name:"mask_group_max_aspect_ratio"},{anchor:"transformers.FlavaImageProcessor.preprocess.return_codebook_pixels",description:`<strong>return_codebook_pixels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.return_codebook_pixels</code>) &#x2014;
Whether to return the codebook pixels.`,name:"return_codebook_pixels"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_do_resize",description:`<strong>codebook_do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.codebook_do_resize</code>) &#x2014;
Whether to resize the codebook pixels.`,name:"codebook_do_resize"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_size",description:`<strong>codebook_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.codebook_size</code>) &#x2014;
Size of the codebook pixels.`,name:"codebook_size"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_resample",description:`<strong>codebook_resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.codebook_resample</code>) &#x2014;
Resampling filter to use if resizing the codebook pixels. This can be one of the enum
<code>PILImageResampling</code>, Only has an effect if <code>codebook_do_resize</code> is set to <code>True</code>.`,name:"codebook_resample"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_do_center_crop",description:`<strong>codebook_do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.codebook_do_center_crop</code>) &#x2014;
Whether to center crop the codebook pixels.`,name:"codebook_do_center_crop"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_crop_size",description:`<strong>codebook_crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.codebook_crop_size</code>) &#x2014;
Size of the center crop of the codebook pixels. Only has an effect if <code>codebook_do_center_crop</code> is set
to <code>True</code>.`,name:"codebook_crop_size"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_do_rescale",description:`<strong>codebook_do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.codebook_do_rescale</code>) &#x2014;
Whether to rescale the codebook pixels values between [0 - 1].`,name:"codebook_do_rescale"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_rescale_factor",description:`<strong>codebook_rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.codebook_rescale_factor</code>) &#x2014;
Rescale factor to rescale the codebook pixels by if <code>codebook_do_rescale</code> is set to <code>True</code>.`,name:"codebook_rescale_factor"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_do_map_pixels",description:`<strong>codebook_do_map_pixels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.codebook_do_map_pixels</code>) &#x2014;
Whether to map the codebook pixels values.`,name:"codebook_do_map_pixels"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_do_normalize",description:`<strong>codebook_do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.codebook_do_normalize</code>) &#x2014;
Whether to normalize the codebook pixels.`,name:"codebook_do_normalize"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_image_mean",description:`<strong>codebook_image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.codebook_image_mean</code>) &#x2014;
Codebook pixels mean to normalize the codebook pixels by if <code>codebook_do_normalize</code> is set to <code>True</code>.`,name:"codebook_image_mean"},{anchor:"transformers.FlavaImageProcessor.preprocess.codebook_image_std",description:`<strong>codebook_image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.codebook_image_std</code>) &#x2014;
Codebook pixels standard deviation to normalize the codebook pixels by if <code>codebook_do_normalize</code> is
set to <code>True</code>.`,name:"codebook_image_std"},{anchor:"transformers.FlavaImageProcessor.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.FlavaImageProcessor.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/main/src/transformers/models/flava/image_processing_flava.py#L481"}}),mt=new C({}),pt=new M({props:{name:"class transformers.FlavaForPreTraining",anchor:"transformers.FlavaForPreTraining",parameters:[{name:"config",val:": FlavaConfig"},{name:"image_codebook",val:": typing.Optional[torch.nn.modules.module.Module] = None"}],parametersDescription:[{anchor:"transformers.FlavaForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaConfig">FlavaConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlavaForPreTraining.image_codebook",description:`<strong>image_codebook</strong> (<code>nn.Module</code>) &#x2014; If passed, the image codebook will be set to this. Otherwise. it will
be initialized using the image_codebook_config defined in the config first as the first parameter.`,name:"image_codebook"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1726"}}),gt=new M({props:{name:"forward",anchor:"transformers.FlavaForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_ids_masked",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"codebook_pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"image_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"skip_unmasked_multimodal_encoder",val:": bool = None"},{name:"mlm_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"mim_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"itm_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": bool = True"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlavaForPreTraining.forward.input_ids_masked",description:`<strong>input_ids_masked</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_len)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. These ones are the masked version of the original task
to be used with MLM. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> along with
<code>DataCollatorForMaskedLanguageModeling</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids_masked"},{anchor:"transformers.FlavaForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_len)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlavaForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_len)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.FlavaForPreTraining.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">FlavaImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlavaForPreTraining.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, image_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.FlavaForPreTraining.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.FlavaForPreTraining.forward.image_attention_mask",description:`<strong>image_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices specifically for images. Mask values selected
in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"image_attention_mask"},{anchor:"transformers.FlavaForPreTraining.forward.skip_unmasked_multimodal_encoder",description:`<strong>skip_unmasked_multimodal_encoder</strong> (<em>bool</em>, <em>optional</em>) &#x2014;
Skip any calculations for multimodal encoder for unmasked inputs. FLAVA pretraining doesn&#x2019;t need unmasked
multimodal embeddings or outputs as of now.`,name:"skip_unmasked_multimodal_encoder"},{anchor:"transformers.FlavaForPreTraining.forward.mlm_labels",description:`<strong>mlm_labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_len)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language and multimodal masked modeling loss (next word prediction).
Indices should be in <code>[-100, 0, ..., text_config.vocab_size - 1]</code> (see <code>input_ids</code> docstring). Tokens with
indices set to <code>-100</code> are ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., text_config.vocab_size - 1]</code>.`,name:"mlm_labels"},{anchor:"transformers.FlavaForPreTraining.forward.mim_labels",description:`<strong>mim_labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, image_num_patches)</code>, <em>optional</em>) &#x2014;
Labels for computing the image and multimodal masked modeling loss. Indices should be in <code>[-100, 0, ..., image_config.vocab_size - 1]</code>. Tokens with indices set to <code>-100</code> are ignored (masked), the loss is only
computed for the tokens with labels in <code>[0, ..., image_config.vocab_size - 1]</code>. If not passed, they are
generated automatically using the image codebook assigned to the model. By default, it uses
<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageCodebook">FlavaImageCodebook</a>. See <a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageCodebook">FlavaImageCodebook</a> to understand how to generate mim_labels.`,name:"mim_labels"},{anchor:"transformers.FlavaForPreTraining.forward.itm_labels",description:`<strong>itm_labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Labels for computing the image-text matching loss. 0 means the pairs don&#x2019;t match and 1 means they match.
The pairs with 0 will be skipped for calculation of MMM and global contrastive losses as well.`,name:"itm_labels"},{anchor:"transformers.FlavaForPreTraining.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>, default to None) &#x2014;
Whether to return calculated loss or not.`,name:"return_loss"},{anchor:"transformers.FlavaForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_seq_len)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaForPreTraining.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.FlavaForPreTraining.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.FlavaForPreTraining.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.FlavaForPreTraining.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Examples &#x2014;`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1770",returnDescription:`
<p>A <code>transformers.models.flava.modeling_flava.FlavaForPreTrainingOutput</code> 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.flava.configuration_flava.FlavaConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, returned when <code>return_loss</code> is True) \u2014 Total loss calculated for this model.</p>
</li>
<li>
<p><strong>loss_info</strong> (<code>FlavaLosses</code>) \u2014 Detailed info for FLAVA Pretraining losses. Check <code>FlavaLosses</code> class description for the information on
the keys.</p>
</li>
<li>
<p><strong>image_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The image embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>.</p>
</li>
<li>
<p><strong>image_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>.</p>
</li>
<li>
<p><strong>text_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids</code> are present) \u2014 The text embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>text_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>input_ids</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>multimodal_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids</code> and <code>pixel_values</code> are present and <code>skip_unmasked_multimodal_encoder</code> is <code>None</code> or <code>False</code>) \u2014 The multimodal embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>multimodal_output</strong> (<code>BaseModelOutputWithPooling</code>, returned when <code>input_ids</code> and <code>pixel_values</code> are present and <code>skip_unmasked_multimodal_encoder</code> is <code>None</code> or <code>False</code>) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalModel"
>FlavaMultimodalModel</a>.</p>
</li>
<li>
<p><strong>image_masked_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The image embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>. Uses <code>bool_masked_pos</code>
to create masked images.</p>
</li>
<li>
<p><strong>image_masked_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>. Uses <code>bool_masked_pos</code> to create masked images.</p>
</li>
<li>
<p><strong>text_masked_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids_masked</code> are present) \u2014 The text embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>text_masked_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>input_ids_masked</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>multimodal_masked_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids</code> and <code>pixel_values</code> are present) \u2014 The multimodal embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</p>
</li>
<li>
<p><strong>multimodal_masked_output</strong> (<code>BaseModelOutputWithPooling</code>, returned when <code>input_ids_masked</code> and <code>pixel_values</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalModel"
>FlavaMultimodalModel</a>.</p>
</li>
<li>
<p><strong>mim_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_image_patches, image_vocab_size)</code> or of shape <code>(total_masked_patches, image_vocab_size)</code> , <em>optional</em>, returned when <code>pixel_values</code> are present and <code>input_ids_masked</code> are not) \u2014 The logits for MIM unimodal loss. Uses <code>book_masked_pos</code> to get masked patches. The flattened output is
returned when <code>bool_masked_pos</code> has some of the patches masked.</p>
</li>
<li>
<p><strong>mlm_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_seq_length, text_vocab_size)</code> or of shape <code>(total_masked_seq_length, text_vocab_size)</code>, <em>optional</em>, returned when <code>input_ids_masked</code> are present and <code>pixel_values</code> are not) \u2014 The logits for MLM unimodal loss. The flattened output is returned when <code>input_ids_masked</code> has some of
the tokens masked.</p>
</li>
<li>
<p><strong>itm_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>, <em>optional</em>, returned when <code>input_ids_masked</code> and <code>pixel_values</code> are present) \u2014 The logits for ITM loss. Note that ITM loss is calculated on masked pairs in FLAVA.</p>
</li>
<li>
<p><strong>mmm_image_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_image_patches, image_vocab_size)</code> or of shape<code>(total_masked_patches, image_vocab_size)</code>, <em>optional</em>, returned when <code>pixel_values</code> and <code>input_ids_masked</code> are present) \u2014 The logits for MMM image multimodal loss. Uses <code>book_masked_pos</code> to get masked patches. The flattened
output is returned when <code>bool_masked_pos</code> has some of the patches masked.</p>
</li>
<li>
<p><strong>mmm_text_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_seq_length, text_vocab_size)</code> or of shape <code>(</code>(total_masked_seq_length, text_vocab_size)<code>), *optional*, returned when </code>pixel_values<code>and</code>input_ids_masked<code>are present) -- The logits for MMM text multimodal loss. The flattened output is returned when</code>input_ids_masked\` has
some of the tokens masked.</p>
</li>
<li>
<p><strong>contrastive_logits_per_image</strong> (<code>torch.FloatTensor</code> of shape <code>(image_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>image_embeddings</code> and <code>text_embeddings</code> but passed through FLAVA\u2019s
<code>image_projection</code> and <code>text_projection</code> layers respectively. This represents the image-text similarity
scores. This is calculated on unmasked images and texts.</p>
</li>
<li>
<p><strong>contrastive_logits_per_text</strong> (<code>torch.FloatTensor</code> of shape <code>(text_batch_size, image_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeddings</code> and <code>image_embeddings</code> but passed through FLAVA\u2019s
<code>text_projection</code> and <code>image_projection</code> layers respectively. This is calculated on unmasked images and
texts.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.flava.modeling_flava.FlavaForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qe=new Yt({props:{$$slots:{default:[Cp]},$$scope:{ctx:x}}}),ut=new C({}),_t=new M({props:{name:"class transformers.FlavaModel",anchor:"transformers.FlavaModel",parameters:[{name:"config",val:": FlavaConfig"}],parametersDescription:[{anchor:"transformers.FlavaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaConfig">FlavaConfig</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/main/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/main/src/transformers/models/flava/modeling_flava.py#L1194"}}),kt=new M({props:{name:"forward",anchor:"transformers.FlavaModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"image_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"skip_multimodal_encoder",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": bool = True"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlavaModel.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">FlavaImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlavaModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, image_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.FlavaModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.FlavaModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, image_num_patches + text_seq_len)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlavaModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, image_num_patches + text_seq_len)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.FlavaModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches + text_seq_len)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaModel.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.FlavaModel.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.FlavaModel.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.FlavaModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FlavaModel.forward.skip_multimodal_encoder",description:`<strong>skip_multimodal_encoder</strong> (<em>bool</em>, <em>optional</em>) &#x2014;
Skip any calculations for multimodal encoder. Useful if multimodal encoding is not going to be used.`,name:"skip_multimodal_encoder"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1338",returnDescription:`
<p>A <code>transformers.models.flava.modeling_flava.FlavaModelOutput</code> 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.flava.configuration_flava.FlavaConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>image_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The image embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>.</li>
<li><strong>image_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>pixel_values</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"
>FlavaImageModel</a>.</li>
<li><strong>text_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids</code> are present) \u2014 The text embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</li>
<li><strong>text_output</strong> (<code>BaseModelOutputWithPooling</code>, <em>optional</em>, returned when <code>input_ids</code> are present) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</li>
<li><strong>multimodal_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>, returned when <code>input_ids</code> and <code>pixel_values</code> are present and <code>skip_multimodal_encoder</code> is <code>None</code> or <code>False</code>) \u2014 The multimodal embeddings which are basically the pooled output of <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"
>FlavaTextModel</a>.</li>
<li><strong>multimodal_output</strong> (<code>BaseModelOutputWithPooling</code>, returned when <code>input_ids</code> and <code>pixel_values</code> are present and <code>skip_multimodal_encoder</code> is <code>None</code> or <code>False</code>) \u2014 The output of the <a
  href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalModel"
>FlavaMultimodalModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.flava.modeling_flava.FlavaModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new Yt({props:{$$slots:{default:[Ap]},$$scope:{ctx:x}}}),to=new Fo({props:{anchor:"transformers.FlavaModel.forward.example",$$slots:{default:[Ep]},$$scope:{ctx:x}}}),Ft=new M({props:{name:"get_text_features",anchor:"transformers.FlavaModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",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.FlavaModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlavaModel.get_text_features.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.FlavaModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_seq_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaModel.get_text_features.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.FlavaModel.get_text_features.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.FlavaModel.get_text_features.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.FlavaModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1240"}}),ao=new Yt({props:{$$slots:{default:[Np]},$$scope:{ctx:x}}}),yt=new M({props:{name:"get_image_features",anchor:"transformers.FlavaModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.FlavaModel.get_image_features.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">FlavaImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlavaModel.get_image_features.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, image_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.FlavaModel.get_image_features.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.FlavaModel.get_image_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaModel.get_image_features.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.FlavaModel.get_image_features.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.FlavaModel.get_image_features.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.FlavaModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1286"}}),no=new Yt({props:{$$slots:{default:[qp]},$$scope:{ctx:x}}}),$t=new C({}),Tt=new M({props:{name:"class transformers.FlavaImageCodebook",anchor:"transformers.FlavaImageCodebook",parameters:[{name:"config",val:": FlavaImageCodebookConfig"},{name:"**kwargs",val:": typing.Any"}],parametersDescription:[{anchor:"transformers.FlavaImageCodebook.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageCodebookConfig">FlavaImageCodebookConfig</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/main/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/main/src/transformers/models/flava/modeling_flava.py#L1512"}}),zt=new M({props:{name:"forward",anchor:"transformers.FlavaImageCodebook.forward",parameters:[{name:"pixel_values",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1596"}}),Pt=new M({props:{name:"get_codebook_indices",anchor:"transformers.FlavaImageCodebook.get_codebook_indices",parameters:[{name:"pixel_values",val:": Tensor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1562"}}),It=new M({props:{name:"get_codebook_probs",anchor:"transformers.FlavaImageCodebook.get_codebook_probs",parameters:[{name:"pixel_values",val:": Tensor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1592"}}),Ct=new C({}),At=new M({props:{name:"class transformers.FlavaTextModel",anchor:"transformers.FlavaTextModel",parameters:[{name:"config",val:": FlavaTextConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.FlavaTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextConfig">FlavaTextConfig</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/main/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/main/src/transformers/models/flava/modeling_flava.py#L991"}}),qt=new M({props:{name:"forward",anchor:"transformers.FlavaTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = 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.FlavaTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlavaTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, text_seq_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.FlavaTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_seq_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaTextModel.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.FlavaTextModel.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.FlavaTextModel.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.FlavaTextModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1022",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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/main/en/model_doc/flava#transformers.FlavaTextConfig"
>FlavaTextConfig</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 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),io=new Yt({props:{$$slots:{default:[jp]},$$scope:{ctx:x}}}),lo=new Fo({props:{anchor:"transformers.FlavaTextModel.forward.example",$$slots:{default:[Op]},$$scope:{ctx:x}}}),jt=new C({}),Ot=new M({props:{name:"class transformers.FlavaImageModel",anchor:"transformers.FlavaImageModel",parameters:[{name:"config",val:": FlavaImageConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.FlavaImageModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageConfig">FlavaImageConfig</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/main/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/main/src/transformers/models/flava/modeling_flava.py#L892"}}),Wt=new M({props:{name:"forward",anchor:"transformers.FlavaImageModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.FlavaImageModel.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">FlavaImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlavaImageModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, image_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.FlavaImageModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.FlavaImageModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaImageModel.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.FlavaImageModel.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.FlavaImageModel.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.FlavaImageModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L925",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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/main/en/model_doc/flava#transformers.FlavaImageConfig"
>FlavaImageConfig</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 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new Yt({props:{$$slots:{default:[Lp]},$$scope:{ctx:x}}}),po=new Fo({props:{anchor:"transformers.FlavaImageModel.forward.example",$$slots:{default:[Dp]},$$scope:{ctx:x}}}),St=new C({}),Vt=new M({props:{name:"class transformers.FlavaMultimodalModel",anchor:"transformers.FlavaMultimodalModel",parameters:[{name:"config",val:": FlavaMultimodalConfig"},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.FlavaMultimodalModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalConfig">FlavaMultimodalConfig</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/main/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/main/src/transformers/models/flava/modeling_flava.py#L1096"}}),Ut=new M({props:{name:"forward",anchor:"transformers.FlavaMultimodalModel.forward",parameters:[{name:"hidden_states",val:": Tensor"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.FlavaMultimodalModel.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches + text_seq_len, hidden_size)</code>) &#x2014;
The concatenated hidden states of unimodal encoders.`,name:"hidden_states"},{anchor:"transformers.FlavaMultimodalModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_num_patches + text_seq_len)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlavaMultimodalModel.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.FlavaMultimodalModel.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.FlavaMultimodalModel.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.FlavaMultimodalModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/flava/modeling_flava.py#L1124",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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/main/en/model_doc/flava#transformers.FlavaMultimodalConfig"
>FlavaMultimodalConfig</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 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new Yt({props:{$$slots:{default:[Wp]},$$scope:{ctx:x}}}),go=new Fo({props:{anchor:"transformers.FlavaMultimodalModel.forward.example",$$slots:{default:[Sp]},$$scope:{ctx:x}}}),{c(){c=a("meta"),w=m(),_=a("h1"),g=a("a"),v=a("span"),b(l.$$.fragment),f=m(),z=a("span"),hs=s("FLAVA"),Zn=m(),se=a("h2"),Ee=a("a"),Ka=a("span"),b(To.$$.fragment),gs=m(),Ya=a("span"),us=s("Overview"),Xn=m(),Ne=a("p"),_s=s("The FLAVA model was proposed in "),wo=a("a"),vs=s("FLAVA: A Foundational Language And Vision Alignment Model"),bs=s(" by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela and is accepted at CVPR 2022."),Qn=m(),Zt=a("p"),ks=s(`The paper aims at creating a single unified foundation model which can work across vision, language
as well as vision-and-language multimodal tasks.`),er=m(),Xt=a("p"),Fs=s("The abstract from the paper is the following:"),or=m(),Qt=a("p"),Za=a("em"),ys=s(`State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety
of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal
(with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising
direction would be to use a single holistic universal model, as a \u201Cfoundation\u201D, that targets all modalities
at once \u2014 a true vision and language foundation model should be good at vision tasks, language tasks, and
cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate
impressive performance on a wide range of 35 tasks spanning these target modalities.`),tr=m(),Y=a("p"),$s=s("This model was contributed by "),xo=a("a"),Ts=s("aps"),ws=s(". The original code can be found "),Mo=a("a"),xs=s("here"),Ms=s("."),ar=m(),ie=a("h2"),qe=a("a"),Xa=a("span"),b(zo.$$.fragment),zs=m(),Qa=a("span"),Ps=s("FlavaConfig"),nr=m(),P=a("div"),b(Po.$$.fragment),Is=m(),Z=a("p"),ea=a("a"),Cs=s("FlavaConfig"),As=s(" is the configuration class to store the configuration of a "),oa=a("a"),Es=s("FlavaModel"),Ns=s(`. It is used to
instantiate FLAVA model according to the specified arguments, defining the text model, image model, image codebook
and multimodal model configs. Instantiating a configuration with the defaults will yield a similar configuration to
that of the FLAVA `),Io=a("a"),qs=s("facebook/flava-full"),js=s(" architecture."),Os=m(),le=a("p"),Ls=s("Configuration objects inherit from "),ta=a("a"),Ds=s("PretrainedConfig"),Ws=s(` and can be used to control the model outputs. Read the
documentation from `),aa=a("a"),Ss=s("PretrainedConfig"),Vs=s(" for more information."),Bs=m(),b(je.$$.fragment),Rs=m(),Oe=a("div"),b(Co.$$.fragment),Us=m(),Ao=a("p"),Hs=s("Instantiate a "),na=a("a"),Gs=s("FlavaConfig"),Js=s(` (or a derived class) from flava text model configuration, flava image model
configuration, flava multimodal model and flava codebook model configuration.`),Ks=m(),Le=a("div"),b(Eo.$$.fragment),Ys=m(),No=a("p"),Zs=s("Serializes this instance to a Python dictionary. Override the default "),ra=a("a"),Xs=s("to_dict()"),Qs=s("."),rr=m(),de=a("h2"),De=a("a"),en=a("span"),b(qo.$$.fragment),ei=m(),on=a("span"),oi=s("FlavaTextConfig"),sr=m(),A=a("div"),b(jo.$$.fragment),ti=m(),Oo=a("p"),ai=s("This is the configuration class to store the configuration of a "),sa=a("a"),ni=s("FlavaTextModel"),ri=s(`. It is used to instantiate an
FLAVA model according to the specified arguments, defining the model architecture.`),si=m(),Lo=a("p"),ii=s(`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Do=a("a"),li=s("facebook/flava-full"),di=s(" architecture."),ci=m(),ce=a("p"),mi=s("Configuration objects inherit from "),ia=a("a"),pi=s("PretrainedConfig"),fi=s(` and can be used to control the model outputs. Read the
documentation from `),la=a("a"),hi=s("PretrainedConfig"),gi=s(" for more information."),ui=m(),b(We.$$.fragment),ir=m(),me=a("h2"),Se=a("a"),tn=a("span"),b(Wo.$$.fragment),_i=m(),an=a("span"),vi=s("FlavaImageConfig"),lr=m(),E=a("div"),b(So.$$.fragment),bi=m(),Vo=a("p"),ki=s("This is the configuration class to store the configuration of a "),da=a("a"),Fi=s("FlavaImageModel"),yi=s(`. It is used to instantiate an
FLAVA model according to the specified arguments, defining the model architecture.`),$i=m(),Bo=a("p"),Ti=s(`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Ro=a("a"),wi=s("facebook/flava-full"),xi=s(" architecture."),Mi=m(),pe=a("p"),zi=s("Configuration objects inherit from "),ca=a("a"),Pi=s("PretrainedConfig"),Ii=s(` and can be used to control the model outputs. Read the
documentation from `),ma=a("a"),Ci=s("PretrainedConfig"),Ai=s(" for more information."),Ei=m(),b(Ve.$$.fragment),dr=m(),fe=a("h2"),Be=a("a"),nn=a("span"),b(Uo.$$.fragment),Ni=m(),rn=a("span"),qi=s("FlavaMultimodalConfig"),cr=m(),N=a("div"),b(Ho.$$.fragment),ji=m(),Go=a("p"),Oi=s("This is the configuration class to store the configuration of a "),pa=a("a"),Li=s("FlavaMultimodalModel"),Di=s(`. It is used to instantiate
an FLAVA model according to the specified arguments, defining the model architecture.`),Wi=m(),Jo=a("p"),Si=s(`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Ko=a("a"),Vi=s("facebook/flava-full"),Bi=s(" architecture."),Ri=m(),he=a("p"),Ui=s("Configuration objects inherit from "),fa=a("a"),Hi=s("PretrainedConfig"),Gi=s(` and can be used to control the model outputs. Read the
documentation from `),ha=a("a"),Ji=s("PretrainedConfig"),Ki=s(" for more information."),Yi=m(),b(Re.$$.fragment),mr=m(),ge=a("h2"),Ue=a("a"),sn=a("span"),b(Yo.$$.fragment),Zi=m(),ln=a("span"),Xi=s("FlavaImageCodebookConfig"),pr=m(),Zo=a("div"),b(Xo.$$.fragment),fr=m(),ue=a("h2"),He=a("a"),dn=a("span"),b(Qo.$$.fragment),Qi=m(),cn=a("span"),el=s("FlavaProcessor"),hr=m(),q=a("div"),b(et.$$.fragment),ol=m(),mn=a("p"),tl=s("Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor."),al=m(),O=a("p"),ga=a("a"),nl=s("FlavaProcessor"),rl=s(" offers all the functionalities of "),ua=a("a"),sl=s("FlavaImageProcessor"),il=s(" and "),_a=a("a"),ll=s("BertTokenizerFast"),dl=s(`. See the
`),pn=a("code"),cl=s("__call__()"),ml=s(" and "),va=a("a"),pl=s("decode()"),fl=s(" for more information."),hl=m(),Ge=a("div"),b(ot.$$.fragment),gl=m(),tt=a("p"),ul=s("This method forwards all its arguments to BertTokenizerFast\u2019s "),ba=a("a"),_l=s("batch_decode()"),vl=s(`. Please
refer to the docstring of this method for more information.`),bl=m(),Je=a("div"),b(at.$$.fragment),kl=m(),nt=a("p"),Fl=s("This method forwards all its arguments to BertTokenizerFast\u2019s "),ka=a("a"),yl=s("decode()"),$l=s(`. Please refer to
the docstring of this method for more information.`),gr=m(),_e=a("h2"),Ke=a("a"),fn=a("span"),b(rt.$$.fragment),Tl=m(),hn=a("span"),wl=s("FlavaFeatureExtractor"),ur=m(),st=a("div"),b(it.$$.fragment),_r=m(),ve=a("h2"),Ye=a("a"),gn=a("span"),b(lt.$$.fragment),xl=m(),un=a("span"),Ml=s("FlavaImageProcessor"),vr=m(),U=a("div"),b(dt.$$.fragment),zl=m(),_n=a("p"),Pl=s("Constructs a Flava image processor."),Il=m(),Ze=a("div"),b(ct.$$.fragment),Cl=m(),vn=a("p"),Al=s("Preprocess an image or batch of images."),br=m(),be=a("h2"),Xe=a("a"),bn=a("span"),b(mt.$$.fragment),El=m(),kn=a("span"),Nl=s("FlavaForPreTraining"),kr=m(),L=a("div"),b(pt.$$.fragment),ql=m(),Fn=a("p"),jl=s("The FLAVA model for pretraining which outputs losses, embeddings, logits and transformer outputs."),Ol=m(),ft=a("p"),Ll=s("This model is a PyTorch "),ht=a("a"),Dl=s("torch.nn.Module"),Wl=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Sl=m(),X=a("div"),b(gt.$$.fragment),Vl=m(),ke=a("p"),Bl=s("The "),Fa=a("a"),Rl=s("FlavaForPreTraining"),Ul=s(" forward method, overrides the "),yn=a("code"),Hl=s("__call__"),Gl=s(" special method."),Jl=m(),b(Qe.$$.fragment),Fr=m(),Fe=a("h2"),eo=a("a"),$n=a("span"),b(ut.$$.fragment),Kl=m(),Tn=a("span"),Yl=s("FlavaModel"),yr=m(),j=a("div"),b(_t.$$.fragment),Zl=m(),vt=a("p"),Xl=s(`The bare FLAVA Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),bt=a("a"),Ql=s("torch.nn.Module"),ed=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),od=m(),D=a("div"),b(kt.$$.fragment),td=m(),ye=a("p"),ad=s("The "),ya=a("a"),nd=s("FlavaModel"),rd=s(" forward method, overrides the "),wn=a("code"),sd=s("__call__"),id=s(" special method."),ld=m(),b(oo.$$.fragment),dd=m(),b(to.$$.fragment),cd=m(),Q=a("div"),b(Ft.$$.fragment),md=m(),$e=a("p"),pd=s("The "),$a=a("a"),fd=s("FlavaModel"),hd=s(" forward method, overrides the "),xn=a("code"),gd=s("__call__"),ud=s(" special method."),_d=m(),b(ao.$$.fragment),vd=m(),ee=a("div"),b(yt.$$.fragment),bd=m(),Te=a("p"),kd=s("The "),Ta=a("a"),Fd=s("FlavaModel"),yd=s(" forward method, overrides the "),Mn=a("code"),$d=s("__call__"),Td=s(" special method."),wd=m(),b(no.$$.fragment),$r=m(),we=a("h2"),ro=a("a"),zn=a("span"),b($t.$$.fragment),xd=m(),Pn=a("span"),Md=s("FlavaImageCodebook"),Tr=m(),I=a("div"),b(Tt.$$.fragment),zd=m(),wt=a("p"),Pd=s(`The FLAVA\u2019s image codebook model inspired from DALL-E\u2019s original encoder. Outputs raw hidden states and can be used
to generate image tokens for an image based on DALL-E\u2019s vocab. Used to generate labels for MIM. Use
`),In=a("code"),Id=s("get_codebook_indices"),Cd=s(" to get image tokens for an image."),Ad=m(),xt=a("p"),Ed=s("This model is a PyTorch "),Mt=a("a"),Nd=s("torch.nn.Module"),qd=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),jd=m(),wa=a("div"),b(zt.$$.fragment),Od=m(),xa=a("div"),b(Pt.$$.fragment),Ld=m(),Ma=a("div"),b(It.$$.fragment),wr=m(),xe=a("h2"),so=a("a"),Cn=a("span"),b(Ct.$$.fragment),Dd=m(),An=a("span"),Wd=s("FlavaTextModel"),xr=m(),H=a("div"),b(At.$$.fragment),Sd=m(),Et=a("p"),Vd=s(`The bare FLAVA Text Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Nt=a("a"),Bd=s("torch.nn.Module"),Rd=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ud=m(),W=a("div"),b(qt.$$.fragment),Hd=m(),Me=a("p"),Gd=s("The "),za=a("a"),Jd=s("FlavaTextModel"),Kd=s(" forward method, overrides the "),En=a("code"),Yd=s("__call__"),Zd=s(" special method."),Xd=m(),b(io.$$.fragment),Qd=m(),b(lo.$$.fragment),Mr=m(),ze=a("h2"),co=a("a"),Nn=a("span"),b(jt.$$.fragment),ec=m(),qn=a("span"),oc=s("FlavaImageModel"),zr=m(),G=a("div"),b(Ot.$$.fragment),tc=m(),Lt=a("p"),ac=s(`The bare FLAVA Image Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Dt=a("a"),nc=s("torch.nn.Module"),rc=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sc=m(),S=a("div"),b(Wt.$$.fragment),ic=m(),Pe=a("p"),lc=s("The "),Pa=a("a"),dc=s("FlavaImageModel"),cc=s(" forward method, overrides the "),jn=a("code"),mc=s("__call__"),pc=s(" special method."),fc=m(),b(mo.$$.fragment),hc=m(),b(po.$$.fragment),Pr=m(),Ie=a("h2"),fo=a("a"),On=a("span"),b(St.$$.fragment),gc=m(),Ln=a("span"),uc=s("FlavaMultimodalModel"),Ir=m(),J=a("div"),b(Vt.$$.fragment),_c=m(),Bt=a("p"),vc=s(`The bare FLAVA Multimodal Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rt=a("a"),bc=s("torch.nn.Module"),kc=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fc=m(),V=a("div"),b(Ut.$$.fragment),yc=m(),Ce=a("p"),$c=s("The "),Ia=a("a"),Tc=s("FlavaMultimodalModel"),wc=s(" forward method, overrides the "),Dn=a("code"),xc=s("__call__"),Mc=s(" special method."),zc=m(),b(ho.$$.fragment),Pc=m(),b(go.$$.fragment),this.h()},l(o){const h=wp('[data-svelte="svelte-1phssyn"]',document.head);c=n(h,"META",{name:!0,content:!0}),h.forEach(t),w=p(o),_=n(o,"H1",{class:!0});var Ht=r(_);g=n(Ht,"A",{id:!0,class:!0,href:!0});var Wn=r(g);v=n(Wn,"SPAN",{});var Sn=r(v);k(l.$$.fragment,Sn),Sn.forEach(t),Wn.forEach(t),f=p(Ht),z=n(Ht,"SPAN",{});var Vn=r(z);hs=i(Vn,"FLAVA"),Vn.forEach(t),Ht.forEach(t),Zn=p(o),se=n(o,"H2",{class:!0});var Gt=r(se);Ee=n(Gt,"A",{id:!0,class:!0,href:!0});var Bn=r(Ee);Ka=n(Bn,"SPAN",{});var Rn=r(Ka);k(To.$$.fragment,Rn),Rn.forEach(t),Bn.forEach(t),gs=p(Gt),Ya=n(Gt,"SPAN",{});var Un=r(Ya);us=i(Un,"Overview"),Un.forEach(t),Gt.forEach(t),Xn=p(o),Ne=n(o,"P",{});var Jt=r(Ne);_s=i(Jt,"The FLAVA model was proposed in "),wo=n(Jt,"A",{href:!0,rel:!0});var Hn=r(wo);vs=i(Hn,"FLAVA: A Foundational Language And Vision Alignment Model"),Hn.forEach(t),bs=i(Jt," by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela and is accepted at CVPR 2022."),Jt.forEach(t),Qn=p(o),Zt=n(o,"P",{});var Gn=r(Zt);ks=i(Gn,`The paper aims at creating a single unified foundation model which can work across vision, language
as well as vision-and-language multimodal tasks.`),Gn.forEach(t),er=p(o),Xt=n(o,"P",{});var Jn=r(Xt);Fs=i(Jn,"The abstract from the paper is the following:"),Jn.forEach(t),or=p(o),Qt=n(o,"P",{});var Kn=r(Qt);Za=n(Kn,"EM",{});var Yn=r(Za);ys=i(Yn,`State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety
of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal
(with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising
direction would be to use a single holistic universal model, as a \u201Cfoundation\u201D, that targets all modalities
at once \u2014 a true vision and language foundation model should be good at vision tasks, language tasks, and
cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate
impressive performance on a wide range of 35 tasks spanning these target modalities.`),Yn.forEach(t),Kn.forEach(t),tr=p(o),Y=n(o,"P",{});var Ae=r(Y);$s=i(Ae,"This model was contributed by "),xo=n(Ae,"A",{href:!0,rel:!0});var Ic=r(xo);Ts=i(Ic,"aps"),Ic.forEach(t),ws=i(Ae,". The original code can be found "),Mo=n(Ae,"A",{href:!0,rel:!0});var Cc=r(Mo);xs=i(Cc,"here"),Cc.forEach(t),Ms=i(Ae,"."),Ae.forEach(t),ar=p(o),ie=n(o,"H2",{class:!0});var Ar=r(ie);qe=n(Ar,"A",{id:!0,class:!0,href:!0});var Ac=r(qe);Xa=n(Ac,"SPAN",{});var Ec=r(Xa);k(zo.$$.fragment,Ec),Ec.forEach(t),Ac.forEach(t),zs=p(Ar),Qa=n(Ar,"SPAN",{});var Nc=r(Qa);Ps=i(Nc,"FlavaConfig"),Nc.forEach(t),Ar.forEach(t),nr=p(o),P=n(o,"DIV",{class:!0});var B=r(P);k(Po.$$.fragment,B),Is=p(B),Z=n(B,"P",{});var Kt=r(Z);ea=n(Kt,"A",{href:!0});var qc=r(ea);Cs=i(qc,"FlavaConfig"),qc.forEach(t),As=i(Kt," is the configuration class to store the configuration of a "),oa=n(Kt,"A",{href:!0});var jc=r(oa);Es=i(jc,"FlavaModel"),jc.forEach(t),Ns=i(Kt,`. It is used to
instantiate FLAVA model according to the specified arguments, defining the text model, image model, image codebook
and multimodal model configs. Instantiating a configuration with the defaults will yield a similar configuration to
that of the FLAVA `),Io=n(Kt,"A",{href:!0,rel:!0});var Oc=r(Io);qs=i(Oc,"facebook/flava-full"),Oc.forEach(t),js=i(Kt," architecture."),Kt.forEach(t),Os=p(B),le=n(B,"P",{});var Ca=r(le);Ls=i(Ca,"Configuration objects inherit from "),ta=n(Ca,"A",{href:!0});var Lc=r(ta);Ds=i(Lc,"PretrainedConfig"),Lc.forEach(t),Ws=i(Ca,` and can be used to control the model outputs. Read the
documentation from `),aa=n(Ca,"A",{href:!0});var Dc=r(aa);Ss=i(Dc,"PretrainedConfig"),Dc.forEach(t),Vs=i(Ca," for more information."),Ca.forEach(t),Bs=p(B),k(je.$$.fragment,B),Rs=p(B),Oe=n(B,"DIV",{class:!0});var Er=r(Oe);k(Co.$$.fragment,Er),Us=p(Er),Ao=n(Er,"P",{});var Nr=r(Ao);Hs=i(Nr,"Instantiate a "),na=n(Nr,"A",{href:!0});var Wc=r(na);Gs=i(Wc,"FlavaConfig"),Wc.forEach(t),Js=i(Nr,` (or a derived class) from flava text model configuration, flava image model
configuration, flava multimodal model and flava codebook model configuration.`),Nr.forEach(t),Er.forEach(t),Ks=p(B),Le=n(B,"DIV",{class:!0});var qr=r(Le);k(Eo.$$.fragment,qr),Ys=p(qr),No=n(qr,"P",{});var jr=r(No);Zs=i(jr,"Serializes this instance to a Python dictionary. Override the default "),ra=n(jr,"A",{href:!0});var Sc=r(ra);Xs=i(Sc,"to_dict()"),Sc.forEach(t),Qs=i(jr,"."),jr.forEach(t),qr.forEach(t),B.forEach(t),rr=p(o),de=n(o,"H2",{class:!0});var Or=r(de);De=n(Or,"A",{id:!0,class:!0,href:!0});var Vc=r(De);en=n(Vc,"SPAN",{});var Bc=r(en);k(qo.$$.fragment,Bc),Bc.forEach(t),Vc.forEach(t),ei=p(Or),on=n(Or,"SPAN",{});var Rc=r(on);oi=i(Rc,"FlavaTextConfig"),Rc.forEach(t),Or.forEach(t),sr=p(o),A=n(o,"DIV",{class:!0});var oe=r(A);k(jo.$$.fragment,oe),ti=p(oe),Oo=n(oe,"P",{});var Lr=r(Oo);ai=i(Lr,"This is the configuration class to store the configuration of a "),sa=n(Lr,"A",{href:!0});var Uc=r(sa);ni=i(Uc,"FlavaTextModel"),Uc.forEach(t),ri=i(Lr,`. It is used to instantiate an
FLAVA model according to the specified arguments, defining the model architecture.`),Lr.forEach(t),si=p(oe),Lo=n(oe,"P",{});var Dr=r(Lo);ii=i(Dr,`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Do=n(Dr,"A",{href:!0,rel:!0});var Hc=r(Do);li=i(Hc,"facebook/flava-full"),Hc.forEach(t),di=i(Dr," architecture."),Dr.forEach(t),ci=p(oe),ce=n(oe,"P",{});var Aa=r(ce);mi=i(Aa,"Configuration objects inherit from "),ia=n(Aa,"A",{href:!0});var Gc=r(ia);pi=i(Gc,"PretrainedConfig"),Gc.forEach(t),fi=i(Aa,` and can be used to control the model outputs. Read the
documentation from `),la=n(Aa,"A",{href:!0});var Jc=r(la);hi=i(Jc,"PretrainedConfig"),Jc.forEach(t),gi=i(Aa," for more information."),Aa.forEach(t),ui=p(oe),k(We.$$.fragment,oe),oe.forEach(t),ir=p(o),me=n(o,"H2",{class:!0});var Wr=r(me);Se=n(Wr,"A",{id:!0,class:!0,href:!0});var Kc=r(Se);tn=n(Kc,"SPAN",{});var Yc=r(tn);k(Wo.$$.fragment,Yc),Yc.forEach(t),Kc.forEach(t),_i=p(Wr),an=n(Wr,"SPAN",{});var Zc=r(an);vi=i(Zc,"FlavaImageConfig"),Zc.forEach(t),Wr.forEach(t),lr=p(o),E=n(o,"DIV",{class:!0});var te=r(E);k(So.$$.fragment,te),bi=p(te),Vo=n(te,"P",{});var Sr=r(Vo);ki=i(Sr,"This is the configuration class to store the configuration of a "),da=n(Sr,"A",{href:!0});var Xc=r(da);Fi=i(Xc,"FlavaImageModel"),Xc.forEach(t),yi=i(Sr,`. It is used to instantiate an
FLAVA model according to the specified arguments, defining the model architecture.`),Sr.forEach(t),$i=p(te),Bo=n(te,"P",{});var Vr=r(Bo);Ti=i(Vr,`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Ro=n(Vr,"A",{href:!0,rel:!0});var Qc=r(Ro);wi=i(Qc,"facebook/flava-full"),Qc.forEach(t),xi=i(Vr," architecture."),Vr.forEach(t),Mi=p(te),pe=n(te,"P",{});var Ea=r(pe);zi=i(Ea,"Configuration objects inherit from "),ca=n(Ea,"A",{href:!0});var em=r(ca);Pi=i(em,"PretrainedConfig"),em.forEach(t),Ii=i(Ea,` and can be used to control the model outputs. Read the
documentation from `),ma=n(Ea,"A",{href:!0});var om=r(ma);Ci=i(om,"PretrainedConfig"),om.forEach(t),Ai=i(Ea," for more information."),Ea.forEach(t),Ei=p(te),k(Ve.$$.fragment,te),te.forEach(t),dr=p(o),fe=n(o,"H2",{class:!0});var Br=r(fe);Be=n(Br,"A",{id:!0,class:!0,href:!0});var tm=r(Be);nn=n(tm,"SPAN",{});var am=r(nn);k(Uo.$$.fragment,am),am.forEach(t),tm.forEach(t),Ni=p(Br),rn=n(Br,"SPAN",{});var nm=r(rn);qi=i(nm,"FlavaMultimodalConfig"),nm.forEach(t),Br.forEach(t),cr=p(o),N=n(o,"DIV",{class:!0});var ae=r(N);k(Ho.$$.fragment,ae),ji=p(ae),Go=n(ae,"P",{});var Rr=r(Go);Oi=i(Rr,"This is the configuration class to store the configuration of a "),pa=n(Rr,"A",{href:!0});var rm=r(pa);Li=i(rm,"FlavaMultimodalModel"),rm.forEach(t),Di=i(Rr,`. It is used to instantiate
an FLAVA model according to the specified arguments, defining the model architecture.`),Rr.forEach(t),Wi=p(ae),Jo=n(ae,"P",{});var Ur=r(Jo);Si=i(Ur,`Instantiating a configuration with the defaults will yield a similar configuration to that of the FLAVA
`),Ko=n(Ur,"A",{href:!0,rel:!0});var sm=r(Ko);Vi=i(sm,"facebook/flava-full"),sm.forEach(t),Bi=i(Ur," architecture."),Ur.forEach(t),Ri=p(ae),he=n(ae,"P",{});var Na=r(he);Ui=i(Na,"Configuration objects inherit from "),fa=n(Na,"A",{href:!0});var im=r(fa);Hi=i(im,"PretrainedConfig"),im.forEach(t),Gi=i(Na,` and can be used to control the model outputs. Read the
documentation from `),ha=n(Na,"A",{href:!0});var lm=r(ha);Ji=i(lm,"PretrainedConfig"),lm.forEach(t),Ki=i(Na," for more information."),Na.forEach(t),Yi=p(ae),k(Re.$$.fragment,ae),ae.forEach(t),mr=p(o),ge=n(o,"H2",{class:!0});var Hr=r(ge);Ue=n(Hr,"A",{id:!0,class:!0,href:!0});var dm=r(Ue);sn=n(dm,"SPAN",{});var cm=r(sn);k(Yo.$$.fragment,cm),cm.forEach(t),dm.forEach(t),Zi=p(Hr),ln=n(Hr,"SPAN",{});var mm=r(ln);Xi=i(mm,"FlavaImageCodebookConfig"),mm.forEach(t),Hr.forEach(t),pr=p(o),Zo=n(o,"DIV",{class:!0});var pm=r(Zo);k(Xo.$$.fragment,pm),pm.forEach(t),fr=p(o),ue=n(o,"H2",{class:!0});var Gr=r(ue);He=n(Gr,"A",{id:!0,class:!0,href:!0});var fm=r(He);dn=n(fm,"SPAN",{});var hm=r(dn);k(Qo.$$.fragment,hm),hm.forEach(t),fm.forEach(t),Qi=p(Gr),cn=n(Gr,"SPAN",{});var gm=r(cn);el=i(gm,"FlavaProcessor"),gm.forEach(t),Gr.forEach(t),hr=p(o),q=n(o,"DIV",{class:!0});var ne=r(q);k(et.$$.fragment,ne),ol=p(ne),mn=n(ne,"P",{});var um=r(mn);tl=i(um,"Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor."),um.forEach(t),al=p(ne),O=n(ne,"P",{});var K=r(O);ga=n(K,"A",{href:!0});var _m=r(ga);nl=i(_m,"FlavaProcessor"),_m.forEach(t),rl=i(K," offers all the functionalities of "),ua=n(K,"A",{href:!0});var vm=r(ua);sl=i(vm,"FlavaImageProcessor"),vm.forEach(t),il=i(K," and "),_a=n(K,"A",{href:!0});var bm=r(_a);ll=i(bm,"BertTokenizerFast"),bm.forEach(t),dl=i(K,`. See the
`),pn=n(K,"CODE",{});var km=r(pn);cl=i(km,"__call__()"),km.forEach(t),ml=i(K," and "),va=n(K,"A",{href:!0});var Fm=r(va);pl=i(Fm,"decode()"),Fm.forEach(t),fl=i(K," for more information."),K.forEach(t),hl=p(ne),Ge=n(ne,"DIV",{class:!0});var Jr=r(Ge);k(ot.$$.fragment,Jr),gl=p(Jr),tt=n(Jr,"P",{});var Kr=r(tt);ul=i(Kr,"This method forwards all its arguments to BertTokenizerFast\u2019s "),ba=n(Kr,"A",{href:!0});var ym=r(ba);_l=i(ym,"batch_decode()"),ym.forEach(t),vl=i(Kr,`. Please
refer to the docstring of this method for more information.`),Kr.forEach(t),Jr.forEach(t),bl=p(ne),Je=n(ne,"DIV",{class:!0});var Yr=r(Je);k(at.$$.fragment,Yr),kl=p(Yr),nt=n(Yr,"P",{});var Zr=r(nt);Fl=i(Zr,"This method forwards all its arguments to BertTokenizerFast\u2019s "),ka=n(Zr,"A",{href:!0});var $m=r(ka);yl=i($m,"decode()"),$m.forEach(t),$l=i(Zr,`. Please refer to
the docstring of this method for more information.`),Zr.forEach(t),Yr.forEach(t),ne.forEach(t),gr=p(o),_e=n(o,"H2",{class:!0});var Xr=r(_e);Ke=n(Xr,"A",{id:!0,class:!0,href:!0});var Tm=r(Ke);fn=n(Tm,"SPAN",{});var wm=r(fn);k(rt.$$.fragment,wm),wm.forEach(t),Tm.forEach(t),Tl=p(Xr),hn=n(Xr,"SPAN",{});var xm=r(hn);wl=i(xm,"FlavaFeatureExtractor"),xm.forEach(t),Xr.forEach(t),ur=p(o),st=n(o,"DIV",{class:!0});var Mm=r(st);k(it.$$.fragment,Mm),Mm.forEach(t),_r=p(o),ve=n(o,"H2",{class:!0});var Qr=r(ve);Ye=n(Qr,"A",{id:!0,class:!0,href:!0});var zm=r(Ye);gn=n(zm,"SPAN",{});var Pm=r(gn);k(lt.$$.fragment,Pm),Pm.forEach(t),zm.forEach(t),xl=p(Qr),un=n(Qr,"SPAN",{});var Im=r(un);Ml=i(Im,"FlavaImageProcessor"),Im.forEach(t),Qr.forEach(t),vr=p(o),U=n(o,"DIV",{class:!0});var qa=r(U);k(dt.$$.fragment,qa),zl=p(qa),_n=n(qa,"P",{});var Cm=r(_n);Pl=i(Cm,"Constructs a Flava image processor."),Cm.forEach(t),Il=p(qa),Ze=n(qa,"DIV",{class:!0});var es=r(Ze);k(ct.$$.fragment,es),Cl=p(es),vn=n(es,"P",{});var Am=r(vn);Al=i(Am,"Preprocess an image or batch of images."),Am.forEach(t),es.forEach(t),qa.forEach(t),br=p(o),be=n(o,"H2",{class:!0});var os=r(be);Xe=n(os,"A",{id:!0,class:!0,href:!0});var Em=r(Xe);bn=n(Em,"SPAN",{});var Nm=r(bn);k(mt.$$.fragment,Nm),Nm.forEach(t),Em.forEach(t),El=p(os),kn=n(os,"SPAN",{});var qm=r(kn);Nl=i(qm,"FlavaForPreTraining"),qm.forEach(t),os.forEach(t),kr=p(o),L=n(o,"DIV",{class:!0});var uo=r(L);k(pt.$$.fragment,uo),ql=p(uo),Fn=n(uo,"P",{});var jm=r(Fn);jl=i(jm,"The FLAVA model for pretraining which outputs losses, embeddings, logits and transformer outputs."),jm.forEach(t),Ol=p(uo),ft=n(uo,"P",{});var ts=r(ft);Ll=i(ts,"This model is a PyTorch "),ht=n(ts,"A",{href:!0,rel:!0});var Om=r(ht);Dl=i(Om,"torch.nn.Module"),Om.forEach(t),Wl=i(ts,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ts.forEach(t),Sl=p(uo),X=n(uo,"DIV",{class:!0});var ja=r(X);k(gt.$$.fragment,ja),Vl=p(ja),ke=n(ja,"P",{});var Oa=r(ke);Bl=i(Oa,"The "),Fa=n(Oa,"A",{href:!0});var Lm=r(Fa);Rl=i(Lm,"FlavaForPreTraining"),Lm.forEach(t),Ul=i(Oa," forward method, overrides the "),yn=n(Oa,"CODE",{});var Dm=r(yn);Hl=i(Dm,"__call__"),Dm.forEach(t),Gl=i(Oa," special method."),Oa.forEach(t),Jl=p(ja),k(Qe.$$.fragment,ja),ja.forEach(t),uo.forEach(t),Fr=p(o),Fe=n(o,"H2",{class:!0});var as=r(Fe);eo=n(as,"A",{id:!0,class:!0,href:!0});var Wm=r(eo);$n=n(Wm,"SPAN",{});var Sm=r($n);k(ut.$$.fragment,Sm),Sm.forEach(t),Wm.forEach(t),Kl=p(as),Tn=n(as,"SPAN",{});var Vm=r(Tn);Yl=i(Vm,"FlavaModel"),Vm.forEach(t),as.forEach(t),yr=p(o),j=n(o,"DIV",{class:!0});var re=r(j);k(_t.$$.fragment,re),Zl=p(re),vt=n(re,"P",{});var ns=r(vt);Xl=i(ns,`The bare FLAVA Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),bt=n(ns,"A",{href:!0,rel:!0});var Bm=r(bt);Ql=i(Bm,"torch.nn.Module"),Bm.forEach(t),ed=i(ns,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ns.forEach(t),od=p(re),D=n(re,"DIV",{class:!0});var _o=r(D);k(kt.$$.fragment,_o),td=p(_o),ye=n(_o,"P",{});var La=r(ye);ad=i(La,"The "),ya=n(La,"A",{href:!0});var Rm=r(ya);nd=i(Rm,"FlavaModel"),Rm.forEach(t),rd=i(La," forward method, overrides the "),wn=n(La,"CODE",{});var Um=r(wn);sd=i(Um,"__call__"),Um.forEach(t),id=i(La," special method."),La.forEach(t),ld=p(_o),k(oo.$$.fragment,_o),dd=p(_o),k(to.$$.fragment,_o),_o.forEach(t),cd=p(re),Q=n(re,"DIV",{class:!0});var Da=r(Q);k(Ft.$$.fragment,Da),md=p(Da),$e=n(Da,"P",{});var Wa=r($e);pd=i(Wa,"The "),$a=n(Wa,"A",{href:!0});var Hm=r($a);fd=i(Hm,"FlavaModel"),Hm.forEach(t),hd=i(Wa," forward method, overrides the "),xn=n(Wa,"CODE",{});var Gm=r(xn);gd=i(Gm,"__call__"),Gm.forEach(t),ud=i(Wa," special method."),Wa.forEach(t),_d=p(Da),k(ao.$$.fragment,Da),Da.forEach(t),vd=p(re),ee=n(re,"DIV",{class:!0});var Sa=r(ee);k(yt.$$.fragment,Sa),bd=p(Sa),Te=n(Sa,"P",{});var Va=r(Te);kd=i(Va,"The "),Ta=n(Va,"A",{href:!0});var Jm=r(Ta);Fd=i(Jm,"FlavaModel"),Jm.forEach(t),yd=i(Va," forward method, overrides the "),Mn=n(Va,"CODE",{});var Km=r(Mn);$d=i(Km,"__call__"),Km.forEach(t),Td=i(Va," special method."),Va.forEach(t),wd=p(Sa),k(no.$$.fragment,Sa),Sa.forEach(t),re.forEach(t),$r=p(o),we=n(o,"H2",{class:!0});var rs=r(we);ro=n(rs,"A",{id:!0,class:!0,href:!0});var Ym=r(ro);zn=n(Ym,"SPAN",{});var Zm=r(zn);k($t.$$.fragment,Zm),Zm.forEach(t),Ym.forEach(t),xd=p(rs),Pn=n(rs,"SPAN",{});var Xm=r(Pn);Md=i(Xm,"FlavaImageCodebook"),Xm.forEach(t),rs.forEach(t),Tr=p(o),I=n(o,"DIV",{class:!0});var R=r(I);k(Tt.$$.fragment,R),zd=p(R),wt=n(R,"P",{});var ss=r(wt);Pd=i(ss,`The FLAVA\u2019s image codebook model inspired from DALL-E\u2019s original encoder. Outputs raw hidden states and can be used
to generate image tokens for an image based on DALL-E\u2019s vocab. Used to generate labels for MIM. Use
`),In=n(ss,"CODE",{});var Qm=r(In);Id=i(Qm,"get_codebook_indices"),Qm.forEach(t),Cd=i(ss," to get image tokens for an image."),ss.forEach(t),Ad=p(R),xt=n(R,"P",{});var is=r(xt);Ed=i(is,"This model is a PyTorch "),Mt=n(is,"A",{href:!0,rel:!0});var ep=r(Mt);Nd=i(ep,"torch.nn.Module"),ep.forEach(t),qd=i(is,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),is.forEach(t),jd=p(R),wa=n(R,"DIV",{class:!0});var op=r(wa);k(zt.$$.fragment,op),op.forEach(t),Od=p(R),xa=n(R,"DIV",{class:!0});var tp=r(xa);k(Pt.$$.fragment,tp),tp.forEach(t),Ld=p(R),Ma=n(R,"DIV",{class:!0});var ap=r(Ma);k(It.$$.fragment,ap),ap.forEach(t),R.forEach(t),wr=p(o),xe=n(o,"H2",{class:!0});var ls=r(xe);so=n(ls,"A",{id:!0,class:!0,href:!0});var np=r(so);Cn=n(np,"SPAN",{});var rp=r(Cn);k(Ct.$$.fragment,rp),rp.forEach(t),np.forEach(t),Dd=p(ls),An=n(ls,"SPAN",{});var sp=r(An);Wd=i(sp,"FlavaTextModel"),sp.forEach(t),ls.forEach(t),xr=p(o),H=n(o,"DIV",{class:!0});var Ba=r(H);k(At.$$.fragment,Ba),Sd=p(Ba),Et=n(Ba,"P",{});var ds=r(Et);Vd=i(ds,`The bare FLAVA Text Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Nt=n(ds,"A",{href:!0,rel:!0});var ip=r(Nt);Bd=i(ip,"torch.nn.Module"),ip.forEach(t),Rd=i(ds,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ds.forEach(t),Ud=p(Ba),W=n(Ba,"DIV",{class:!0});var vo=r(W);k(qt.$$.fragment,vo),Hd=p(vo),Me=n(vo,"P",{});var Ra=r(Me);Gd=i(Ra,"The "),za=n(Ra,"A",{href:!0});var lp=r(za);Jd=i(lp,"FlavaTextModel"),lp.forEach(t),Kd=i(Ra," forward method, overrides the "),En=n(Ra,"CODE",{});var dp=r(En);Yd=i(dp,"__call__"),dp.forEach(t),Zd=i(Ra," special method."),Ra.forEach(t),Xd=p(vo),k(io.$$.fragment,vo),Qd=p(vo),k(lo.$$.fragment,vo),vo.forEach(t),Ba.forEach(t),Mr=p(o),ze=n(o,"H2",{class:!0});var cs=r(ze);co=n(cs,"A",{id:!0,class:!0,href:!0});var cp=r(co);Nn=n(cp,"SPAN",{});var mp=r(Nn);k(jt.$$.fragment,mp),mp.forEach(t),cp.forEach(t),ec=p(cs),qn=n(cs,"SPAN",{});var pp=r(qn);oc=i(pp,"FlavaImageModel"),pp.forEach(t),cs.forEach(t),zr=p(o),G=n(o,"DIV",{class:!0});var Ua=r(G);k(Ot.$$.fragment,Ua),tc=p(Ua),Lt=n(Ua,"P",{});var ms=r(Lt);ac=i(ms,`The bare FLAVA Image Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Dt=n(ms,"A",{href:!0,rel:!0});var fp=r(Dt);nc=i(fp,"torch.nn.Module"),fp.forEach(t),rc=i(ms,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ms.forEach(t),sc=p(Ua),S=n(Ua,"DIV",{class:!0});var bo=r(S);k(Wt.$$.fragment,bo),ic=p(bo),Pe=n(bo,"P",{});var Ha=r(Pe);lc=i(Ha,"The "),Pa=n(Ha,"A",{href:!0});var hp=r(Pa);dc=i(hp,"FlavaImageModel"),hp.forEach(t),cc=i(Ha," forward method, overrides the "),jn=n(Ha,"CODE",{});var gp=r(jn);mc=i(gp,"__call__"),gp.forEach(t),pc=i(Ha," special method."),Ha.forEach(t),fc=p(bo),k(mo.$$.fragment,bo),hc=p(bo),k(po.$$.fragment,bo),bo.forEach(t),Ua.forEach(t),Pr=p(o),Ie=n(o,"H2",{class:!0});var ps=r(Ie);fo=n(ps,"A",{id:!0,class:!0,href:!0});var up=r(fo);On=n(up,"SPAN",{});var _p=r(On);k(St.$$.fragment,_p),_p.forEach(t),up.forEach(t),gc=p(ps),Ln=n(ps,"SPAN",{});var vp=r(Ln);uc=i(vp,"FlavaMultimodalModel"),vp.forEach(t),ps.forEach(t),Ir=p(o),J=n(o,"DIV",{class:!0});var Ga=r(J);k(Vt.$$.fragment,Ga),_c=p(Ga),Bt=n(Ga,"P",{});var fs=r(Bt);vc=i(fs,`The bare FLAVA Multimodal Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rt=n(fs,"A",{href:!0,rel:!0});var bp=r(Rt);bc=i(bp,"torch.nn.Module"),bp.forEach(t),kc=i(fs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),fs.forEach(t),Fc=p(Ga),V=n(Ga,"DIV",{class:!0});var ko=r(V);k(Ut.$$.fragment,ko),yc=p(ko),Ce=n(ko,"P",{});var Ja=r(Ce);$c=i(Ja,"The "),Ia=n(Ja,"A",{href:!0});var kp=r(Ia);Tc=i(kp,"FlavaMultimodalModel"),kp.forEach(t),wc=i(Ja," forward method, overrides the "),Dn=n(Ja,"CODE",{});var Fp=r(Dn);xc=i(Fp,"__call__"),Fp.forEach(t),Mc=i(Ja," special method."),Ja.forEach(t),zc=p(ko),k(ho.$$.fragment,ko),Pc=p(ko),k(go.$$.fragment,ko),ko.forEach(t),Ga.forEach(t),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(Bp)),d(g,"id","flava"),d(g,"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(g,"href","#flava"),d(_,"class","relative group"),d(Ee,"id","overview"),d(Ee,"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(Ee,"href","#overview"),d(se,"class","relative group"),d(wo,"href","https://arxiv.org/abs/2112.04482"),d(wo,"rel","nofollow"),d(xo,"href","https://huggingface.co/aps"),d(xo,"rel","nofollow"),d(Mo,"href","https://github.com/facebookresearch/multimodal/tree/main/examples/flava"),d(Mo,"rel","nofollow"),d(qe,"id","transformers.FlavaConfig"),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.FlavaConfig"),d(ie,"class","relative group"),d(ea,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaConfig"),d(oa,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaModel"),d(Io,"href","https://huggingface.co/facebook/flava-full"),d(Io,"rel","nofollow"),d(ta,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(aa,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(na,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaConfig"),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(ra,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),d(Le,"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(De,"id","transformers.FlavaTextConfig"),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.FlavaTextConfig"),d(de,"class","relative group"),d(sa,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"),d(Do,"href","https://huggingface.co/facebook/flava-full"),d(Do,"rel","nofollow"),d(ia,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(la,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),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(Se,"id","transformers.FlavaImageConfig"),d(Se,"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(Se,"href","#transformers.FlavaImageConfig"),d(me,"class","relative group"),d(da,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"),d(Ro,"href","https://huggingface.co/facebook/flava-full"),d(Ro,"rel","nofollow"),d(ca,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(ma,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Be,"id","transformers.FlavaMultimodalConfig"),d(Be,"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(Be,"href","#transformers.FlavaMultimodalConfig"),d(fe,"class","relative group"),d(pa,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalModel"),d(Ko,"href","https://huggingface.co/facebook/flava-full"),d(Ko,"rel","nofollow"),d(fa,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(ha,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(N,"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.FlavaImageCodebookConfig"),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.FlavaImageCodebookConfig"),d(ge,"class","relative group"),d(Zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(He,"id","transformers.FlavaProcessor"),d(He,"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(He,"href","#transformers.FlavaProcessor"),d(ue,"class","relative group"),d(ga,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaProcessor"),d(ua,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageProcessor"),d(_a,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast"),d(va,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaProcessor.decode"),d(ba,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),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(ka,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Ke,"id","transformers.FlavaFeatureExtractor"),d(Ke,"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(Ke,"href","#transformers.FlavaFeatureExtractor"),d(_e,"class","relative group"),d(st,"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.FlavaImageProcessor"),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.FlavaImageProcessor"),d(ve,"class","relative group"),d(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xe,"id","transformers.FlavaForPreTraining"),d(Xe,"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(Xe,"href","#transformers.FlavaForPreTraining"),d(be,"class","relative group"),d(ht,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ht,"rel","nofollow"),d(Fa,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaForPreTraining"),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(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(eo,"id","transformers.FlavaModel"),d(eo,"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(eo,"href","#transformers.FlavaModel"),d(Fe,"class","relative group"),d(bt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(bt,"rel","nofollow"),d(ya,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaModel"),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($a,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaModel"),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(Ta,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaModel"),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(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(ro,"id","transformers.FlavaImageCodebook"),d(ro,"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(ro,"href","#transformers.FlavaImageCodebook"),d(we,"class","relative group"),d(Mt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Mt,"rel","nofollow"),d(wa,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ma,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(so,"id","transformers.FlavaTextModel"),d(so,"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(so,"href","#transformers.FlavaTextModel"),d(xe,"class","relative group"),d(Nt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Nt,"rel","nofollow"),d(za,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaTextModel"),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(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(co,"id","transformers.FlavaImageModel"),d(co,"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(co,"href","#transformers.FlavaImageModel"),d(ze,"class","relative group"),d(Dt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Dt,"rel","nofollow"),d(Pa,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaImageModel"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(fo,"id","transformers.FlavaMultimodalModel"),d(fo,"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(fo,"href","#transformers.FlavaMultimodalModel"),d(Ie,"class","relative group"),d(Rt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Rt,"rel","nofollow"),d(Ia,"href","/docs/transformers/main/en/model_doc/flava#transformers.FlavaMultimodalModel"),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(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,h){e(document.head,c),u(o,w,h),u(o,_,h),e(_,g),e(g,v),F(l,v,null),e(_,f),e(_,z),e(z,hs),u(o,Zn,h),u(o,se,h),e(se,Ee),e(Ee,Ka),F(To,Ka,null),e(se,gs),e(se,Ya),e(Ya,us),u(o,Xn,h),u(o,Ne,h),e(Ne,_s),e(Ne,wo),e(wo,vs),e(Ne,bs),u(o,Qn,h),u(o,Zt,h),e(Zt,ks),u(o,er,h),u(o,Xt,h),e(Xt,Fs),u(o,or,h),u(o,Qt,h),e(Qt,Za),e(Za,ys),u(o,tr,h),u(o,Y,h),e(Y,$s),e(Y,xo),e(xo,Ts),e(Y,ws),e(Y,Mo),e(Mo,xs),e(Y,Ms),u(o,ar,h),u(o,ie,h),e(ie,qe),e(qe,Xa),F(zo,Xa,null),e(ie,zs),e(ie,Qa),e(Qa,Ps),u(o,nr,h),u(o,P,h),F(Po,P,null),e(P,Is),e(P,Z),e(Z,ea),e(ea,Cs),e(Z,As),e(Z,oa),e(oa,Es),e(Z,Ns),e(Z,Io),e(Io,qs),e(Z,js),e(P,Os),e(P,le),e(le,Ls),e(le,ta),e(ta,Ds),e(le,Ws),e(le,aa),e(aa,Ss),e(le,Vs),e(P,Bs),F(je,P,null),e(P,Rs),e(P,Oe),F(Co,Oe,null),e(Oe,Us),e(Oe,Ao),e(Ao,Hs),e(Ao,na),e(na,Gs),e(Ao,Js),e(P,Ks),e(P,Le),F(Eo,Le,null),e(Le,Ys),e(Le,No),e(No,Zs),e(No,ra),e(ra,Xs),e(No,Qs),u(o,rr,h),u(o,de,h),e(de,De),e(De,en),F(qo,en,null),e(de,ei),e(de,on),e(on,oi),u(o,sr,h),u(o,A,h),F(jo,A,null),e(A,ti),e(A,Oo),e(Oo,ai),e(Oo,sa),e(sa,ni),e(Oo,ri),e(A,si),e(A,Lo),e(Lo,ii),e(Lo,Do),e(Do,li),e(Lo,di),e(A,ci),e(A,ce),e(ce,mi),e(ce,ia),e(ia,pi),e(ce,fi),e(ce,la),e(la,hi),e(ce,gi),e(A,ui),F(We,A,null),u(o,ir,h),u(o,me,h),e(me,Se),e(Se,tn),F(Wo,tn,null),e(me,_i),e(me,an),e(an,vi),u(o,lr,h),u(o,E,h),F(So,E,null),e(E,bi),e(E,Vo),e(Vo,ki),e(Vo,da),e(da,Fi),e(Vo,yi),e(E,$i),e(E,Bo),e(Bo,Ti),e(Bo,Ro),e(Ro,wi),e(Bo,xi),e(E,Mi),e(E,pe),e(pe,zi),e(pe,ca),e(ca,Pi),e(pe,Ii),e(pe,ma),e(ma,Ci),e(pe,Ai),e(E,Ei),F(Ve,E,null),u(o,dr,h),u(o,fe,h),e(fe,Be),e(Be,nn),F(Uo,nn,null),e(fe,Ni),e(fe,rn),e(rn,qi),u(o,cr,h),u(o,N,h),F(Ho,N,null),e(N,ji),e(N,Go),e(Go,Oi),e(Go,pa),e(pa,Li),e(Go,Di),e(N,Wi),e(N,Jo),e(Jo,Si),e(Jo,Ko),e(Ko,Vi),e(Jo,Bi),e(N,Ri),e(N,he),e(he,Ui),e(he,fa),e(fa,Hi),e(he,Gi),e(he,ha),e(ha,Ji),e(he,Ki),e(N,Yi),F(Re,N,null),u(o,mr,h),u(o,ge,h),e(ge,Ue),e(Ue,sn),F(Yo,sn,null),e(ge,Zi),e(ge,ln),e(ln,Xi),u(o,pr,h),u(o,Zo,h),F(Xo,Zo,null),u(o,fr,h),u(o,ue,h),e(ue,He),e(He,dn),F(Qo,dn,null),e(ue,Qi),e(ue,cn),e(cn,el),u(o,hr,h),u(o,q,h),F(et,q,null),e(q,ol),e(q,mn),e(mn,tl),e(q,al),e(q,O),e(O,ga),e(ga,nl),e(O,rl),e(O,ua),e(ua,sl),e(O,il),e(O,_a),e(_a,ll),e(O,dl),e(O,pn),e(pn,cl),e(O,ml),e(O,va),e(va,pl),e(O,fl),e(q,hl),e(q,Ge),F(ot,Ge,null),e(Ge,gl),e(Ge,tt),e(tt,ul),e(tt,ba),e(ba,_l),e(tt,vl),e(q,bl),e(q,Je),F(at,Je,null),e(Je,kl),e(Je,nt),e(nt,Fl),e(nt,ka),e(ka,yl),e(nt,$l),u(o,gr,h),u(o,_e,h),e(_e,Ke),e(Ke,fn),F(rt,fn,null),e(_e,Tl),e(_e,hn),e(hn,wl),u(o,ur,h),u(o,st,h),F(it,st,null),u(o,_r,h),u(o,ve,h),e(ve,Ye),e(Ye,gn),F(lt,gn,null),e(ve,xl),e(ve,un),e(un,Ml),u(o,vr,h),u(o,U,h),F(dt,U,null),e(U,zl),e(U,_n),e(_n,Pl),e(U,Il),e(U,Ze),F(ct,Ze,null),e(Ze,Cl),e(Ze,vn),e(vn,Al),u(o,br,h),u(o,be,h),e(be,Xe),e(Xe,bn),F(mt,bn,null),e(be,El),e(be,kn),e(kn,Nl),u(o,kr,h),u(o,L,h),F(pt,L,null),e(L,ql),e(L,Fn),e(Fn,jl),e(L,Ol),e(L,ft),e(ft,Ll),e(ft,ht),e(ht,Dl),e(ft,Wl),e(L,Sl),e(L,X),F(gt,X,null),e(X,Vl),e(X,ke),e(ke,Bl),e(ke,Fa),e(Fa,Rl),e(ke,Ul),e(ke,yn),e(yn,Hl),e(ke,Gl),e(X,Jl),F(Qe,X,null),u(o,Fr,h),u(o,Fe,h),e(Fe,eo),e(eo,$n),F(ut,$n,null),e(Fe,Kl),e(Fe,Tn),e(Tn,Yl),u(o,yr,h),u(o,j,h),F(_t,j,null),e(j,Zl),e(j,vt),e(vt,Xl),e(vt,bt),e(bt,Ql),e(vt,ed),e(j,od),e(j,D),F(kt,D,null),e(D,td),e(D,ye),e(ye,ad),e(ye,ya),e(ya,nd),e(ye,rd),e(ye,wn),e(wn,sd),e(ye,id),e(D,ld),F(oo,D,null),e(D,dd),F(to,D,null),e(j,cd),e(j,Q),F(Ft,Q,null),e(Q,md),e(Q,$e),e($e,pd),e($e,$a),e($a,fd),e($e,hd),e($e,xn),e(xn,gd),e($e,ud),e(Q,_d),F(ao,Q,null),e(j,vd),e(j,ee),F(yt,ee,null),e(ee,bd),e(ee,Te),e(Te,kd),e(Te,Ta),e(Ta,Fd),e(Te,yd),e(Te,Mn),e(Mn,$d),e(Te,Td),e(ee,wd),F(no,ee,null),u(o,$r,h),u(o,we,h),e(we,ro),e(ro,zn),F($t,zn,null),e(we,xd),e(we,Pn),e(Pn,Md),u(o,Tr,h),u(o,I,h),F(Tt,I,null),e(I,zd),e(I,wt),e(wt,Pd),e(wt,In),e(In,Id),e(wt,Cd),e(I,Ad),e(I,xt),e(xt,Ed),e(xt,Mt),e(Mt,Nd),e(xt,qd),e(I,jd),e(I,wa),F(zt,wa,null),e(I,Od),e(I,xa),F(Pt,xa,null),e(I,Ld),e(I,Ma),F(It,Ma,null),u(o,wr,h),u(o,xe,h),e(xe,so),e(so,Cn),F(Ct,Cn,null),e(xe,Dd),e(xe,An),e(An,Wd),u(o,xr,h),u(o,H,h),F(At,H,null),e(H,Sd),e(H,Et),e(Et,Vd),e(Et,Nt),e(Nt,Bd),e(Et,Rd),e(H,Ud),e(H,W),F(qt,W,null),e(W,Hd),e(W,Me),e(Me,Gd),e(Me,za),e(za,Jd),e(Me,Kd),e(Me,En),e(En,Yd),e(Me,Zd),e(W,Xd),F(io,W,null),e(W,Qd),F(lo,W,null),u(o,Mr,h),u(o,ze,h),e(ze,co),e(co,Nn),F(jt,Nn,null),e(ze,ec),e(ze,qn),e(qn,oc),u(o,zr,h),u(o,G,h),F(Ot,G,null),e(G,tc),e(G,Lt),e(Lt,ac),e(Lt,Dt),e(Dt,nc),e(Lt,rc),e(G,sc),e(G,S),F(Wt,S,null),e(S,ic),e(S,Pe),e(Pe,lc),e(Pe,Pa),e(Pa,dc),e(Pe,cc),e(Pe,jn),e(jn,mc),e(Pe,pc),e(S,fc),F(mo,S,null),e(S,hc),F(po,S,null),u(o,Pr,h),u(o,Ie,h),e(Ie,fo),e(fo,On),F(St,On,null),e(Ie,gc),e(Ie,Ln),e(Ln,uc),u(o,Ir,h),u(o,J,h),F(Vt,J,null),e(J,_c),e(J,Bt),e(Bt,vc),e(Bt,Rt),e(Rt,bc),e(Bt,kc),e(J,Fc),e(J,V),F(Ut,V,null),e(V,yc),e(V,Ce),e(Ce,$c),e(Ce,Ia),e(Ia,Tc),e(Ce,wc),e(Ce,Dn),e(Dn,xc),e(Ce,Mc),e(V,zc),F(ho,V,null),e(V,Pc),F(go,V,null),Cr=!0},p(o,[h]){const Ht={};h&2&&(Ht.$$scope={dirty:h,ctx:o}),je.$set(Ht);const Wn={};h&2&&(Wn.$$scope={dirty:h,ctx:o}),We.$set(Wn);const Sn={};h&2&&(Sn.$$scope={dirty:h,ctx:o}),Ve.$set(Sn);const Vn={};h&2&&(Vn.$$scope={dirty:h,ctx:o}),Re.$set(Vn);const Gt={};h&2&&(Gt.$$scope={dirty:h,ctx:o}),Qe.$set(Gt);const Bn={};h&2&&(Bn.$$scope={dirty:h,ctx:o}),oo.$set(Bn);const Rn={};h&2&&(Rn.$$scope={dirty:h,ctx:o}),to.$set(Rn);const Un={};h&2&&(Un.$$scope={dirty:h,ctx:o}),ao.$set(Un);const Jt={};h&2&&(Jt.$$scope={dirty:h,ctx:o}),no.$set(Jt);const Hn={};h&2&&(Hn.$$scope={dirty:h,ctx:o}),io.$set(Hn);const Gn={};h&2&&(Gn.$$scope={dirty:h,ctx:o}),lo.$set(Gn);const Jn={};h&2&&(Jn.$$scope={dirty:h,ctx:o}),mo.$set(Jn);const Kn={};h&2&&(Kn.$$scope={dirty:h,ctx:o}),po.$set(Kn);const Yn={};h&2&&(Yn.$$scope={dirty:h,ctx:o}),ho.$set(Yn);const Ae={};h&2&&(Ae.$$scope={dirty:h,ctx:o}),go.$set(Ae)},i(o){Cr||(y(l.$$.fragment,o),y(To.$$.fragment,o),y(zo.$$.fragment,o),y(Po.$$.fragment,o),y(je.$$.fragment,o),y(Co.$$.fragment,o),y(Eo.$$.fragment,o),y(qo.$$.fragment,o),y(jo.$$.fragment,o),y(We.$$.fragment,o),y(Wo.$$.fragment,o),y(So.$$.fragment,o),y(Ve.$$.fragment,o),y(Uo.$$.fragment,o),y(Ho.$$.fragment,o),y(Re.$$.fragment,o),y(Yo.$$.fragment,o),y(Xo.$$.fragment,o),y(Qo.$$.fragment,o),y(et.$$.fragment,o),y(ot.$$.fragment,o),y(at.$$.fragment,o),y(rt.$$.fragment,o),y(it.$$.fragment,o),y(lt.$$.fragment,o),y(dt.$$.fragment,o),y(ct.$$.fragment,o),y(mt.$$.fragment,o),y(pt.$$.fragment,o),y(gt.$$.fragment,o),y(Qe.$$.fragment,o),y(ut.$$.fragment,o),y(_t.$$.fragment,o),y(kt.$$.fragment,o),y(oo.$$.fragment,o),y(to.$$.fragment,o),y(Ft.$$.fragment,o),y(ao.$$.fragment,o),y(yt.$$.fragment,o),y(no.$$.fragment,o),y($t.$$.fragment,o),y(Tt.$$.fragment,o),y(zt.$$.fragment,o),y(Pt.$$.fragment,o),y(It.$$.fragment,o),y(Ct.$$.fragment,o),y(At.$$.fragment,o),y(qt.$$.fragment,o),y(io.$$.fragment,o),y(lo.$$.fragment,o),y(jt.$$.fragment,o),y(Ot.$$.fragment,o),y(Wt.$$.fragment,o),y(mo.$$.fragment,o),y(po.$$.fragment,o),y(St.$$.fragment,o),y(Vt.$$.fragment,o),y(Ut.$$.fragment,o),y(ho.$$.fragment,o),y(go.$$.fragment,o),Cr=!0)},o(o){$(l.$$.fragment,o),$(To.$$.fragment,o),$(zo.$$.fragment,o),$(Po.$$.fragment,o),$(je.$$.fragment,o),$(Co.$$.fragment,o),$(Eo.$$.fragment,o),$(qo.$$.fragment,o),$(jo.$$.fragment,o),$(We.$$.fragment,o),$(Wo.$$.fragment,o),$(So.$$.fragment,o),$(Ve.$$.fragment,o),$(Uo.$$.fragment,o),$(Ho.$$.fragment,o),$(Re.$$.fragment,o),$(Yo.$$.fragment,o),$(Xo.$$.fragment,o),$(Qo.$$.fragment,o),$(et.$$.fragment,o),$(ot.$$.fragment,o),$(at.$$.fragment,o),$(rt.$$.fragment,o),$(it.$$.fragment,o),$(lt.$$.fragment,o),$(dt.$$.fragment,o),$(ct.$$.fragment,o),$(mt.$$.fragment,o),$(pt.$$.fragment,o),$(gt.$$.fragment,o),$(Qe.$$.fragment,o),$(ut.$$.fragment,o),$(_t.$$.fragment,o),$(kt.$$.fragment,o),$(oo.$$.fragment,o),$(to.$$.fragment,o),$(Ft.$$.fragment,o),$(ao.$$.fragment,o),$(yt.$$.fragment,o),$(no.$$.fragment,o),$($t.$$.fragment,o),$(Tt.$$.fragment,o),$(zt.$$.fragment,o),$(Pt.$$.fragment,o),$(It.$$.fragment,o),$(Ct.$$.fragment,o),$(At.$$.fragment,o),$(qt.$$.fragment,o),$(io.$$.fragment,o),$(lo.$$.fragment,o),$(jt.$$.fragment,o),$(Ot.$$.fragment,o),$(Wt.$$.fragment,o),$(mo.$$.fragment,o),$(po.$$.fragment,o),$(St.$$.fragment,o),$(Vt.$$.fragment,o),$(Ut.$$.fragment,o),$(ho.$$.fragment,o),$(go.$$.fragment,o),Cr=!1},d(o){t(c),o&&t(w),o&&t(_),T(l),o&&t(Zn),o&&t(se),T(To),o&&t(Xn),o&&t(Ne),o&&t(Qn),o&&t(Zt),o&&t(er),o&&t(Xt),o&&t(or),o&&t(Qt),o&&t(tr),o&&t(Y),o&&t(ar),o&&t(ie),T(zo),o&&t(nr),o&&t(P),T(Po),T(je),T(Co),T(Eo),o&&t(rr),o&&t(de),T(qo),o&&t(sr),o&&t(A),T(jo),T(We),o&&t(ir),o&&t(me),T(Wo),o&&t(lr),o&&t(E),T(So),T(Ve),o&&t(dr),o&&t(fe),T(Uo),o&&t(cr),o&&t(N),T(Ho),T(Re),o&&t(mr),o&&t(ge),T(Yo),o&&t(pr),o&&t(Zo),T(Xo),o&&t(fr),o&&t(ue),T(Qo),o&&t(hr),o&&t(q),T(et),T(ot),T(at),o&&t(gr),o&&t(_e),T(rt),o&&t(ur),o&&t(st),T(it),o&&t(_r),o&&t(ve),T(lt),o&&t(vr),o&&t(U),T(dt),T(ct),o&&t(br),o&&t(be),T(mt),o&&t(kr),o&&t(L),T(pt),T(gt),T(Qe),o&&t(Fr),o&&t(Fe),T(ut),o&&t(yr),o&&t(j),T(_t),T(kt),T(oo),T(to),T(Ft),T(ao),T(yt),T(no),o&&t($r),o&&t(we),T($t),o&&t(Tr),o&&t(I),T(Tt),T(zt),T(Pt),T(It),o&&t(wr),o&&t(xe),T(Ct),o&&t(xr),o&&t(H),T(At),T(qt),T(io),T(lo),o&&t(Mr),o&&t(ze),T(jt),o&&t(zr),o&&t(G),T(Ot),T(Wt),T(mo),T(po),o&&t(Pr),o&&t(Ie),T(St),o&&t(Ir),o&&t(J),T(Vt),T(Ut),T(ho),T(go)}}}const Bp={local:"flava",sections:[{local:"overview",title:"Overview"},{local:"transformers.FlavaConfig",title:"FlavaConfig"},{local:"transformers.FlavaTextConfig",title:"FlavaTextConfig"},{local:"transformers.FlavaImageConfig",title:"FlavaImageConfig"},{local:"transformers.FlavaMultimodalConfig",title:"FlavaMultimodalConfig"},{local:"transformers.FlavaImageCodebookConfig",title:"FlavaImageCodebookConfig"},{local:"transformers.FlavaProcessor",title:"FlavaProcessor"},{local:"transformers.FlavaFeatureExtractor",title:"FlavaFeatureExtractor"},{local:"transformers.FlavaImageProcessor",title:"FlavaImageProcessor"},{local:"transformers.FlavaForPreTraining",title:"FlavaForPreTraining"},{local:"transformers.FlavaModel",title:"FlavaModel"},{local:"transformers.FlavaImageCodebook",title:"FlavaImageCodebook"},{local:"transformers.FlavaTextModel",title:"FlavaTextModel"},{local:"transformers.FlavaImageModel",title:"FlavaImageModel"},{local:"transformers.FlavaMultimodalModel",title:"FlavaMultimodalModel"}],title:"FLAVA"};function Rp(x){return xp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zp extends yp{constructor(c){super();$p(this,c,Rp,Vp,Tp,{})}}export{Zp as default,Bp as metadata};
