import{S as Qm,i as Wm,s as Vm,e as n,k as l,w as x,t as r,M as Bm,c as s,d as t,m as d,a as i,x as w,h as a,b as m,G as e,g as u,y,q as k,o as L,B as $,v as Xm,L as ir}from"../../chunks/vendor-hf-doc-builder.js";import{T as Fn}from"../../chunks/Tip-hf-doc-builder.js";import{D as A}from"../../chunks/Docstring-hf-doc-builder.js";import{C as lr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as st}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ar}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Hm(O){let h,b,g,_,T;return _=new lr({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){h=n("p"),b=r("sequence pair mask has the following format:"),g=l(),x(_.$$.fragment)},l(c){h=s(c,"P",{});var p=i(h);b=a(p,"sequence pair mask has the following format:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,b),u(c,g,p),y(_,c,p),T=!0},p:ir,i(c){T||(k(_.$$.fragment,c),T=!0)},o(c){L(_.$$.fragment,c),T=!1},d(c){c&&t(h),c&&t(g),$(_,c)}}}function Um(O){let h,b,g,_,T;return _=new lr({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){h=n("p"),b=r("sequence pair mask has the following format:"),g=l(),x(_.$$.fragment)},l(c){h=s(c,"P",{});var p=i(h);b=a(p,"sequence pair mask has the following format:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,b),u(c,g,p),y(_,c,p),T=!0},p:ir,i(c){T||(k(_.$$.fragment,c),T=!0)},o(c){L(_.$$.fragment,c),T=!1},d(c){c&&t(h),c&&t(g),$(_,c)}}}function Km(O){let h,b,g,_,T;return{c(){h=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
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(c){h=s(c,"P",{});var p=i(h);b=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,b),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function Gm(O){let h,b,g,_,T;return _=new lr({props:{code:`from transformers import AutoTokenizer, LxmertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("unc-nlp/lxmert-base-uncased")
model = LxmertModel.from_pretrained("unc-nlp/lxmert-base-uncased")

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, LxmertModel
<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;unc-nlp/lxmert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LxmertModel.from_pretrained(<span class="hljs-string">&quot;unc-nlp/lxmert-base-uncased&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(){h=n("p"),b=r("Example:"),g=l(),x(_.$$.fragment)},l(c){h=s(c,"P",{});var p=i(h);b=a(p,"Example:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,b),u(c,g,p),y(_,c,p),T=!0},p:ir,i(c){T||(k(_.$$.fragment,c),T=!0)},o(c){L(_.$$.fragment,c),T=!1},d(c){c&&t(h),c&&t(g),$(_,c)}}}function Jm(O){let h,b,g,_,T;return{c(){h=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
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(c){h=s(c,"P",{});var p=i(h);b=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,b),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function Ym(O){let h,b,g,_,T;return{c(){h=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
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(c){h=s(c,"P",{});var p=i(h);b=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,b),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function Zm(O){let h,b,g,_,T;return _=new lr({props:{code:`from transformers import AutoTokenizer, LxmertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("unc-nlp/lxmert-base-uncased")
model = LxmertForQuestionAnswering.from_pretrained("unc-nlp/lxmert-base-uncased")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, LxmertForQuestionAnswering
<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;unc-nlp/lxmert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LxmertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;unc-nlp/lxmert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, 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>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){h=n("p"),b=r("Example:"),g=l(),x(_.$$.fragment)},l(c){h=s(c,"P",{});var p=i(h);b=a(p,"Example:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,b),u(c,g,p),y(_,c,p),T=!0},p:ir,i(c){T||(k(_.$$.fragment,c),T=!0)},o(c){L(_.$$.fragment,c),T=!1},d(c){c&&t(h),c&&t(g),$(_,c)}}}function eh(O){let h,b,g,_,T,c,p,q,Be,$e,N,ee,oe,F,Xe,X,He,Fe,R,Ue,ne,se,Ke,ze,W,Ge,Ee,V,Te,Je,ge,M,j,qe,C,be,Ye,re,xe,Ze,I,we,ae,Me,B,ie,le,et,H,de,ce,tt,_e,P,te,D,me,ot;return{c(){h=n("p"),b=r("TensorFlow models and layers in "),g=n("code"),_=r("transformers"),T=r(" accept two formats as input:"),c=l(),p=n("ul"),q=n("li"),Be=r("having all inputs as keyword arguments (like PyTorch models), or"),$e=l(),N=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),oe=l(),F=n("p"),Xe=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=n("code"),He=r("model.fit()"),Fe=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=n("code"),Ue=r("model.fit()"),ne=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=n("code"),Ke=r("fit()"),ze=r(" and "),W=n("code"),Ge=r("predict()"),Ee=r(`, such as when creating your own layers or models with
the Keras `),V=n("code"),Te=r("Functional"),Je=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ge=l(),M=n("ul"),j=n("li"),qe=r("a single Tensor with "),C=n("code"),be=r("input_ids"),Ye=r(" only and nothing else: "),re=n("code"),xe=r("model(input_ids)"),Ze=l(),I=n("li"),we=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=n("code"),Me=r("model([input_ids, attention_mask])"),B=r(" or "),ie=n("code"),le=r("model([input_ids, attention_mask, token_type_ids])"),et=l(),H=n("li"),de=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n("code"),tt=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),_e=l(),P=n("p"),te=r(`Note that when creating models and layers with
`),D=n("a"),me=r("subclassing"),ot=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){h=s(v,"P",{});var E=i(h);b=a(E,"TensorFlow models and layers in "),g=s(E,"CODE",{});var rt=i(g);_=a(rt,"transformers"),rt.forEach(t),T=a(E," accept two formats as input:"),E.forEach(t),c=d(v),p=s(v,"UL",{});var S=i(p);q=s(S,"LI",{});var ye=i(q);Be=a(ye,"having all inputs as keyword arguments (like PyTorch models), or"),ye.forEach(t),$e=d(S),N=s(S,"LI",{});var mt=i(N);ee=a(mt,"having all inputs as a list, tuple or dict in the first positional argument."),mt.forEach(t),S.forEach(t),oe=d(v),F=s(v,"P",{});var z=i(F);Xe=a(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s(z,"CODE",{});var ht=i(X);He=a(ht,"model.fit()"),ht.forEach(t),Fe=a(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=s(z,"CODE",{});var Pe=i(R);Ue=a(Pe,"model.fit()"),Pe.forEach(t),ne=a(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),se=s(z,"CODE",{});var ut=i(se);Ke=a(ut,"fit()"),ut.forEach(t),ze=a(z," and "),W=s(z,"CODE",{});var pt=i(W);Ge=a(pt,"predict()"),pt.forEach(t),Ee=a(z,`, such as when creating your own layers or models with
the Keras `),V=s(z,"CODE",{});var Oe=i(V);Te=a(Oe,"Functional"),Oe.forEach(t),Je=a(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ge=d(v),M=s(v,"UL",{});var U=i(M);j=s(U,"LI",{});var he=i(j);qe=a(he,"a single Tensor with "),C=s(he,"CODE",{});var ke=i(C);be=a(ke,"input_ids"),ke.forEach(t),Ye=a(he," only and nothing else: "),re=s(he,"CODE",{});var ft=i(re);xe=a(ft,"model(input_ids)"),ft.forEach(t),he.forEach(t),Ze=d(U),I=s(U,"LI",{});var ue=i(I);we=a(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=s(ue,"CODE",{});var gt=i(ae);Me=a(gt,"model([input_ids, attention_mask])"),gt.forEach(t),B=a(ue," or "),ie=s(ue,"CODE",{});var pe=i(ie);le=a(pe,"model([input_ids, attention_mask, token_type_ids])"),pe.forEach(t),ue.forEach(t),et=d(U),H=s(U,"LI",{});var nt=i(H);de=a(nt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=s(nt,"CODE",{});var Ae=i(ce);tt=a(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),nt.forEach(t),U.forEach(t),_e=d(v),P=s(v,"P",{});var Le=i(P);te=a(Le,`Note that when creating models and layers with
`),D=s(Le,"A",{href:!0,rel:!0});var _t=i(D);me=a(_t,"subclassing"),_t.forEach(t),ot=a(Le,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Le.forEach(t),this.h()},h(){m(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(D,"rel","nofollow")},m(v,E){u(v,h,E),e(h,b),e(h,g),e(g,_),e(h,T),u(v,c,E),u(v,p,E),e(p,q),e(q,Be),e(p,$e),e(p,N),e(N,ee),u(v,oe,E),u(v,F,E),e(F,Xe),e(F,X),e(X,He),e(F,Fe),e(F,R),e(R,Ue),e(F,ne),e(F,se),e(se,Ke),e(F,ze),e(F,W),e(W,Ge),e(F,Ee),e(F,V),e(V,Te),e(F,Je),u(v,ge,E),u(v,M,E),e(M,j),e(j,qe),e(j,C),e(C,be),e(j,Ye),e(j,re),e(re,xe),e(M,Ze),e(M,I),e(I,we),e(I,ae),e(ae,Me),e(I,B),e(I,ie),e(ie,le),e(M,et),e(M,H),e(H,de),e(H,ce),e(ce,tt),u(v,_e,E),u(v,P,E),e(P,te),e(P,D),e(D,me),e(P,ot)},d(v){v&&t(h),v&&t(c),v&&t(p),v&&t(oe),v&&t(F),v&&t(ge),v&&t(M),v&&t(_e),v&&t(P)}}}function th(O){let h,b,g,_,T;return{c(){h=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
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(c){h=s(c,"P",{});var p=i(h);b=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,b),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function oh(O){let h,b,g,_,T;return _=new lr({props:{code:`from transformers import AutoTokenizer, TFLxmertModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("unc-nlp/lxmert-base-uncased")
model = TFLxmertModel.from_pretrained("unc-nlp/lxmert-base-uncased")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
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, TFLxmertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;unc-nlp/lxmert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFLxmertModel.from_pretrained(<span class="hljs-string">&quot;unc-nlp/lxmert-base-uncased&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;tf&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(){h=n("p"),b=r("Example:"),g=l(),x(_.$$.fragment)},l(c){h=s(c,"P",{});var p=i(h);b=a(p,"Example:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,b),u(c,g,p),y(_,c,p),T=!0},p:ir,i(c){T||(k(_.$$.fragment,c),T=!0)},o(c){L(_.$$.fragment,c),T=!1},d(c){c&&t(h),c&&t(g),$(_,c)}}}function nh(O){let h,b,g,_,T,c,p,q,Be,$e,N,ee,oe,F,Xe,X,He,Fe,R,Ue,ne,se,Ke,ze,W,Ge,Ee,V,Te,Je,ge,M,j,qe,C,be,Ye,re,xe,Ze,I,we,ae,Me,B,ie,le,et,H,de,ce,tt,_e,P,te,D,me,ot;return{c(){h=n("p"),b=r("TensorFlow models and layers in "),g=n("code"),_=r("transformers"),T=r(" accept two formats as input:"),c=l(),p=n("ul"),q=n("li"),Be=r("having all inputs as keyword arguments (like PyTorch models), or"),$e=l(),N=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),oe=l(),F=n("p"),Xe=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=n("code"),He=r("model.fit()"),Fe=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=n("code"),Ue=r("model.fit()"),ne=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=n("code"),Ke=r("fit()"),ze=r(" and "),W=n("code"),Ge=r("predict()"),Ee=r(`, such as when creating your own layers or models with
the Keras `),V=n("code"),Te=r("Functional"),Je=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ge=l(),M=n("ul"),j=n("li"),qe=r("a single Tensor with "),C=n("code"),be=r("input_ids"),Ye=r(" only and nothing else: "),re=n("code"),xe=r("model(input_ids)"),Ze=l(),I=n("li"),we=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=n("code"),Me=r("model([input_ids, attention_mask])"),B=r(" or "),ie=n("code"),le=r("model([input_ids, attention_mask, token_type_ids])"),et=l(),H=n("li"),de=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n("code"),tt=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),_e=l(),P=n("p"),te=r(`Note that when creating models and layers with
`),D=n("a"),me=r("subclassing"),ot=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){h=s(v,"P",{});var E=i(h);b=a(E,"TensorFlow models and layers in "),g=s(E,"CODE",{});var rt=i(g);_=a(rt,"transformers"),rt.forEach(t),T=a(E," accept two formats as input:"),E.forEach(t),c=d(v),p=s(v,"UL",{});var S=i(p);q=s(S,"LI",{});var ye=i(q);Be=a(ye,"having all inputs as keyword arguments (like PyTorch models), or"),ye.forEach(t),$e=d(S),N=s(S,"LI",{});var mt=i(N);ee=a(mt,"having all inputs as a list, tuple or dict in the first positional argument."),mt.forEach(t),S.forEach(t),oe=d(v),F=s(v,"P",{});var z=i(F);Xe=a(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s(z,"CODE",{});var ht=i(X);He=a(ht,"model.fit()"),ht.forEach(t),Fe=a(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=s(z,"CODE",{});var Pe=i(R);Ue=a(Pe,"model.fit()"),Pe.forEach(t),ne=a(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),se=s(z,"CODE",{});var ut=i(se);Ke=a(ut,"fit()"),ut.forEach(t),ze=a(z," and "),W=s(z,"CODE",{});var pt=i(W);Ge=a(pt,"predict()"),pt.forEach(t),Ee=a(z,`, such as when creating your own layers or models with
the Keras `),V=s(z,"CODE",{});var Oe=i(V);Te=a(Oe,"Functional"),Oe.forEach(t),Je=a(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ge=d(v),M=s(v,"UL",{});var U=i(M);j=s(U,"LI",{});var he=i(j);qe=a(he,"a single Tensor with "),C=s(he,"CODE",{});var ke=i(C);be=a(ke,"input_ids"),ke.forEach(t),Ye=a(he," only and nothing else: "),re=s(he,"CODE",{});var ft=i(re);xe=a(ft,"model(input_ids)"),ft.forEach(t),he.forEach(t),Ze=d(U),I=s(U,"LI",{});var ue=i(I);we=a(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=s(ue,"CODE",{});var gt=i(ae);Me=a(gt,"model([input_ids, attention_mask])"),gt.forEach(t),B=a(ue," or "),ie=s(ue,"CODE",{});var pe=i(ie);le=a(pe,"model([input_ids, attention_mask, token_type_ids])"),pe.forEach(t),ue.forEach(t),et=d(U),H=s(U,"LI",{});var nt=i(H);de=a(nt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=s(nt,"CODE",{});var Ae=i(ce);tt=a(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),nt.forEach(t),U.forEach(t),_e=d(v),P=s(v,"P",{});var Le=i(P);te=a(Le,`Note that when creating models and layers with
`),D=s(Le,"A",{href:!0,rel:!0});var _t=i(D);me=a(_t,"subclassing"),_t.forEach(t),ot=a(Le,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Le.forEach(t),this.h()},h(){m(D,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),m(D,"rel","nofollow")},m(v,E){u(v,h,E),e(h,b),e(h,g),e(g,_),e(h,T),u(v,c,E),u(v,p,E),e(p,q),e(q,Be),e(p,$e),e(p,N),e(N,ee),u(v,oe,E),u(v,F,E),e(F,Xe),e(F,X),e(X,He),e(F,Fe),e(F,R),e(R,Ue),e(F,ne),e(F,se),e(se,Ke),e(F,ze),e(F,W),e(W,Ge),e(F,Ee),e(F,V),e(V,Te),e(F,Je),u(v,ge,E),u(v,M,E),e(M,j),e(j,qe),e(j,C),e(C,be),e(j,Ye),e(j,re),e(re,xe),e(M,Ze),e(M,I),e(I,we),e(I,ae),e(ae,Me),e(I,B),e(I,ie),e(ie,le),e(M,et),e(M,H),e(H,de),e(H,ce),e(ce,tt),u(v,_e,E),u(v,P,E),e(P,te),e(P,D),e(D,me),e(P,ot)},d(v){v&&t(h),v&&t(c),v&&t(p),v&&t(oe),v&&t(F),v&&t(ge),v&&t(M),v&&t(_e),v&&t(P)}}}function sh(O){let h,b,g,_,T;return{c(){h=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
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(c){h=s(c,"P",{});var p=i(h);b=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,b),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function rh(O){let h,b,g,_,T,c,p,q,Be,$e,N,ee,oe,F,Xe,X,He,Fe,R,Ue,ne,se,Ke,ze,W,Ge,Ee,V,Te,Je,ge,M,j,qe,C,be,Ye,re,xe,Ze,I,we,ae,Me,B,ie,le,et,H,de,ce,tt,_e,P,te,D,me,ot,v,E,rt,S,ye,mt,z,ht,Pe,ut,pt,Oe,U,he,ke,ft,ue,gt,pe,nt,Ae,Le,_t,zn,fa,ga,dr,vt,It,is,uo,_a,ls,va,cr,Q,po,Ta,ds,ba,xa,fo,wa,En,ya,ka,La,at,go,$a,cs,Fa,za,_o,qn,Ea,ms,qa,Ma,Mn,Pa,hs,Oa,Aa,Dt,vo,Ca,us,Na,ja,Ce,To,Ia,ps,Da,Sa,St,Ra,Tt,Qa,fs,Wa,Va,gs,Ba,Xa,Ha,Rt,bo,Ua,xo,Ka,_s,Ga,Ja,mr,bt,Qt,vs,wo,Ya,Ts,Za,hr,fe,yo,ei,ko,ti,bs,oi,ni,si,Lo,ri,Pn,ai,ii,li,it,$o,di,xs,ci,mi,Fo,On,hi,ws,ui,pi,An,fi,ys,gi,_i,Ne,zo,vi,ks,Ti,bi,Wt,xi,xt,wi,Ls,yi,ki,$s,Li,$i,ur,wt,Vt,Fs,Eo,Fi,zs,zi,pr,yt,qo,Ei,Es,qi,fr,kt,Mo,Mi,Po,Pi,Cn,Oi,Ai,gr,Lt,Oo,Ci,Ao,Ni,Nn,ji,Ii,_r,$t,Co,Di,qs,Si,vr,Ft,No,Ri,jo,Qi,jn,Wi,Vi,Tr,zt,Bt,Ms,Io,Bi,Ps,Xi,br,K,Do,Hi,Os,Ui,Ki,So,Gi,Ro,Ji,Yi,Zi,Qo,el,In,tl,ol,nl,Wo,sl,Vo,rl,al,il,je,Bo,ll,Et,dl,Dn,cl,ml,As,hl,ul,pl,Xt,fl,Ht,xr,qt,Ut,Cs,Xo,gl,Ns,_l,wr,G,Ho,vl,js,Tl,bl,Uo,xl,Ko,wl,yl,kl,Go,Ll,Sn,$l,Fl,zl,Jo,El,Yo,ql,Ml,Pl,lt,Zo,Ol,Mt,Al,Rn,Cl,Nl,Is,jl,Il,Dl,Kt,yr,Pt,Gt,Ds,en,Sl,Ss,Rl,kr,J,tn,Ql,Rs,Wl,Vl,on,Bl,nn,Xl,Hl,Ul,sn,Kl,Qn,Gl,Jl,Yl,rn,Zl,an,ed,td,od,Ie,ln,nd,Ot,sd,Wn,rd,ad,Qs,id,ld,dd,Jt,cd,Yt,Lr,At,Zt,Ws,dn,md,Vs,hd,$r,Y,cn,ud,Bs,pd,fd,mn,gd,hn,_d,vd,Td,un,bd,pn,xd,wd,yd,eo,kd,De,fn,Ld,Ct,$d,Vn,Fd,zd,Xs,Ed,qd,Md,to,Pd,oo,Fr,Nt,no,Hs,gn,Od,Us,Ad,zr,Z,_n,Cd,vn,Nd,Ks,jd,Id,Dd,Tn,Sd,bn,Rd,Qd,Wd,xn,Vd,wn,Bd,Xd,Hd,so,Ud,dt,yn,Kd,jt,Gd,Bn,Jd,Yd,Gs,Zd,ec,tc,ro,Er;return c=new st({}),F=new st({}),me=new st({}),ye=new A({props:{name:"class transformers.LxmertConfig",anchor:"transformers.LxmertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_attention_heads",val:" = 12"},{name:"num_qa_labels",val:" = 9500"},{name:"num_object_labels",val:" = 1600"},{name:"num_attr_labels",val:" = 400"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"l_layers",val:" = 9"},{name:"x_layers",val:" = 5"},{name:"r_layers",val:" = 5"},{name:"visual_feat_dim",val:" = 2048"},{name:"visual_pos_dim",val:" = 4"},{name:"visual_loss_normalizer",val:" = 6.67"},{name:"task_matched",val:" = True"},{name:"task_mask_lm",val:" = True"},{name:"task_obj_predict",val:" = True"},{name:"task_qa",val:" = True"},{name:"visual_obj_loss",val:" = True"},{name:"visual_attr_loss",val:" = True"},{name:"visual_feat_loss",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LxmertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the LXMERT 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/lxmert#transformers.LxmertModel">LxmertModel</a> or <a href="/docs/transformers/main/en/model_doc/lxmert#transformers.TFLxmertModel">TFLxmertModel</a>.`,name:"vocab_size"},{anchor:"transformers.LxmertConfig.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.LxmertConfig.r_layers",description:`<strong>r_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of hidden layers in the Transformer visual encoder.`,name:"r_layers"},{anchor:"transformers.LxmertConfig.l_layers",description:`<strong>l_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 9) &#x2014;
Number of hidden layers in the Transformer language encoder.`,name:"l_layers"},{anchor:"transformers.LxmertConfig.x_layers",description:`<strong>x_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of hidden layers in the Transformer cross modality encoder.`,name:"x_layers"},{anchor:"transformers.LxmertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.LxmertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.LxmertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.LxmertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.LxmertConfig.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.LxmertConfig.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).`,name:"max_position_embeddings"},{anchor:"transformers.LxmertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <em>token_type_ids</em> passed into <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertModel">BertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.LxmertConfig.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.LxmertConfig.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.LxmertConfig.visual_feat_dim",description:`<strong>visual_feat_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
This represents the last dimension of the pooled-object features used as input for the model, representing
the size of each object feature itself.`,name:"visual_feat_dim"},{anchor:"transformers.LxmertConfig.visual_pos_dim",description:`<strong>visual_pos_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
This represents the number of spacial features that are mixed into the visual features. The default is set
to 4 because most commonly this will represent the location of a bounding box. i.e., (x, y, width, height)`,name:"visual_pos_dim"},{anchor:"transformers.LxmertConfig.visual_loss_normalizer",description:`<strong>visual_loss_normalizer</strong> (<code>float</code>, <em>optional</em>, defaults to 1/15) &#x2014;
This represents the scaling factor in which each visual loss is multiplied by if during pretraining, one
decided to train with multiple vision-based loss objectives.`,name:"visual_loss_normalizer"},{anchor:"transformers.LxmertConfig.num_qa_labels",description:`<strong>num_qa_labels</strong> (<code>int</code>, <em>optional</em>, defaults to 9500) &#x2014;
This represents the total number of different question answering (QA) labels there are. If using more than
one dataset with QA, the user will need to account for the total number of labels that all of the datasets
have in total.`,name:"num_qa_labels"},{anchor:"transformers.LxmertConfig.num_object_labels",description:`<strong>num_object_labels</strong> (<code>int</code>, <em>optional</em>, defaults to 1600) &#x2014;
This represents the total number of semantically unique objects that lxmert will be able to classify a
pooled-object feature as belonging too.`,name:"num_object_labels"},{anchor:"transformers.LxmertConfig.num_attr_labels",description:`<strong>num_attr_labels</strong> (<code>int</code>, <em>optional</em>, defaults to 400) &#x2014;
This represents the total number of semantically unique attributes that lxmert will be able to classify a
pooled-object feature as possessing.`,name:"num_attr_labels"},{anchor:"transformers.LxmertConfig.task_matched",description:`<strong>task_matched</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
This task is used for sentence-image matching. If the sentence correctly describes the image the label will
be 1. If the sentence does not correctly describe the image, the label will be 0.`,name:"task_matched"},{anchor:"transformers.LxmertConfig.task_mask_lm",description:`<strong>task_mask_lm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add masked language modeling (as used in pretraining models such as BERT) to the loss
objective.`,name:"task_mask_lm"},{anchor:"transformers.LxmertConfig.task_obj_predict",description:`<strong>task_obj_predict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add object prediction, attribute prediction and feature regression to the loss objective.`,name:"task_obj_predict"},{anchor:"transformers.LxmertConfig.task_qa",description:`<strong>task_qa</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add the question-answering loss to the objective`,name:"task_qa"},{anchor:"transformers.LxmertConfig.visual_obj_loss",description:`<strong>visual_obj_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to calculate the object-prediction loss objective`,name:"visual_obj_loss"},{anchor:"transformers.LxmertConfig.visual_attr_loss",description:`<strong>visual_attr_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to calculate the attribute-prediction loss objective`,name:"visual_attr_loss"},{anchor:"transformers.LxmertConfig.visual_feat_loss",description:`<strong>visual_feat_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to calculate the feature-regression loss objective`,name:"visual_feat_loss"},{anchor:"transformers.LxmertConfig.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should return the attentions from the vision, language, and cross-modality layers
should be returned.`,name:"output_attentions"},{anchor:"transformers.LxmertConfig.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should return the hidden states from the vision, language, and cross-modality
layers should be returned.`,name:"output_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/configuration_lxmert.py#L29"}}),uo=new st({}),po=new A({props:{name:"class transformers.LxmertTokenizer",anchor:"transformers.LxmertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LxmertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.LxmertTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.LxmertTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.LxmertTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.LxmertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.LxmertTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.LxmertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.LxmertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.LxmertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.LxmertTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.LxmertTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original Lxmert).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert.py#L67"}}),go=new A({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.LxmertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.LxmertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.LxmertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert.py#L198",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),vo=new A({props:{name:"convert_tokens_to_string",anchor:"transformers.LxmertTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert.py#L193"}}),To=new A({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.LxmertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.LxmertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.LxmertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert.py#L251",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),St=new ar({props:{anchor:"transformers.LxmertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Hm]},$$scope:{ctx:O}}}),bo=new A({props:{name:"get_special_tokens_mask",anchor:"transformers.LxmertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.LxmertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.LxmertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.LxmertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert.py#L223",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),wo=new st({}),yo=new A({props:{name:"class transformers.LxmertTokenizerFast",anchor:"transformers.LxmertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LxmertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.LxmertTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.LxmertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.LxmertTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.LxmertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.LxmertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.LxmertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.LxmertTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.LxmertTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.LxmertTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original Lxmert).`,name:"strip_accents"},{anchor:"transformers.LxmertTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert_fast.py#L48"}}),$o=new A({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.LxmertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.LxmertTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.LxmertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert_fast.py#L136",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),zo=new A({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/tokenization_lxmert_fast.py#L160",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wt=new ar({props:{anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Um]},$$scope:{ctx:O}}}),Eo=new st({}),qo=new A({props:{name:"class transformers.models.lxmert.modeling_lxmert.LxmertModelOutput",anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput",parameters:[{name:"language_output",val:": typing.Optional[torch.FloatTensor] = None"},{name:"vision_output",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_output",val:": typing.Optional[torch.FloatTensor] = None"},{name:"language_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"language_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"cross_encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.language_output",description:`<strong>language_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the language encoder.`,name:"language_output"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.vision_output",description:`<strong>vision_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the visual encoder.`,name:"vision_output"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.pooled_output",description:`<strong>pooled_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) &#x2014;
Last layer hidden-state of the first token of the sequence (classification, CLS, token) further processed
by a Linear layer and a Tanh activation function. The Linear`,name:"pooled_output"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.language_hidden_states",description:`<strong>language_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"language_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.vision_hidden_states",description:`<strong>vision_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"vision_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.language_attentions",description:`<strong>language_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"language_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.vision_attentions",description:`<strong>vision_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"vision_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput.cross_encoder_attentions",description:`<strong>cross_encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"cross_encoder_attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_lxmert.py#L60"}}),Mo=new A({props:{name:"class transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput",anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_logits",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_relationship_score",val:": typing.Optional[torch.FloatTensor] = None"},{name:"question_answering_score",val:": typing.Optional[torch.FloatTensor] = None"},{name:"language_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"language_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"cross_encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.`,name:"loss"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
cross_relationship_score &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>):
Prediction scores of the textual matching objective (classification) head (scores of True/False
continuation before SoftMax).
question_answering_score &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, n_qa_answers)</code>):
Prediction scores of question answering objective (classification).`,name:"prediction_logits"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.language_hidden_states",description:`<strong>language_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"language_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.vision_hidden_states",description:`<strong>vision_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"vision_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.language_attentions",description:`<strong>language_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"language_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.vision_attentions",description:`<strong>vision_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"vision_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput.cross_encoder_attentions",description:`<strong>cross_encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"cross_encoder_attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_lxmert.py#L146"}}),Oo=new A({props:{name:"class transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput",anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"question_answering_score",val:": typing.Optional[torch.FloatTensor] = None"},{name:"language_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"language_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"vision_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"cross_encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.k.
question_answering_score &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, n_qa_answers)</code>, <em>optional</em>):
Prediction scores of question answering objective (classification).`,name:"loss"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.language_hidden_states",description:`<strong>language_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"language_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.vision_hidden_states",description:`<strong>vision_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"vision_hidden_states"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.language_attentions",description:`<strong>language_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"language_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.vision_attentions",description:`<strong>vision_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"vision_attentions"},{anchor:"transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput.cross_encoder_attentions",description:`<strong>cross_encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"cross_encoder_attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_lxmert.py#L106"}}),Co=new A({props:{name:"class transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput",anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput",parameters:[{name:"language_output",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"vision_output",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"pooled_output",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"language_hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"vision_hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"language_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"vision_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"cross_encoder_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.language_output",description:`<strong>language_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the language encoder.`,name:"language_output"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.vision_output",description:`<strong>vision_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the visual encoder.`,name:"vision_output"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.pooled_output",description:`<strong>pooled_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) &#x2014;
Last layer hidden-state of the first token of the sequence (classification, CLS, token) further processed
by a Linear layer and a Tanh activation function. The Linear`,name:"pooled_output"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.language_hidden_states",description:`<strong>language_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.`,name:"language_hidden_states"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.vision_hidden_states",description:`<strong>vision_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.`,name:"vision_hidden_states"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.language_attentions",description:`<strong>language_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"language_attentions"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.vision_attentions",description:`<strong>vision_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"vision_attentions"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput.cross_encoder_attentions",description:`<strong>cross_encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"cross_encoder_attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_tf_lxmert.py#L59"}}),No=new A({props:{name:"class transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput",anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"prediction_logits",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_relationship_score",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"question_answering_score",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"language_hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"vision_hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"language_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"vision_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"cross_encoder_attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.`,name:"loss"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
cross_relationship_score &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>):
Prediction scores of the textual matching objective (classification) head (scores of True/False
continuation before SoftMax).
question_answering_score &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, n_qa_answers)</code>):
Prediction scores of question answering objective (classification).`,name:"prediction_logits"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.language_hidden_states",description:`<strong>language_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.`,name:"language_hidden_states"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.vision_hidden_states",description:`<strong>vision_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.`,name:"vision_hidden_states"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.language_attentions",description:`<strong>language_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"language_attentions"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.vision_attentions",description:`<strong>vision_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"vision_attentions"},{anchor:"transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput.cross_encoder_attentions",description:`<strong>cross_encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.`,name:"cross_encoder_attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_tf_lxmert.py#L105"}}),Io=new st({}),Do=new A({props:{name:"class transformers.LxmertModel",anchor:"transformers.LxmertModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LxmertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertConfig">LxmertConfig</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/lxmert/modeling_lxmert.py#L885"}}),Bo=new A({props:{name:"forward",anchor:"transformers.LxmertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"visual_feats",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_pos",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.LxmertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>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.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
visual_feats &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents visual features. They ROI pooled object features from bounding boxes using a
faster-RCNN model)</p>
<p>These are currently not provided by the transformers library.
visual_pos &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_pos_dim)</code>):
This input represents spacial features corresponding to their relative (via index) visual features. The
pre-trained LXMERT model expects these spacial features to be normalized bounding boxes on a scale of 0 to</p>
<ol>
<li></li>
</ol>
<p>These are currently not provided by the transformers library.`,name:"input_ids"},{anchor:"transformers.LxmertModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LxmertModel.forward.visual_attention_mask",description:`<strong>visual_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"visual_attention_mask"},{anchor:"transformers.LxmertModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LxmertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LxmertModel.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.LxmertModel.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.LxmertModel.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/lxmert/modeling_lxmert.py#L900",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertModelOutput</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/lxmert#transformers.LxmertConfig"
>LxmertConfig</a>) and inputs.</p>
<ul>
<li><strong>language_output</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 language encoder.</li>
<li><strong>vision_output</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 visual encoder.</li>
<li><strong>pooled_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, CLS, token) further processed
by a Linear layer and a Tanh activation function. The Linear</li>
<li><strong>language_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>vision_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>language_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>vision_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_encoder_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xt=new Fn({props:{$$slots:{default:[Km]},$$scope:{ctx:O}}}),Ht=new ar({props:{anchor:"transformers.LxmertModel.forward.example",$$slots:{default:[Gm]},$$scope:{ctx:O}}}),Xo=new st({}),Ho=new A({props:{name:"class transformers.LxmertForPreTraining",anchor:"transformers.LxmertForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LxmertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertConfig">LxmertConfig</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/lxmert/modeling_lxmert.py#L1023"}}),Zo=new A({props:{name:"forward",anchor:"transformers.LxmertForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"visual_feats",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_pos",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"obj_labels",val:": typing.Union[typing.Dict[str, typing.Tuple[torch.FloatTensor, torch.FloatTensor]], NoneType] = None"},{name:"matched_label",val:": typing.Optional[torch.LongTensor] = None"},{name:"ans",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"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LxmertForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>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.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
visual_feats &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents visual features. They ROI pooled object features from bounding boxes using a
faster-RCNN model)</p>
<p>These are currently not provided by the transformers library.
visual_pos &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_pos_dim)</code>):
This input represents spacial features corresponding to their relative (via index) visual features. The
pre-trained LXMERT model expects these spacial features to be normalized bounding boxes on a scale of 0 to</p>
<ol>
<li></li>
</ol>
<p>These are currently not provided by the transformers library.`,name:"input_ids"},{anchor:"transformers.LxmertForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LxmertForPreTraining.forward.visual_attention_mask",description:`<strong>visual_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"visual_attention_mask"},{anchor:"transformers.LxmertForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LxmertForPreTraining.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LxmertForPreTraining.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.LxmertForPreTraining.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.LxmertForPreTraining.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.LxmertForPreTraining.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</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, ..., config.vocab_size]</code>
obj_labels &#x2014; (<code>Dict[Str: Tuple[Torch.FloatTensor, Torch.FloatTensor]]</code>, <em>optional</em>):
each key is named after each one of the visual losses and each element of the tuple is of the shape
<code>(batch_size, num_features)</code> and <code>(batch_size, num_features, visual_feature_dim)</code> for each the label id and
the label score respectively`,name:"labels"},{anchor:"transformers.LxmertForPreTraining.forward.matched_label",description:`<strong>matched_label</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the whether or not the text input matches the image (classification) loss. Input
should be a sequence pair (see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates that the sentence does not match the image,</li>
<li>1 indicates that the sentence does match the image.</li>
</ul>`,name:"matched_label"},{anchor:"transformers.LxmertForPreTraining.forward.ans",description:`<strong>ans</strong> (<code>Torch.Tensor</code> of shape <code>(batch_size)</code>, <em>optional</em>) &#x2014;
a one hot representation hof the correct answer <em>optional</em>`,name:"ans"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_lxmert.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput</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/lxmert#transformers.LxmertConfig"
>LxmertConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.</li>
<li><strong>prediction_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</li>
<li><strong>cross_relationship_score:</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the textual matching objective (classification) head (scores of True/False
continuation before SoftMax).</li>
<li><strong>question_answering_score:</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, n_qa_answers)</code>) \u2014 Prediction scores of question answering objective (classification).</li>
<li><strong>language_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>vision_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>language_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>vision_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_encoder_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kt=new Fn({props:{$$slots:{default:[Jm]},$$scope:{ctx:O}}}),en=new st({}),tn=new A({props:{name:"class transformers.LxmertForQuestionAnswering",anchor:"transformers.LxmertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LxmertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertConfig">LxmertConfig</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/lxmert/modeling_lxmert.py#L1292"}}),ln=new A({props:{name:"forward",anchor:"transformers.LxmertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"visual_feats",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_pos",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"visual_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.LxmertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>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.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
visual_feats &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents visual features. They ROI pooled object features from bounding boxes using a
faster-RCNN model)</p>
<p>These are currently not provided by the transformers library.
visual_pos &#x2014; (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_visual_features, visual_pos_dim)</code>):
This input represents spacial features corresponding to their relative (via index) visual features. The
pre-trained LXMERT model expects these spacial features to be normalized bounding boxes on a scale of 0 to</p>
<ol>
<li></li>
</ol>
<p>These are currently not provided by the transformers library.`,name:"input_ids"},{anchor:"transformers.LxmertForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LxmertForQuestionAnswering.forward.visual_attention_mask",description:`<strong>visual_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"visual_attention_mask"},{anchor:"transformers.LxmertForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LxmertForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LxmertForQuestionAnswering.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.LxmertForQuestionAnswering.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.LxmertForQuestionAnswering.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>labels &#x2014; (<code>Torch.Tensor</code> of shape <code>(batch_size)</code>, <em>optional</em>):
A one-hot representation of the correct answer`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_lxmert.py#L1385",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput</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/lxmert#transformers.LxmertConfig"
>LxmertConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.k.</li>
<li><strong>question_answering_score:</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, n_qa_answers)</code>, <em>optional</em>) \u2014 Prediction scores of question answering objective (classification).</li>
<li><strong>language_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>vision_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 input features + one for the output of each cross-modality layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>language_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>vision_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_encoder_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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jt=new Fn({props:{$$slots:{default:[Ym]},$$scope:{ctx:O}}}),Yt=new ar({props:{anchor:"transformers.LxmertForQuestionAnswering.forward.example",$$slots:{default:[Zm]},$$scope:{ctx:O}}}),dn=new st({}),cn=new A({props:{name:"class transformers.TFLxmertModel",anchor:"transformers.TFLxmertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLxmertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertConfig">LxmertConfig</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/lxmert/modeling_tf_lxmert.py#L944"}}),eo=new Fn({props:{$$slots:{default:[eh]},$$scope:{ctx:O}}}),fn=new A({props:{name:"call",anchor:"transformers.TFLxmertModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"visual_feats",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"visual_pos",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"visual_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFLxmertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>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.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
visual_feats &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents visual features. They ROI pooled object features from bounding boxes using a
faster-RCNN model)</p>
<p>These are currently not provided by the transformers library.
visual_pos &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents spacial features corresponding to their relative (via index) visual features. The
pre-trained LXMERT model expects these spacial features to be normalized bounding boxes on a scale of 0 to</p>
<ol>
<li></li>
</ol>
<p>These are currently not provided by the transformers library.`,name:"input_ids"},{anchor:"transformers.TFLxmertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLxmertModel.call.visual_attention_mask",description:`<strong>visual_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
MMask 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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"visual_attention_mask"},{anchor:"transformers.TFLxmertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLxmertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLxmertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFLxmertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFLxmertModel.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFLxmertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_tf_lxmert.py#L949",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput"
>transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput</a> or a tuple of <code>tf.Tensor</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/lxmert#transformers.LxmertConfig"
>LxmertConfig</a>) and inputs.</p>
<ul>
<li><strong>language_output</strong> (<code>tf.Tensor</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 language encoder.</li>
<li><strong>vision_output</strong> (<code>tf.Tensor</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 visual encoder.</li>
<li><strong>pooled_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification, CLS, token) further processed
by a Linear layer and a Tanh activation function. The Linear</li>
<li><strong>language_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>vision_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>language_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>vision_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_encoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput"
>transformers.models.lxmert.modeling_tf_lxmert.TFLxmertModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),to=new Fn({props:{$$slots:{default:[th]},$$scope:{ctx:O}}}),oo=new ar({props:{anchor:"transformers.TFLxmertModel.call.example",$$slots:{default:[oh]},$$scope:{ctx:O}}}),gn=new st({}),_n=new A({props:{name:"class transformers.TFLxmertForPreTraining",anchor:"transformers.TFLxmertForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLxmertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertConfig">LxmertConfig</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/lxmert/modeling_tf_lxmert.py#L1184"}}),so=new Fn({props:{$$slots:{default:[nh]},$$scope:{ctx:O}}}),yn=new A({props:{name:"call",anchor:"transformers.TFLxmertForPreTraining.call",parameters:[{name:"input_ids",val:" = None"},{name:"visual_feats",val:" = None"},{name:"visual_pos",val:" = None"},{name:"attention_mask",val:" = None"},{name:"visual_attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"masked_lm_labels",val:" = None"},{name:"obj_labels",val:" = None"},{name:"matched_label",val:" = None"},{name:"ans",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"}],parametersDescription:[{anchor:"transformers.TFLxmertForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>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.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
visual_feats &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents visual features. They ROI pooled object features from bounding boxes using a
faster-RCNN model)</p>
<p>These are currently not provided by the transformers library.
visual_pos &#x2014; (<code>tf.Tensor</code> of shape <code>(batch_size, num_visual_features, visual_feat_dim)</code>):
This input represents spacial features corresponding to their relative (via index) visual features. The
pre-trained LXMERT model expects these spacial features to be normalized bounding boxes on a scale of 0 to</p>
<ol>
<li></li>
</ol>
<p>These are currently not provided by the transformers library.`,name:"input_ids"},{anchor:"transformers.TFLxmertForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLxmertForPreTraining.call.visual_attention_mask",description:`<strong>visual_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
MMask 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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"visual_attention_mask"},{anchor:"transformers.TFLxmertForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLxmertForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLxmertForPreTraining.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFLxmertForPreTraining.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFLxmertForPreTraining.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFLxmertForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFLxmertForPreTraining.call.masked_lm_labels",description:`<strong>masked_lm_labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</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, ..., config.vocab_size]</code>
obj_labels &#x2014; (<code>Dict[Str: Tuple[tf.Tensor, tf.Tensor]]</code>, <em>optional</em>, defaults to <code>None</code>):
each key is named after each one of the visual losses and each element of the tuple is of the shape
<code>(batch_size, num_features)</code> and <code>(batch_size, num_features, visual_feature_dim)</code> for each the label id and
the label score respectively`,name:"masked_lm_labels"},{anchor:"transformers.TFLxmertForPreTraining.call.matched_label",description:`<strong>matched_label</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the whether or not the text input matches the image (classification) loss. Input
should be a sequence pair (see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates that the sentence does not match the image,</li>
<li>1 indicates that the sentence does match the image.</li>
</ul>`,name:"matched_label"},{anchor:"transformers.TFLxmertForPreTraining.call.ans",description:`<strong>ans</strong> (<code>Torch.Tensor</code> of shape <code>(batch_size)</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
a one hot representation hof the correct answer <em>optional</em>`,name:"ans"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/lxmert/modeling_tf_lxmert.py#L1284",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput"
>transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</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/lxmert#transformers.LxmertConfig"
>LxmertConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.</li>
<li><strong>prediction_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</li>
<li><strong>cross_relationship_score:</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the textual matching objective (classification) head (scores of True/False
continuation before SoftMax).</li>
<li><strong>question_answering_score:</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, n_qa_answers)</code>) \u2014 Prediction scores of question answering objective (classification).</li>
<li><strong>language_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>vision_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for input features + one for the output of each cross-modality layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</li>
<li><strong>language_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>vision_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
<li><strong>cross_encoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/lxmert#transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput"
>transformers.models.lxmert.modeling_tf_lxmert.TFLxmertForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ro=new Fn({props:{$$slots:{default:[sh]},$$scope:{ctx:O}}}),{c(){h=n("meta"),b=l(),g=n("h1"),_=n("a"),T=n("span"),x(c.$$.fragment),p=l(),q=n("span"),Be=r("LXMERT"),$e=l(),N=n("h2"),ee=n("a"),oe=n("span"),x(F.$$.fragment),Xe=l(),X=n("span"),He=r("Overview"),Fe=l(),R=n("p"),Ue=r("The LXMERT model was proposed in "),ne=n("a"),se=r("LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),Ke=r(` by Hao Tan & Mohit Bansal. It is a series of bidirectional transformer encoders
(one for the vision modality, one for the language modality, and then one to fuse both modalities) pretrained using a
combination of masked language modeling, visual-language text alignment, ROI-feature regression, masked
visual-attribute modeling, masked visual-object modeling, and visual-question answering objectives. The pretraining
consists of multiple multi-modal datasets: MSCOCO, Visual-Genome + Visual-Genome Question Answering, VQA 2.0, and GQA.`),ze=l(),W=n("p"),Ge=r("The abstract from the paper is the following:"),Ee=l(),V=n("p"),Te=n("em"),Je=r(`Vision-and-language reasoning requires an understanding of visual concepts, language semantics, and, most importantly,
the alignment and relationships between these two modalities. We thus propose the LXMERT (Learning Cross-Modality
Encoder Representations from Transformers) framework to learn these vision-and-language connections. In LXMERT, we
build a large-scale Transformer model that consists of three encoders: an object relationship encoder, a language
encoder, and a cross-modality encoder. Next, to endow our model with the capability of connecting vision and language
semantics, we pre-train the model with large amounts of image-and-sentence pairs, via five diverse representative
pretraining tasks: masked language modeling, masked object prediction (feature regression and label classification),
cross-modality matching, and image question answering. These tasks help in learning both intra-modality and
cross-modality relationships. After fine-tuning from our pretrained parameters, our model achieves the state-of-the-art
results on two visual question answering datasets (i.e., VQA and GQA). We also show the generalizability of our
pretrained cross-modality model by adapting it to a challenging visual-reasoning task, NLVR, and improve the previous
best result by 22% absolute (54% to 76%). Lastly, we demonstrate detailed ablation studies to prove that both our novel
model components and pretraining strategies significantly contribute to our strong results; and also present several
attention visualizations for the different encoders`),ge=l(),M=n("p"),j=r("Tips:"),qe=l(),C=n("ul"),be=n("li"),Ye=r(`Bounding boxes are not necessary to be used in the visual feature embeddings, any kind of visual-spacial features
will work.`),re=l(),xe=n("li"),Ze=r(`Both the language hidden states and the visual hidden states that LXMERT outputs are passed through the
cross-modality layer, so they contain information from both modalities. To access a modality that only attends to
itself, select the vision/language hidden states from the first input in the tuple.`),I=l(),we=n("li"),ae=r(`The bidirectional cross-modality encoder attention only returns attention values when the language modality is used
as the input and the vision modality is used as the context vector. Further, while the cross-modality encoder
contains self-attention for each respective modality and cross-attention, only the cross attention is returned and
both self attention outputs are disregarded.`),Me=l(),B=n("p"),ie=r("This model was contributed by "),le=n("a"),et=r("eltoto1219"),H=r(". The original code can be found "),de=n("a"),ce=r("here"),tt=r("."),_e=l(),P=n("h2"),te=n("a"),D=n("span"),x(me.$$.fragment),ot=l(),v=n("span"),E=r("LxmertConfig"),rt=l(),S=n("div"),x(ye.$$.fragment),mt=l(),z=n("p"),ht=r("This is the configuration class to store the configuration of a "),Pe=n("a"),ut=r("LxmertModel"),pt=r(" or a "),Oe=n("a"),U=r("TFLxmertModel"),he=r(`. It is used
to instantiate a LXMERT model according to the specified arguments, defining the model architecture. Instantiating
a configuration with the defaults will yield a similar configuration to that of the Lxmert
`),ke=n("a"),ft=r("unc-nlp/lxmert-base-uncased"),ue=r(" architecture."),gt=l(),pe=n("p"),nt=r("Configuration objects inherit from "),Ae=n("a"),Le=r("PretrainedConfig"),_t=r(` and can be used to control the model outputs. Read the
documentation from `),zn=n("a"),fa=r("PretrainedConfig"),ga=r(" for more information."),dr=l(),vt=n("h2"),It=n("a"),is=n("span"),x(uo.$$.fragment),_a=l(),ls=n("span"),va=r("LxmertTokenizer"),cr=l(),Q=n("div"),x(po.$$.fragment),Ta=l(),ds=n("p"),ba=r("Construct a Lxmert tokenizer. Based on WordPiece."),xa=l(),fo=n("p"),wa=r("This tokenizer inherits from "),En=n("a"),ya=r("PreTrainedTokenizer"),ka=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),La=l(),at=n("div"),x(go.$$.fragment),$a=l(),cs=n("p"),Fa=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),za=l(),_o=n("ul"),qn=n("li"),Ea=r("single sequence: "),ms=n("code"),qa=r("[CLS] X [SEP]"),Ma=l(),Mn=n("li"),Pa=r("pair of sequences: "),hs=n("code"),Oa=r("[CLS] A [SEP] B [SEP]"),Aa=l(),Dt=n("div"),x(vo.$$.fragment),Ca=l(),us=n("p"),Na=r("Converts a sequence of tokens (string) in a single string."),ja=l(),Ce=n("div"),x(To.$$.fragment),Ia=l(),ps=n("p"),Da=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),Sa=l(),x(St.$$.fragment),Ra=l(),Tt=n("p"),Qa=r("If "),fs=n("code"),Wa=r("token_ids_1"),Va=r(" is "),gs=n("code"),Ba=r("None"),Xa=r(", this method only returns the first portion of the mask (0s)."),Ha=l(),Rt=n("div"),x(bo.$$.fragment),Ua=l(),xo=n("p"),Ka=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),_s=n("code"),Ga=r("prepare_for_model"),Ja=r(" method."),mr=l(),bt=n("h2"),Qt=n("a"),vs=n("span"),x(wo.$$.fragment),Ya=l(),Ts=n("span"),Za=r("LxmertTokenizerFast"),hr=l(),fe=n("div"),x(yo.$$.fragment),ei=l(),ko=n("p"),ti=r("Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),bs=n("em"),oi=r("tokenizers"),ni=r(" library). Based on WordPiece."),si=l(),Lo=n("p"),ri=r("This tokenizer inherits from "),Pn=n("a"),ai=r("PreTrainedTokenizerFast"),ii=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),li=l(),it=n("div"),x($o.$$.fragment),di=l(),xs=n("p"),ci=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),mi=l(),Fo=n("ul"),On=n("li"),hi=r("single sequence: "),ws=n("code"),ui=r("[CLS] X [SEP]"),pi=l(),An=n("li"),fi=r("pair of sequences: "),ys=n("code"),gi=r("[CLS] A [SEP] B [SEP]"),_i=l(),Ne=n("div"),x(zo.$$.fragment),vi=l(),ks=n("p"),Ti=r("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),bi=l(),x(Wt.$$.fragment),xi=l(),xt=n("p"),wi=r("If "),Ls=n("code"),yi=r("token_ids_1"),ki=r(" is "),$s=n("code"),Li=r("None"),$i=r(", this method only returns the first portion of the mask (0s)."),ur=l(),wt=n("h2"),Vt=n("a"),Fs=n("span"),x(Eo.$$.fragment),Fi=l(),zs=n("span"),zi=r("Lxmert specific outputs"),pr=l(),yt=n("div"),x(qo.$$.fragment),Ei=l(),Es=n("p"),qi=r(`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),fr=l(),kt=n("div"),x(Mo.$$.fragment),Mi=l(),Po=n("p"),Pi=r("Output type of "),Cn=n("a"),Oi=r("LxmertForPreTraining"),Ai=r("."),gr=l(),Lt=n("div"),x(Oo.$$.fragment),Ci=l(),Ao=n("p"),Ni=r("Output type of "),Nn=n("a"),ji=r("LxmertForQuestionAnswering"),Ii=r("."),_r=l(),$t=n("div"),x(Co.$$.fragment),Di=l(),qs=n("p"),Si=r(`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),vr=l(),Ft=n("div"),x(No.$$.fragment),Ri=l(),jo=n("p"),Qi=r("Output type of "),jn=n("a"),Wi=r("LxmertForPreTraining"),Vi=r("."),Tr=l(),zt=n("h2"),Bt=n("a"),Ms=n("span"),x(Io.$$.fragment),Bi=l(),Ps=n("span"),Xi=r("LxmertModel"),br=l(),K=n("div"),x(Do.$$.fragment),Hi=l(),Os=n("p"),Ui=r("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),Ki=l(),So=n("p"),Gi=r("The LXMERT model was proposed in "),Ro=n("a"),Ji=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Yi=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Zi=l(),Qo=n("p"),el=r("This model inherits from "),In=n("a"),tl=r("PreTrainedModel"),ol=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),nl=l(),Wo=n("p"),sl=r("This model is also a PyTorch "),Vo=n("a"),rl=r("torch.nn.Module"),al=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),il=l(),je=n("div"),x(Bo.$$.fragment),ll=l(),Et=n("p"),dl=r("The "),Dn=n("a"),cl=r("LxmertModel"),ml=r(" forward method, overrides the "),As=n("code"),hl=r("__call__"),ul=r(" special method."),pl=l(),x(Xt.$$.fragment),fl=l(),x(Ht.$$.fragment),xr=l(),qt=n("h2"),Ut=n("a"),Cs=n("span"),x(Xo.$$.fragment),gl=l(),Ns=n("span"),_l=r("LxmertForPreTraining"),wr=l(),G=n("div"),x(Ho.$$.fragment),vl=l(),js=n("p"),Tl=r("Lxmert Model with a specified pretraining head on top."),bl=l(),Uo=n("p"),xl=r("The LXMERT model was proposed in "),Ko=n("a"),wl=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),yl=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),kl=l(),Go=n("p"),Ll=r("This model inherits from "),Sn=n("a"),$l=r("PreTrainedModel"),Fl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zl=l(),Jo=n("p"),El=r("This model is also a PyTorch "),Yo=n("a"),ql=r("torch.nn.Module"),Ml=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pl=l(),lt=n("div"),x(Zo.$$.fragment),Ol=l(),Mt=n("p"),Al=r("The "),Rn=n("a"),Cl=r("LxmertForPreTraining"),Nl=r(" forward method, overrides the "),Is=n("code"),jl=r("__call__"),Il=r(" special method."),Dl=l(),x(Kt.$$.fragment),yr=l(),Pt=n("h2"),Gt=n("a"),Ds=n("span"),x(en.$$.fragment),Sl=l(),Ss=n("span"),Rl=r("LxmertForQuestionAnswering"),kr=l(),J=n("div"),x(tn.$$.fragment),Ql=l(),Rs=n("p"),Wl=r("Lxmert Model with a visual-answering head on top for downstream QA tasks"),Vl=l(),on=n("p"),Bl=r("The LXMERT model was proposed in "),nn=n("a"),Xl=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Hl=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Ul=l(),sn=n("p"),Kl=r("This model inherits from "),Qn=n("a"),Gl=r("PreTrainedModel"),Jl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yl=l(),rn=n("p"),Zl=r("This model is also a PyTorch "),an=n("a"),ed=r("torch.nn.Module"),td=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),od=l(),Ie=n("div"),x(ln.$$.fragment),nd=l(),Ot=n("p"),sd=r("The "),Wn=n("a"),rd=r("LxmertForQuestionAnswering"),ad=r(" forward method, overrides the "),Qs=n("code"),id=r("__call__"),ld=r(" special method."),dd=l(),x(Jt.$$.fragment),cd=l(),x(Yt.$$.fragment),Lr=l(),At=n("h2"),Zt=n("a"),Ws=n("span"),x(dn.$$.fragment),md=l(),Vs=n("span"),hd=r("TFLxmertModel"),$r=l(),Y=n("div"),x(cn.$$.fragment),ud=l(),Bs=n("p"),pd=r("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),fd=l(),mn=n("p"),gd=r("The LXMERT model was proposed in "),hn=n("a"),_d=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),vd=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Td=l(),un=n("p"),bd=r("This model is also a "),pn=n("a"),xd=r("tf.keras.Model"),wd=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),yd=l(),x(eo.$$.fragment),kd=l(),De=n("div"),x(fn.$$.fragment),Ld=l(),Ct=n("p"),$d=r("The "),Vn=n("a"),Fd=r("TFLxmertModel"),zd=r(" forward method, overrides the "),Xs=n("code"),Ed=r("__call__"),qd=r(" special method."),Md=l(),x(to.$$.fragment),Pd=l(),x(oo.$$.fragment),Fr=l(),Nt=n("h2"),no=n("a"),Hs=n("span"),x(gn.$$.fragment),Od=l(),Us=n("span"),Ad=r("TFLxmertForPreTraining"),zr=l(),Z=n("div"),x(_n.$$.fragment),Cd=l(),vn=n("p"),Nd=r("Lxmert Model with a "),Ks=n("code"),jd=r("language modeling"),Id=r(" head on top."),Dd=l(),Tn=n("p"),Sd=r("The LXMERT model was proposed in "),bn=n("a"),Rd=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Qd=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Wd=l(),xn=n("p"),Vd=r("This model is also a "),wn=n("a"),Bd=r("tf.keras.Model"),Xd=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hd=l(),x(so.$$.fragment),Ud=l(),dt=n("div"),x(yn.$$.fragment),Kd=l(),jt=n("p"),Gd=r("The "),Bn=n("a"),Jd=r("TFLxmertForPreTraining"),Yd=r(" forward method, overrides the "),Gs=n("code"),Zd=r("__call__"),ec=r(" special method."),tc=l(),x(ro.$$.fragment),this.h()},l(o){const f=Bm('[data-svelte="svelte-1phssyn"]',document.head);h=s(f,"META",{name:!0,content:!0}),f.forEach(t),b=d(o),g=s(o,"H1",{class:!0});var kn=i(g);_=s(kn,"A",{id:!0,class:!0,href:!0});var Js=i(_);T=s(Js,"SPAN",{});var Ys=i(T);w(c.$$.fragment,Ys),Ys.forEach(t),Js.forEach(t),p=d(kn),q=s(kn,"SPAN",{});var Zs=i(q);Be=a(Zs,"LXMERT"),Zs.forEach(t),kn.forEach(t),$e=d(o),N=s(o,"H2",{class:!0});var Ln=i(N);ee=s(Ln,"A",{id:!0,class:!0,href:!0});var er=i(ee);oe=s(er,"SPAN",{});var tr=i(oe);w(F.$$.fragment,tr),tr.forEach(t),er.forEach(t),Xe=d(Ln),X=s(Ln,"SPAN",{});var or=i(X);He=a(or,"Overview"),or.forEach(t),Ln.forEach(t),Fe=d(o),R=s(o,"P",{});var $n=i(R);Ue=a($n,"The LXMERT model was proposed in "),ne=s($n,"A",{href:!0,rel:!0});var nr=i(ne);se=a(nr,"LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),nr.forEach(t),Ke=a($n,` by Hao Tan & Mohit Bansal. It is a series of bidirectional transformer encoders
(one for the vision modality, one for the language modality, and then one to fuse both modalities) pretrained using a
combination of masked language modeling, visual-language text alignment, ROI-feature regression, masked
visual-attribute modeling, masked visual-object modeling, and visual-question answering objectives. The pretraining
consists of multiple multi-modal datasets: MSCOCO, Visual-Genome + Visual-Genome Question Answering, VQA 2.0, and GQA.`),$n.forEach(t),ze=d(o),W=s(o,"P",{});var sr=i(W);Ge=a(sr,"The abstract from the paper is the following:"),sr.forEach(t),Ee=d(o),V=s(o,"P",{});var rr=i(V);Te=s(rr,"EM",{});var ac=i(Te);Je=a(ac,`Vision-and-language reasoning requires an understanding of visual concepts, language semantics, and, most importantly,
the alignment and relationships between these two modalities. We thus propose the LXMERT (Learning Cross-Modality
Encoder Representations from Transformers) framework to learn these vision-and-language connections. In LXMERT, we
build a large-scale Transformer model that consists of three encoders: an object relationship encoder, a language
encoder, and a cross-modality encoder. Next, to endow our model with the capability of connecting vision and language
semantics, we pre-train the model with large amounts of image-and-sentence pairs, via five diverse representative
pretraining tasks: masked language modeling, masked object prediction (feature regression and label classification),
cross-modality matching, and image question answering. These tasks help in learning both intra-modality and
cross-modality relationships. After fine-tuning from our pretrained parameters, our model achieves the state-of-the-art
results on two visual question answering datasets (i.e., VQA and GQA). We also show the generalizability of our
pretrained cross-modality model by adapting it to a challenging visual-reasoning task, NLVR, and improve the previous
best result by 22% absolute (54% to 76%). Lastly, we demonstrate detailed ablation studies to prove that both our novel
model components and pretraining strategies significantly contribute to our strong results; and also present several
attention visualizations for the different encoders`),ac.forEach(t),rr.forEach(t),ge=d(o),M=s(o,"P",{});var ic=i(M);j=a(ic,"Tips:"),ic.forEach(t),qe=d(o),C=s(o,"UL",{});var Xn=i(C);be=s(Xn,"LI",{});var lc=i(be);Ye=a(lc,`Bounding boxes are not necessary to be used in the visual feature embeddings, any kind of visual-spacial features
will work.`),lc.forEach(t),re=d(Xn),xe=s(Xn,"LI",{});var dc=i(xe);Ze=a(dc,`Both the language hidden states and the visual hidden states that LXMERT outputs are passed through the
cross-modality layer, so they contain information from both modalities. To access a modality that only attends to
itself, select the vision/language hidden states from the first input in the tuple.`),dc.forEach(t),I=d(Xn),we=s(Xn,"LI",{});var cc=i(we);ae=a(cc,`The bidirectional cross-modality encoder attention only returns attention values when the language modality is used
as the input and the vision modality is used as the context vector. Further, while the cross-modality encoder
contains self-attention for each respective modality and cross-attention, only the cross attention is returned and
both self attention outputs are disregarded.`),cc.forEach(t),Xn.forEach(t),Me=d(o),B=s(o,"P",{});var Hn=i(B);ie=a(Hn,"This model was contributed by "),le=s(Hn,"A",{href:!0,rel:!0});var mc=i(le);et=a(mc,"eltoto1219"),mc.forEach(t),H=a(Hn,". The original code can be found "),de=s(Hn,"A",{href:!0,rel:!0});var hc=i(de);ce=a(hc,"here"),hc.forEach(t),tt=a(Hn,"."),Hn.forEach(t),_e=d(o),P=s(o,"H2",{class:!0});var qr=i(P);te=s(qr,"A",{id:!0,class:!0,href:!0});var uc=i(te);D=s(uc,"SPAN",{});var pc=i(D);w(me.$$.fragment,pc),pc.forEach(t),uc.forEach(t),ot=d(qr),v=s(qr,"SPAN",{});var fc=i(v);E=a(fc,"LxmertConfig"),fc.forEach(t),qr.forEach(t),rt=d(o),S=s(o,"DIV",{class:!0});var Un=i(S);w(ye.$$.fragment,Un),mt=d(Un),z=s(Un,"P",{});var ao=i(z);ht=a(ao,"This is the configuration class to store the configuration of a "),Pe=s(ao,"A",{href:!0});var gc=i(Pe);ut=a(gc,"LxmertModel"),gc.forEach(t),pt=a(ao," or a "),Oe=s(ao,"A",{href:!0});var _c=i(Oe);U=a(_c,"TFLxmertModel"),_c.forEach(t),he=a(ao,`. It is used
to instantiate a LXMERT model according to the specified arguments, defining the model architecture. Instantiating
a configuration with the defaults will yield a similar configuration to that of the Lxmert
`),ke=s(ao,"A",{href:!0,rel:!0});var vc=i(ke);ft=a(vc,"unc-nlp/lxmert-base-uncased"),vc.forEach(t),ue=a(ao," architecture."),ao.forEach(t),gt=d(Un),pe=s(Un,"P",{});var Kn=i(pe);nt=a(Kn,"Configuration objects inherit from "),Ae=s(Kn,"A",{href:!0});var Tc=i(Ae);Le=a(Tc,"PretrainedConfig"),Tc.forEach(t),_t=a(Kn,` and can be used to control the model outputs. Read the
documentation from `),zn=s(Kn,"A",{href:!0});var bc=i(zn);fa=a(bc,"PretrainedConfig"),bc.forEach(t),ga=a(Kn," for more information."),Kn.forEach(t),Un.forEach(t),dr=d(o),vt=s(o,"H2",{class:!0});var Mr=i(vt);It=s(Mr,"A",{id:!0,class:!0,href:!0});var xc=i(It);is=s(xc,"SPAN",{});var wc=i(is);w(uo.$$.fragment,wc),wc.forEach(t),xc.forEach(t),_a=d(Mr),ls=s(Mr,"SPAN",{});var yc=i(ls);va=a(yc,"LxmertTokenizer"),yc.forEach(t),Mr.forEach(t),cr=d(o),Q=s(o,"DIV",{class:!0});var ve=i(Q);w(po.$$.fragment,ve),Ta=d(ve),ds=s(ve,"P",{});var kc=i(ds);ba=a(kc,"Construct a Lxmert tokenizer. Based on WordPiece."),kc.forEach(t),xa=d(ve),fo=s(ve,"P",{});var Pr=i(fo);wa=a(Pr,"This tokenizer inherits from "),En=s(Pr,"A",{href:!0});var Lc=i(En);ya=a(Lc,"PreTrainedTokenizer"),Lc.forEach(t),ka=a(Pr,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Pr.forEach(t),La=d(ve),at=s(ve,"DIV",{class:!0});var Gn=i(at);w(go.$$.fragment,Gn),$a=d(Gn),cs=s(Gn,"P",{});var $c=i(cs);Fa=a($c,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),$c.forEach(t),za=d(Gn),_o=s(Gn,"UL",{});var Or=i(_o);qn=s(Or,"LI",{});var oc=i(qn);Ea=a(oc,"single sequence: "),ms=s(oc,"CODE",{});var Fc=i(ms);qa=a(Fc,"[CLS] X [SEP]"),Fc.forEach(t),oc.forEach(t),Ma=d(Or),Mn=s(Or,"LI",{});var nc=i(Mn);Pa=a(nc,"pair of sequences: "),hs=s(nc,"CODE",{});var zc=i(hs);Oa=a(zc,"[CLS] A [SEP] B [SEP]"),zc.forEach(t),nc.forEach(t),Or.forEach(t),Gn.forEach(t),Aa=d(ve),Dt=s(ve,"DIV",{class:!0});var Ar=i(Dt);w(vo.$$.fragment,Ar),Ca=d(Ar),us=s(Ar,"P",{});var Ec=i(us);Na=a(Ec,"Converts a sequence of tokens (string) in a single string."),Ec.forEach(t),Ar.forEach(t),ja=d(ve),Ce=s(ve,"DIV",{class:!0});var io=i(Ce);w(To.$$.fragment,io),Ia=d(io),ps=s(io,"P",{});var qc=i(ps);Da=a(qc,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),qc.forEach(t),Sa=d(io),w(St.$$.fragment,io),Ra=d(io),Tt=s(io,"P",{});var Jn=i(Tt);Qa=a(Jn,"If "),fs=s(Jn,"CODE",{});var Mc=i(fs);Wa=a(Mc,"token_ids_1"),Mc.forEach(t),Va=a(Jn," is "),gs=s(Jn,"CODE",{});var Pc=i(gs);Ba=a(Pc,"None"),Pc.forEach(t),Xa=a(Jn,", this method only returns the first portion of the mask (0s)."),Jn.forEach(t),io.forEach(t),Ha=d(ve),Rt=s(ve,"DIV",{class:!0});var Cr=i(Rt);w(bo.$$.fragment,Cr),Ua=d(Cr),xo=s(Cr,"P",{});var Nr=i(xo);Ka=a(Nr,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),_s=s(Nr,"CODE",{});var Oc=i(_s);Ga=a(Oc,"prepare_for_model"),Oc.forEach(t),Ja=a(Nr," method."),Nr.forEach(t),Cr.forEach(t),ve.forEach(t),mr=d(o),bt=s(o,"H2",{class:!0});var jr=i(bt);Qt=s(jr,"A",{id:!0,class:!0,href:!0});var Ac=i(Qt);vs=s(Ac,"SPAN",{});var Cc=i(vs);w(wo.$$.fragment,Cc),Cc.forEach(t),Ac.forEach(t),Ya=d(jr),Ts=s(jr,"SPAN",{});var Nc=i(Ts);Za=a(Nc,"LxmertTokenizerFast"),Nc.forEach(t),jr.forEach(t),hr=d(o),fe=s(o,"DIV",{class:!0});var ct=i(fe);w(yo.$$.fragment,ct),ei=d(ct),ko=s(ct,"P",{});var Ir=i(ko);ti=a(Ir,"Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),bs=s(Ir,"EM",{});var jc=i(bs);oi=a(jc,"tokenizers"),jc.forEach(t),ni=a(Ir," library). Based on WordPiece."),Ir.forEach(t),si=d(ct),Lo=s(ct,"P",{});var Dr=i(Lo);ri=a(Dr,"This tokenizer inherits from "),Pn=s(Dr,"A",{href:!0});var Ic=i(Pn);ai=a(Ic,"PreTrainedTokenizerFast"),Ic.forEach(t),ii=a(Dr,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Dr.forEach(t),li=d(ct),it=s(ct,"DIV",{class:!0});var Yn=i(it);w($o.$$.fragment,Yn),di=d(Yn),xs=s(Yn,"P",{});var Dc=i(xs);ci=a(Dc,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),Dc.forEach(t),mi=d(Yn),Fo=s(Yn,"UL",{});var Sr=i(Fo);On=s(Sr,"LI",{});var sc=i(On);hi=a(sc,"single sequence: "),ws=s(sc,"CODE",{});var Sc=i(ws);ui=a(Sc,"[CLS] X [SEP]"),Sc.forEach(t),sc.forEach(t),pi=d(Sr),An=s(Sr,"LI",{});var rc=i(An);fi=a(rc,"pair of sequences: "),ys=s(rc,"CODE",{});var Rc=i(ys);gi=a(Rc,"[CLS] A [SEP] B [SEP]"),Rc.forEach(t),rc.forEach(t),Sr.forEach(t),Yn.forEach(t),_i=d(ct),Ne=s(ct,"DIV",{class:!0});var lo=i(Ne);w(zo.$$.fragment,lo),vi=d(lo),ks=s(lo,"P",{});var Qc=i(ks);Ti=a(Qc,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),Qc.forEach(t),bi=d(lo),w(Wt.$$.fragment,lo),xi=d(lo),xt=s(lo,"P",{});var Zn=i(xt);wi=a(Zn,"If "),Ls=s(Zn,"CODE",{});var Wc=i(Ls);yi=a(Wc,"token_ids_1"),Wc.forEach(t),ki=a(Zn," is "),$s=s(Zn,"CODE",{});var Vc=i($s);Li=a(Vc,"None"),Vc.forEach(t),$i=a(Zn,", this method only returns the first portion of the mask (0s)."),Zn.forEach(t),lo.forEach(t),ct.forEach(t),ur=d(o),wt=s(o,"H2",{class:!0});var Rr=i(wt);Vt=s(Rr,"A",{id:!0,class:!0,href:!0});var Bc=i(Vt);Fs=s(Bc,"SPAN",{});var Xc=i(Fs);w(Eo.$$.fragment,Xc),Xc.forEach(t),Bc.forEach(t),Fi=d(Rr),zs=s(Rr,"SPAN",{});var Hc=i(zs);zi=a(Hc,"Lxmert specific outputs"),Hc.forEach(t),Rr.forEach(t),pr=d(o),yt=s(o,"DIV",{class:!0});var Qr=i(yt);w(qo.$$.fragment,Qr),Ei=d(Qr),Es=s(Qr,"P",{});var Uc=i(Es);qi=a(Uc,`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),Uc.forEach(t),Qr.forEach(t),fr=d(o),kt=s(o,"DIV",{class:!0});var Wr=i(kt);w(Mo.$$.fragment,Wr),Mi=d(Wr),Po=s(Wr,"P",{});var Vr=i(Po);Pi=a(Vr,"Output type of "),Cn=s(Vr,"A",{href:!0});var Kc=i(Cn);Oi=a(Kc,"LxmertForPreTraining"),Kc.forEach(t),Ai=a(Vr,"."),Vr.forEach(t),Wr.forEach(t),gr=d(o),Lt=s(o,"DIV",{class:!0});var Br=i(Lt);w(Oo.$$.fragment,Br),Ci=d(Br),Ao=s(Br,"P",{});var Xr=i(Ao);Ni=a(Xr,"Output type of "),Nn=s(Xr,"A",{href:!0});var Gc=i(Nn);ji=a(Gc,"LxmertForQuestionAnswering"),Gc.forEach(t),Ii=a(Xr,"."),Xr.forEach(t),Br.forEach(t),_r=d(o),$t=s(o,"DIV",{class:!0});var Hr=i($t);w(Co.$$.fragment,Hr),Di=d(Hr),qs=s(Hr,"P",{});var Jc=i(qs);Si=a(Jc,`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),Jc.forEach(t),Hr.forEach(t),vr=d(o),Ft=s(o,"DIV",{class:!0});var Ur=i(Ft);w(No.$$.fragment,Ur),Ri=d(Ur),jo=s(Ur,"P",{});var Kr=i(jo);Qi=a(Kr,"Output type of "),jn=s(Kr,"A",{href:!0});var Yc=i(jn);Wi=a(Yc,"LxmertForPreTraining"),Yc.forEach(t),Vi=a(Kr,"."),Kr.forEach(t),Ur.forEach(t),Tr=d(o),zt=s(o,"H2",{class:!0});var Gr=i(zt);Bt=s(Gr,"A",{id:!0,class:!0,href:!0});var Zc=i(Bt);Ms=s(Zc,"SPAN",{});var em=i(Ms);w(Io.$$.fragment,em),em.forEach(t),Zc.forEach(t),Bi=d(Gr),Ps=s(Gr,"SPAN",{});var tm=i(Ps);Xi=a(tm,"LxmertModel"),tm.forEach(t),Gr.forEach(t),br=d(o),K=s(o,"DIV",{class:!0});var Se=i(K);w(Do.$$.fragment,Se),Hi=d(Se),Os=s(Se,"P",{});var om=i(Os);Ui=a(om,"The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),om.forEach(t),Ki=d(Se),So=s(Se,"P",{});var Jr=i(So);Gi=a(Jr,"The LXMERT model was proposed in "),Ro=s(Jr,"A",{href:!0,rel:!0});var nm=i(Ro);Ji=a(nm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),nm.forEach(t),Yi=a(Jr,` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Jr.forEach(t),Zi=d(Se),Qo=s(Se,"P",{});var Yr=i(Qo);el=a(Yr,"This model inherits from "),In=s(Yr,"A",{href:!0});var sm=i(In);tl=a(sm,"PreTrainedModel"),sm.forEach(t),ol=a(Yr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yr.forEach(t),nl=d(Se),Wo=s(Se,"P",{});var Zr=i(Wo);sl=a(Zr,"This model is also a PyTorch "),Vo=s(Zr,"A",{href:!0,rel:!0});var rm=i(Vo);rl=a(rm,"torch.nn.Module"),rm.forEach(t),al=a(Zr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zr.forEach(t),il=d(Se),je=s(Se,"DIV",{class:!0});var co=i(je);w(Bo.$$.fragment,co),ll=d(co),Et=s(co,"P",{});var es=i(Et);dl=a(es,"The "),Dn=s(es,"A",{href:!0});var am=i(Dn);cl=a(am,"LxmertModel"),am.forEach(t),ml=a(es," forward method, overrides the "),As=s(es,"CODE",{});var im=i(As);hl=a(im,"__call__"),im.forEach(t),ul=a(es," special method."),es.forEach(t),pl=d(co),w(Xt.$$.fragment,co),fl=d(co),w(Ht.$$.fragment,co),co.forEach(t),Se.forEach(t),xr=d(o),qt=s(o,"H2",{class:!0});var ea=i(qt);Ut=s(ea,"A",{id:!0,class:!0,href:!0});var lm=i(Ut);Cs=s(lm,"SPAN",{});var dm=i(Cs);w(Xo.$$.fragment,dm),dm.forEach(t),lm.forEach(t),gl=d(ea),Ns=s(ea,"SPAN",{});var cm=i(Ns);_l=a(cm,"LxmertForPreTraining"),cm.forEach(t),ea.forEach(t),wr=d(o),G=s(o,"DIV",{class:!0});var Re=i(G);w(Ho.$$.fragment,Re),vl=d(Re),js=s(Re,"P",{});var mm=i(js);Tl=a(mm,"Lxmert Model with a specified pretraining head on top."),mm.forEach(t),bl=d(Re),Uo=s(Re,"P",{});var ta=i(Uo);xl=a(ta,"The LXMERT model was proposed in "),Ko=s(ta,"A",{href:!0,rel:!0});var hm=i(Ko);wl=a(hm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),hm.forEach(t),yl=a(ta,` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),ta.forEach(t),kl=d(Re),Go=s(Re,"P",{});var oa=i(Go);Ll=a(oa,"This model inherits from "),Sn=s(oa,"A",{href:!0});var um=i(Sn);$l=a(um,"PreTrainedModel"),um.forEach(t),Fl=a(oa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),oa.forEach(t),zl=d(Re),Jo=s(Re,"P",{});var na=i(Jo);El=a(na,"This model is also a PyTorch "),Yo=s(na,"A",{href:!0,rel:!0});var pm=i(Yo);ql=a(pm,"torch.nn.Module"),pm.forEach(t),Ml=a(na,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),na.forEach(t),Pl=d(Re),lt=s(Re,"DIV",{class:!0});var ts=i(lt);w(Zo.$$.fragment,ts),Ol=d(ts),Mt=s(ts,"P",{});var os=i(Mt);Al=a(os,"The "),Rn=s(os,"A",{href:!0});var fm=i(Rn);Cl=a(fm,"LxmertForPreTraining"),fm.forEach(t),Nl=a(os," forward method, overrides the "),Is=s(os,"CODE",{});var gm=i(Is);jl=a(gm,"__call__"),gm.forEach(t),Il=a(os," special method."),os.forEach(t),Dl=d(ts),w(Kt.$$.fragment,ts),ts.forEach(t),Re.forEach(t),yr=d(o),Pt=s(o,"H2",{class:!0});var sa=i(Pt);Gt=s(sa,"A",{id:!0,class:!0,href:!0});var _m=i(Gt);Ds=s(_m,"SPAN",{});var vm=i(Ds);w(en.$$.fragment,vm),vm.forEach(t),_m.forEach(t),Sl=d(sa),Ss=s(sa,"SPAN",{});var Tm=i(Ss);Rl=a(Tm,"LxmertForQuestionAnswering"),Tm.forEach(t),sa.forEach(t),kr=d(o),J=s(o,"DIV",{class:!0});var Qe=i(J);w(tn.$$.fragment,Qe),Ql=d(Qe),Rs=s(Qe,"P",{});var bm=i(Rs);Wl=a(bm,"Lxmert Model with a visual-answering head on top for downstream QA tasks"),bm.forEach(t),Vl=d(Qe),on=s(Qe,"P",{});var ra=i(on);Bl=a(ra,"The LXMERT model was proposed in "),nn=s(ra,"A",{href:!0,rel:!0});var xm=i(nn);Xl=a(xm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),xm.forEach(t),Hl=a(ra,` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),ra.forEach(t),Ul=d(Qe),sn=s(Qe,"P",{});var aa=i(sn);Kl=a(aa,"This model inherits from "),Qn=s(aa,"A",{href:!0});var wm=i(Qn);Gl=a(wm,"PreTrainedModel"),wm.forEach(t),Jl=a(aa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),aa.forEach(t),Yl=d(Qe),rn=s(Qe,"P",{});var ia=i(rn);Zl=a(ia,"This model is also a PyTorch "),an=s(ia,"A",{href:!0,rel:!0});var ym=i(an);ed=a(ym,"torch.nn.Module"),ym.forEach(t),td=a(ia,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ia.forEach(t),od=d(Qe),Ie=s(Qe,"DIV",{class:!0});var mo=i(Ie);w(ln.$$.fragment,mo),nd=d(mo),Ot=s(mo,"P",{});var ns=i(Ot);sd=a(ns,"The "),Wn=s(ns,"A",{href:!0});var km=i(Wn);rd=a(km,"LxmertForQuestionAnswering"),km.forEach(t),ad=a(ns," forward method, overrides the "),Qs=s(ns,"CODE",{});var Lm=i(Qs);id=a(Lm,"__call__"),Lm.forEach(t),ld=a(ns," special method."),ns.forEach(t),dd=d(mo),w(Jt.$$.fragment,mo),cd=d(mo),w(Yt.$$.fragment,mo),mo.forEach(t),Qe.forEach(t),Lr=d(o),At=s(o,"H2",{class:!0});var la=i(At);Zt=s(la,"A",{id:!0,class:!0,href:!0});var $m=i(Zt);Ws=s($m,"SPAN",{});var Fm=i(Ws);w(dn.$$.fragment,Fm),Fm.forEach(t),$m.forEach(t),md=d(la),Vs=s(la,"SPAN",{});var zm=i(Vs);hd=a(zm,"TFLxmertModel"),zm.forEach(t),la.forEach(t),$r=d(o),Y=s(o,"DIV",{class:!0});var We=i(Y);w(cn.$$.fragment,We),ud=d(We),Bs=s(We,"P",{});var Em=i(Bs);pd=a(Em,"The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),Em.forEach(t),fd=d(We),mn=s(We,"P",{});var da=i(mn);gd=a(da,"The LXMERT model was proposed in "),hn=s(da,"A",{href:!0,rel:!0});var qm=i(hn);_d=a(qm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),qm.forEach(t),vd=a(da,` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),da.forEach(t),Td=d(We),un=s(We,"P",{});var ca=i(un);bd=a(ca,"This model is also a "),pn=s(ca,"A",{href:!0,rel:!0});var Mm=i(pn);xd=a(Mm,"tf.keras.Model"),Mm.forEach(t),wd=a(ca,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ca.forEach(t),yd=d(We),w(eo.$$.fragment,We),kd=d(We),De=s(We,"DIV",{class:!0});var ho=i(De);w(fn.$$.fragment,ho),Ld=d(ho),Ct=s(ho,"P",{});var ss=i(Ct);$d=a(ss,"The "),Vn=s(ss,"A",{href:!0});var Pm=i(Vn);Fd=a(Pm,"TFLxmertModel"),Pm.forEach(t),zd=a(ss," forward method, overrides the "),Xs=s(ss,"CODE",{});var Om=i(Xs);Ed=a(Om,"__call__"),Om.forEach(t),qd=a(ss," special method."),ss.forEach(t),Md=d(ho),w(to.$$.fragment,ho),Pd=d(ho),w(oo.$$.fragment,ho),ho.forEach(t),We.forEach(t),Fr=d(o),Nt=s(o,"H2",{class:!0});var ma=i(Nt);no=s(ma,"A",{id:!0,class:!0,href:!0});var Am=i(no);Hs=s(Am,"SPAN",{});var Cm=i(Hs);w(gn.$$.fragment,Cm),Cm.forEach(t),Am.forEach(t),Od=d(ma),Us=s(ma,"SPAN",{});var Nm=i(Us);Ad=a(Nm,"TFLxmertForPreTraining"),Nm.forEach(t),ma.forEach(t),zr=d(o),Z=s(o,"DIV",{class:!0});var Ve=i(Z);w(_n.$$.fragment,Ve),Cd=d(Ve),vn=s(Ve,"P",{});var ha=i(vn);Nd=a(ha,"Lxmert Model with a "),Ks=s(ha,"CODE",{});var jm=i(Ks);jd=a(jm,"language modeling"),jm.forEach(t),Id=a(ha," head on top."),ha.forEach(t),Dd=d(Ve),Tn=s(Ve,"P",{});var ua=i(Tn);Sd=a(ua,"The LXMERT model was proposed in "),bn=s(ua,"A",{href:!0,rel:!0});var Im=i(bn);Rd=a(Im,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Im.forEach(t),Qd=a(ua,` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),ua.forEach(t),Wd=d(Ve),xn=s(Ve,"P",{});var pa=i(xn);Vd=a(pa,"This model is also a "),wn=s(pa,"A",{href:!0,rel:!0});var Dm=i(wn);Bd=a(Dm,"tf.keras.Model"),Dm.forEach(t),Xd=a(pa,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),pa.forEach(t),Hd=d(Ve),w(so.$$.fragment,Ve),Ud=d(Ve),dt=s(Ve,"DIV",{class:!0});var rs=i(dt);w(yn.$$.fragment,rs),Kd=d(rs),jt=s(rs,"P",{});var as=i(jt);Gd=a(as,"The "),Bn=s(as,"A",{href:!0});var Sm=i(Bn);Jd=a(Sm,"TFLxmertForPreTraining"),Sm.forEach(t),Yd=a(as," forward method, overrides the "),Gs=s(as,"CODE",{});var Rm=i(Gs);Zd=a(Rm,"__call__"),Rm.forEach(t),ec=a(as," special method."),as.forEach(t),tc=d(rs),w(ro.$$.fragment,rs),rs.forEach(t),Ve.forEach(t),this.h()},h(){m(h,"name","hf:doc:metadata"),m(h,"content",JSON.stringify(ah)),m(_,"id","lxmert"),m(_,"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"),m(_,"href","#lxmert"),m(g,"class","relative group"),m(ee,"id","overview"),m(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"),m(ee,"href","#overview"),m(N,"class","relative group"),m(ne,"href","https://arxiv.org/abs/1908.07490"),m(ne,"rel","nofollow"),m(le,"href","https://huggingface.co/eltoto1219"),m(le,"rel","nofollow"),m(de,"href","https://github.com/airsplay/lxmert"),m(de,"rel","nofollow"),m(te,"id","transformers.LxmertConfig"),m(te,"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"),m(te,"href","#transformers.LxmertConfig"),m(P,"class","relative group"),m(Pe,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertModel"),m(Oe,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.TFLxmertModel"),m(ke,"href","https://huggingface.co/unc-nlp/lxmert-base-uncased"),m(ke,"rel","nofollow"),m(Ae,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(zn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(It,"id","transformers.LxmertTokenizer"),m(It,"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"),m(It,"href","#transformers.LxmertTokenizer"),m(vt,"class","relative group"),m(En,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qt,"id","transformers.LxmertTokenizerFast"),m(Qt,"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"),m(Qt,"href","#transformers.LxmertTokenizerFast"),m(bt,"class","relative group"),m(Pn,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vt,"id","transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"),m(Vt,"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"),m(Vt,"href","#transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"),m(wt,"class","relative group"),m(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Cn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertForPreTraining"),m(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Nn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertForQuestionAnswering"),m(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertForPreTraining"),m(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bt,"id","transformers.LxmertModel"),m(Bt,"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"),m(Bt,"href","#transformers.LxmertModel"),m(zt,"class","relative group"),m(Ro,"href","https://arxiv.org/abs/1908.07490"),m(Ro,"rel","nofollow"),m(In,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(Vo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Vo,"rel","nofollow"),m(Dn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertModel"),m(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ut,"id","transformers.LxmertForPreTraining"),m(Ut,"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"),m(Ut,"href","#transformers.LxmertForPreTraining"),m(qt,"class","relative group"),m(Ko,"href","https://arxiv.org/abs/1908.07490"),m(Ko,"rel","nofollow"),m(Sn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(Yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Yo,"rel","nofollow"),m(Rn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertForPreTraining"),m(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Gt,"id","transformers.LxmertForQuestionAnswering"),m(Gt,"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"),m(Gt,"href","#transformers.LxmertForQuestionAnswering"),m(Pt,"class","relative group"),m(nn,"href","https://arxiv.org/abs/1908.07490"),m(nn,"rel","nofollow"),m(Qn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),m(an,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(an,"rel","nofollow"),m(Wn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.LxmertForQuestionAnswering"),m(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(Zt,"id","transformers.TFLxmertModel"),m(Zt,"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"),m(Zt,"href","#transformers.TFLxmertModel"),m(At,"class","relative group"),m(hn,"href","https://arxiv.org/abs/1908.07490"),m(hn,"rel","nofollow"),m(pn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(pn,"rel","nofollow"),m(Vn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.TFLxmertModel"),m(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(no,"id","transformers.TFLxmertForPreTraining"),m(no,"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"),m(no,"href","#transformers.TFLxmertForPreTraining"),m(Nt,"class","relative group"),m(bn,"href","https://arxiv.org/abs/1908.07490"),m(bn,"rel","nofollow"),m(wn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(wn,"rel","nofollow"),m(Bn,"href","/docs/transformers/main/en/model_doc/lxmert#transformers.TFLxmertForPreTraining"),m(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Z,"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,f){e(document.head,h),u(o,b,f),u(o,g,f),e(g,_),e(_,T),y(c,T,null),e(g,p),e(g,q),e(q,Be),u(o,$e,f),u(o,N,f),e(N,ee),e(ee,oe),y(F,oe,null),e(N,Xe),e(N,X),e(X,He),u(o,Fe,f),u(o,R,f),e(R,Ue),e(R,ne),e(ne,se),e(R,Ke),u(o,ze,f),u(o,W,f),e(W,Ge),u(o,Ee,f),u(o,V,f),e(V,Te),e(Te,Je),u(o,ge,f),u(o,M,f),e(M,j),u(o,qe,f),u(o,C,f),e(C,be),e(be,Ye),e(C,re),e(C,xe),e(xe,Ze),e(C,I),e(C,we),e(we,ae),u(o,Me,f),u(o,B,f),e(B,ie),e(B,le),e(le,et),e(B,H),e(B,de),e(de,ce),e(B,tt),u(o,_e,f),u(o,P,f),e(P,te),e(te,D),y(me,D,null),e(P,ot),e(P,v),e(v,E),u(o,rt,f),u(o,S,f),y(ye,S,null),e(S,mt),e(S,z),e(z,ht),e(z,Pe),e(Pe,ut),e(z,pt),e(z,Oe),e(Oe,U),e(z,he),e(z,ke),e(ke,ft),e(z,ue),e(S,gt),e(S,pe),e(pe,nt),e(pe,Ae),e(Ae,Le),e(pe,_t),e(pe,zn),e(zn,fa),e(pe,ga),u(o,dr,f),u(o,vt,f),e(vt,It),e(It,is),y(uo,is,null),e(vt,_a),e(vt,ls),e(ls,va),u(o,cr,f),u(o,Q,f),y(po,Q,null),e(Q,Ta),e(Q,ds),e(ds,ba),e(Q,xa),e(Q,fo),e(fo,wa),e(fo,En),e(En,ya),e(fo,ka),e(Q,La),e(Q,at),y(go,at,null),e(at,$a),e(at,cs),e(cs,Fa),e(at,za),e(at,_o),e(_o,qn),e(qn,Ea),e(qn,ms),e(ms,qa),e(_o,Ma),e(_o,Mn),e(Mn,Pa),e(Mn,hs),e(hs,Oa),e(Q,Aa),e(Q,Dt),y(vo,Dt,null),e(Dt,Ca),e(Dt,us),e(us,Na),e(Q,ja),e(Q,Ce),y(To,Ce,null),e(Ce,Ia),e(Ce,ps),e(ps,Da),e(Ce,Sa),y(St,Ce,null),e(Ce,Ra),e(Ce,Tt),e(Tt,Qa),e(Tt,fs),e(fs,Wa),e(Tt,Va),e(Tt,gs),e(gs,Ba),e(Tt,Xa),e(Q,Ha),e(Q,Rt),y(bo,Rt,null),e(Rt,Ua),e(Rt,xo),e(xo,Ka),e(xo,_s),e(_s,Ga),e(xo,Ja),u(o,mr,f),u(o,bt,f),e(bt,Qt),e(Qt,vs),y(wo,vs,null),e(bt,Ya),e(bt,Ts),e(Ts,Za),u(o,hr,f),u(o,fe,f),y(yo,fe,null),e(fe,ei),e(fe,ko),e(ko,ti),e(ko,bs),e(bs,oi),e(ko,ni),e(fe,si),e(fe,Lo),e(Lo,ri),e(Lo,Pn),e(Pn,ai),e(Lo,ii),e(fe,li),e(fe,it),y($o,it,null),e(it,di),e(it,xs),e(xs,ci),e(it,mi),e(it,Fo),e(Fo,On),e(On,hi),e(On,ws),e(ws,ui),e(Fo,pi),e(Fo,An),e(An,fi),e(An,ys),e(ys,gi),e(fe,_i),e(fe,Ne),y(zo,Ne,null),e(Ne,vi),e(Ne,ks),e(ks,Ti),e(Ne,bi),y(Wt,Ne,null),e(Ne,xi),e(Ne,xt),e(xt,wi),e(xt,Ls),e(Ls,yi),e(xt,ki),e(xt,$s),e($s,Li),e(xt,$i),u(o,ur,f),u(o,wt,f),e(wt,Vt),e(Vt,Fs),y(Eo,Fs,null),e(wt,Fi),e(wt,zs),e(zs,zi),u(o,pr,f),u(o,yt,f),y(qo,yt,null),e(yt,Ei),e(yt,Es),e(Es,qi),u(o,fr,f),u(o,kt,f),y(Mo,kt,null),e(kt,Mi),e(kt,Po),e(Po,Pi),e(Po,Cn),e(Cn,Oi),e(Po,Ai),u(o,gr,f),u(o,Lt,f),y(Oo,Lt,null),e(Lt,Ci),e(Lt,Ao),e(Ao,Ni),e(Ao,Nn),e(Nn,ji),e(Ao,Ii),u(o,_r,f),u(o,$t,f),y(Co,$t,null),e($t,Di),e($t,qs),e(qs,Si),u(o,vr,f),u(o,Ft,f),y(No,Ft,null),e(Ft,Ri),e(Ft,jo),e(jo,Qi),e(jo,jn),e(jn,Wi),e(jo,Vi),u(o,Tr,f),u(o,zt,f),e(zt,Bt),e(Bt,Ms),y(Io,Ms,null),e(zt,Bi),e(zt,Ps),e(Ps,Xi),u(o,br,f),u(o,K,f),y(Do,K,null),e(K,Hi),e(K,Os),e(Os,Ui),e(K,Ki),e(K,So),e(So,Gi),e(So,Ro),e(Ro,Ji),e(So,Yi),e(K,Zi),e(K,Qo),e(Qo,el),e(Qo,In),e(In,tl),e(Qo,ol),e(K,nl),e(K,Wo),e(Wo,sl),e(Wo,Vo),e(Vo,rl),e(Wo,al),e(K,il),e(K,je),y(Bo,je,null),e(je,ll),e(je,Et),e(Et,dl),e(Et,Dn),e(Dn,cl),e(Et,ml),e(Et,As),e(As,hl),e(Et,ul),e(je,pl),y(Xt,je,null),e(je,fl),y(Ht,je,null),u(o,xr,f),u(o,qt,f),e(qt,Ut),e(Ut,Cs),y(Xo,Cs,null),e(qt,gl),e(qt,Ns),e(Ns,_l),u(o,wr,f),u(o,G,f),y(Ho,G,null),e(G,vl),e(G,js),e(js,Tl),e(G,bl),e(G,Uo),e(Uo,xl),e(Uo,Ko),e(Ko,wl),e(Uo,yl),e(G,kl),e(G,Go),e(Go,Ll),e(Go,Sn),e(Sn,$l),e(Go,Fl),e(G,zl),e(G,Jo),e(Jo,El),e(Jo,Yo),e(Yo,ql),e(Jo,Ml),e(G,Pl),e(G,lt),y(Zo,lt,null),e(lt,Ol),e(lt,Mt),e(Mt,Al),e(Mt,Rn),e(Rn,Cl),e(Mt,Nl),e(Mt,Is),e(Is,jl),e(Mt,Il),e(lt,Dl),y(Kt,lt,null),u(o,yr,f),u(o,Pt,f),e(Pt,Gt),e(Gt,Ds),y(en,Ds,null),e(Pt,Sl),e(Pt,Ss),e(Ss,Rl),u(o,kr,f),u(o,J,f),y(tn,J,null),e(J,Ql),e(J,Rs),e(Rs,Wl),e(J,Vl),e(J,on),e(on,Bl),e(on,nn),e(nn,Xl),e(on,Hl),e(J,Ul),e(J,sn),e(sn,Kl),e(sn,Qn),e(Qn,Gl),e(sn,Jl),e(J,Yl),e(J,rn),e(rn,Zl),e(rn,an),e(an,ed),e(rn,td),e(J,od),e(J,Ie),y(ln,Ie,null),e(Ie,nd),e(Ie,Ot),e(Ot,sd),e(Ot,Wn),e(Wn,rd),e(Ot,ad),e(Ot,Qs),e(Qs,id),e(Ot,ld),e(Ie,dd),y(Jt,Ie,null),e(Ie,cd),y(Yt,Ie,null),u(o,Lr,f),u(o,At,f),e(At,Zt),e(Zt,Ws),y(dn,Ws,null),e(At,md),e(At,Vs),e(Vs,hd),u(o,$r,f),u(o,Y,f),y(cn,Y,null),e(Y,ud),e(Y,Bs),e(Bs,pd),e(Y,fd),e(Y,mn),e(mn,gd),e(mn,hn),e(hn,_d),e(mn,vd),e(Y,Td),e(Y,un),e(un,bd),e(un,pn),e(pn,xd),e(un,wd),e(Y,yd),y(eo,Y,null),e(Y,kd),e(Y,De),y(fn,De,null),e(De,Ld),e(De,Ct),e(Ct,$d),e(Ct,Vn),e(Vn,Fd),e(Ct,zd),e(Ct,Xs),e(Xs,Ed),e(Ct,qd),e(De,Md),y(to,De,null),e(De,Pd),y(oo,De,null),u(o,Fr,f),u(o,Nt,f),e(Nt,no),e(no,Hs),y(gn,Hs,null),e(Nt,Od),e(Nt,Us),e(Us,Ad),u(o,zr,f),u(o,Z,f),y(_n,Z,null),e(Z,Cd),e(Z,vn),e(vn,Nd),e(vn,Ks),e(Ks,jd),e(vn,Id),e(Z,Dd),e(Z,Tn),e(Tn,Sd),e(Tn,bn),e(bn,Rd),e(Tn,Qd),e(Z,Wd),e(Z,xn),e(xn,Vd),e(xn,wn),e(wn,Bd),e(xn,Xd),e(Z,Hd),y(so,Z,null),e(Z,Ud),e(Z,dt),y(yn,dt,null),e(dt,Kd),e(dt,jt),e(jt,Gd),e(jt,Bn),e(Bn,Jd),e(jt,Yd),e(jt,Gs),e(Gs,Zd),e(jt,ec),e(dt,tc),y(ro,dt,null),Er=!0},p(o,[f]){const kn={};f&2&&(kn.$$scope={dirty:f,ctx:o}),St.$set(kn);const Js={};f&2&&(Js.$$scope={dirty:f,ctx:o}),Wt.$set(Js);const Ys={};f&2&&(Ys.$$scope={dirty:f,ctx:o}),Xt.$set(Ys);const Zs={};f&2&&(Zs.$$scope={dirty:f,ctx:o}),Ht.$set(Zs);const Ln={};f&2&&(Ln.$$scope={dirty:f,ctx:o}),Kt.$set(Ln);const er={};f&2&&(er.$$scope={dirty:f,ctx:o}),Jt.$set(er);const tr={};f&2&&(tr.$$scope={dirty:f,ctx:o}),Yt.$set(tr);const or={};f&2&&(or.$$scope={dirty:f,ctx:o}),eo.$set(or);const $n={};f&2&&($n.$$scope={dirty:f,ctx:o}),to.$set($n);const nr={};f&2&&(nr.$$scope={dirty:f,ctx:o}),oo.$set(nr);const sr={};f&2&&(sr.$$scope={dirty:f,ctx:o}),so.$set(sr);const rr={};f&2&&(rr.$$scope={dirty:f,ctx:o}),ro.$set(rr)},i(o){Er||(k(c.$$.fragment,o),k(F.$$.fragment,o),k(me.$$.fragment,o),k(ye.$$.fragment,o),k(uo.$$.fragment,o),k(po.$$.fragment,o),k(go.$$.fragment,o),k(vo.$$.fragment,o),k(To.$$.fragment,o),k(St.$$.fragment,o),k(bo.$$.fragment,o),k(wo.$$.fragment,o),k(yo.$$.fragment,o),k($o.$$.fragment,o),k(zo.$$.fragment,o),k(Wt.$$.fragment,o),k(Eo.$$.fragment,o),k(qo.$$.fragment,o),k(Mo.$$.fragment,o),k(Oo.$$.fragment,o),k(Co.$$.fragment,o),k(No.$$.fragment,o),k(Io.$$.fragment,o),k(Do.$$.fragment,o),k(Bo.$$.fragment,o),k(Xt.$$.fragment,o),k(Ht.$$.fragment,o),k(Xo.$$.fragment,o),k(Ho.$$.fragment,o),k(Zo.$$.fragment,o),k(Kt.$$.fragment,o),k(en.$$.fragment,o),k(tn.$$.fragment,o),k(ln.$$.fragment,o),k(Jt.$$.fragment,o),k(Yt.$$.fragment,o),k(dn.$$.fragment,o),k(cn.$$.fragment,o),k(eo.$$.fragment,o),k(fn.$$.fragment,o),k(to.$$.fragment,o),k(oo.$$.fragment,o),k(gn.$$.fragment,o),k(_n.$$.fragment,o),k(so.$$.fragment,o),k(yn.$$.fragment,o),k(ro.$$.fragment,o),Er=!0)},o(o){L(c.$$.fragment,o),L(F.$$.fragment,o),L(me.$$.fragment,o),L(ye.$$.fragment,o),L(uo.$$.fragment,o),L(po.$$.fragment,o),L(go.$$.fragment,o),L(vo.$$.fragment,o),L(To.$$.fragment,o),L(St.$$.fragment,o),L(bo.$$.fragment,o),L(wo.$$.fragment,o),L(yo.$$.fragment,o),L($o.$$.fragment,o),L(zo.$$.fragment,o),L(Wt.$$.fragment,o),L(Eo.$$.fragment,o),L(qo.$$.fragment,o),L(Mo.$$.fragment,o),L(Oo.$$.fragment,o),L(Co.$$.fragment,o),L(No.$$.fragment,o),L(Io.$$.fragment,o),L(Do.$$.fragment,o),L(Bo.$$.fragment,o),L(Xt.$$.fragment,o),L(Ht.$$.fragment,o),L(Xo.$$.fragment,o),L(Ho.$$.fragment,o),L(Zo.$$.fragment,o),L(Kt.$$.fragment,o),L(en.$$.fragment,o),L(tn.$$.fragment,o),L(ln.$$.fragment,o),L(Jt.$$.fragment,o),L(Yt.$$.fragment,o),L(dn.$$.fragment,o),L(cn.$$.fragment,o),L(eo.$$.fragment,o),L(fn.$$.fragment,o),L(to.$$.fragment,o),L(oo.$$.fragment,o),L(gn.$$.fragment,o),L(_n.$$.fragment,o),L(so.$$.fragment,o),L(yn.$$.fragment,o),L(ro.$$.fragment,o),Er=!1},d(o){t(h),o&&t(b),o&&t(g),$(c),o&&t($e),o&&t(N),$(F),o&&t(Fe),o&&t(R),o&&t(ze),o&&t(W),o&&t(Ee),o&&t(V),o&&t(ge),o&&t(M),o&&t(qe),o&&t(C),o&&t(Me),o&&t(B),o&&t(_e),o&&t(P),$(me),o&&t(rt),o&&t(S),$(ye),o&&t(dr),o&&t(vt),$(uo),o&&t(cr),o&&t(Q),$(po),$(go),$(vo),$(To),$(St),$(bo),o&&t(mr),o&&t(bt),$(wo),o&&t(hr),o&&t(fe),$(yo),$($o),$(zo),$(Wt),o&&t(ur),o&&t(wt),$(Eo),o&&t(pr),o&&t(yt),$(qo),o&&t(fr),o&&t(kt),$(Mo),o&&t(gr),o&&t(Lt),$(Oo),o&&t(_r),o&&t($t),$(Co),o&&t(vr),o&&t(Ft),$(No),o&&t(Tr),o&&t(zt),$(Io),o&&t(br),o&&t(K),$(Do),$(Bo),$(Xt),$(Ht),o&&t(xr),o&&t(qt),$(Xo),o&&t(wr),o&&t(G),$(Ho),$(Zo),$(Kt),o&&t(yr),o&&t(Pt),$(en),o&&t(kr),o&&t(J),$(tn),$(ln),$(Jt),$(Yt),o&&t(Lr),o&&t(At),$(dn),o&&t($r),o&&t(Y),$(cn),$(eo),$(fn),$(to),$(oo),o&&t(Fr),o&&t(Nt),$(gn),o&&t(zr),o&&t(Z),$(_n),$(so),$(yn),$(ro)}}}const ah={local:"lxmert",sections:[{local:"overview",title:"Overview"},{local:"transformers.LxmertConfig",title:"LxmertConfig"},{local:"transformers.LxmertTokenizer",title:"LxmertTokenizer"},{local:"transformers.LxmertTokenizerFast",title:"LxmertTokenizerFast"},{local:"transformers.models.lxmert.modeling_lxmert.LxmertModelOutput",title:"Lxmert specific outputs"},{local:"transformers.LxmertModel",title:"LxmertModel"},{local:"transformers.LxmertForPreTraining",title:"LxmertForPreTraining"},{local:"transformers.LxmertForQuestionAnswering",title:"LxmertForQuestionAnswering"},{local:"transformers.TFLxmertModel",title:"TFLxmertModel"},{local:"transformers.TFLxmertForPreTraining",title:"TFLxmertForPreTraining"}],title:"LXMERT"};function ih(O){return Xm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ph extends Qm{constructor(h){super();Wm(this,h,ih,rh,Vm,{})}}export{ph as default,ah as metadata};
