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

tokenizer = LxmertTokenizer.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> LxmertTokenizer, 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 = LxmertTokenizer.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"),x=s("Example:"),g=l(),b(_.$$.fragment)},l(c){h=r(c,"P",{});var p=i(h);x=a(p,"Example:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,x),u(c,g,p),y(_,c,p),T=!0},p:dr,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 Zm(M){let h,x,g,_,T;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=s("Module"),T=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=r(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(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,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function eh(M){let h,x,g,_,T;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=s("Module"),T=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=r(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(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,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function th(M){let h,x,g,_,T;return _=new cr({props:{code:`from transformers import LxmertTokenizer, LxmertForQuestionAnswering
import torch

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

tokenizer = LxmertTokenizer.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> LxmertTokenizer, 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 = LxmertTokenizer.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"),x=s("Example:"),g=l(),b(_.$$.fragment)},l(c){h=r(c,"P",{});var p=i(h);x=a(p,"Example:"),p.forEach(t),g=d(c),w(_.$$.fragment,c)},m(c,p){u(c,h,p),e(h,x),u(c,g,p),y(_,c,p),T=!0},p:dr,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 ah(M){let h,x,g,_,T,c,p,q,Be,Fe,N,ee,oe,F,Xe,X,He,ze,R,Ue,ne,re,Ke,Ee,W,Ge,qe,V,xe,Je,ge,P,j,Me,C,be,Ye,se,we,Ze,I,ye,ae,Pe,B,ie,le,et,H,de,ce,tt,_e,O,te,D,me,ot;return{c(){h=n("p"),x=s("TensorFlow models and layers in "),g=n("code"),_=s("transformers"),T=s(" accept two formats as input:"),c=l(),p=n("ul"),q=n("li"),Be=s("having all inputs as keyword arguments (like PyTorch models), or"),Fe=l(),N=n("li"),ee=s("having all inputs as a list, tuple or dict in the first positional argument."),oe=l(),F=n("p"),Xe=s(`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=s("model.fit()"),ze=s(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=n("code"),Ue=s("model.fit()"),ne=s(` supports! If, however, you want to use the second
format outside of Keras methods like `),re=n("code"),Ke=s("fit()"),Ee=s(" and "),W=n("code"),Ge=s("predict()"),qe=s(`, such as when creating your own layers or models with
the Keras `),V=n("code"),xe=s("Functional"),Je=s(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ge=l(),P=n("ul"),j=n("li"),Me=s("a single Tensor with "),C=n("code"),be=s("input_ids"),Ye=s(" only and nothing else: "),se=n("code"),we=s("model(input_ids)"),Ze=l(),I=n("li"),ye=s(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=n("code"),Pe=s("model([input_ids, attention_mask])"),B=s(" or "),ie=n("code"),le=s("model([input_ids, attention_mask, token_type_ids])"),et=l(),H=n("li"),de=s(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n("code"),tt=s('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),_e=l(),O=n("p"),te=s(`Note that when creating models and layers with
`),D=n("a"),me=s("subclassing"),ot=s(` 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=r(v,"P",{});var E=i(h);x=a(E,"TensorFlow models and layers in "),g=r(E,"CODE",{});var st=i(g);_=a(st,"transformers"),st.forEach(t),T=a(E," accept two formats as input:"),E.forEach(t),c=d(v),p=r(v,"UL",{});var S=i(p);q=r(S,"LI",{});var ke=i(q);Be=a(ke,"having all inputs as keyword arguments (like PyTorch models), or"),ke.forEach(t),Fe=d(S),N=r(S,"LI",{});var ht=i(N);ee=a(ht,"having all inputs as a list, tuple or dict in the first positional argument."),ht.forEach(t),S.forEach(t),oe=d(v),F=r(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=r(z,"CODE",{});var ut=i(X);He=a(ut,"model.fit()"),ut.forEach(t),ze=a(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=r(z,"CODE",{});var Oe=i(R);Ue=a(Oe,"model.fit()"),Oe.forEach(t),ne=a(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),re=r(z,"CODE",{});var pt=i(re);Ke=a(pt,"fit()"),pt.forEach(t),Ee=a(z," and "),W=r(z,"CODE",{});var ft=i(W);Ge=a(ft,"predict()"),ft.forEach(t),qe=a(z,`, such as when creating your own layers or models with
the Keras `),V=r(z,"CODE",{});var Ae=i(V);xe=a(Ae,"Functional"),Ae.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),P=r(v,"UL",{});var U=i(P);j=r(U,"LI",{});var he=i(j);Me=a(he,"a single Tensor with "),C=r(he,"CODE",{});var Le=i(C);be=a(Le,"input_ids"),Le.forEach(t),Ye=a(he," only and nothing else: "),se=r(he,"CODE",{});var gt=i(se);we=a(gt,"model(input_ids)"),gt.forEach(t),he.forEach(t),Ze=d(U),I=r(U,"LI",{});var ue=i(I);ye=a(ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=r(ue,"CODE",{});var _t=i(ae);Pe=a(_t,"model([input_ids, attention_mask])"),_t.forEach(t),B=a(ue," or "),ie=r(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=r(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=r(nt,"CODE",{});var Ce=i(ce);tt=a(Ce,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ce.forEach(t),nt.forEach(t),U.forEach(t),_e=d(v),O=r(v,"P",{});var $e=i(O);te=a($e,`Note that when creating models and layers with
`),D=r($e,"A",{href:!0,rel:!0});var vt=i(D);me=a(vt,"subclassing"),vt.forEach(t),ot=a($e,` 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!`),$e.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,x),e(h,g),e(g,_),e(h,T),u(v,c,E),u(v,p,E),e(p,q),e(q,Be),e(p,Fe),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,ze),e(F,R),e(R,Ue),e(F,ne),e(F,re),e(re,Ke),e(F,Ee),e(F,W),e(W,Ge),e(F,qe),e(F,V),e(V,xe),e(F,Je),u(v,ge,E),u(v,P,E),e(P,j),e(j,Me),e(j,C),e(C,be),e(j,Ye),e(j,se),e(se,we),e(P,Ze),e(P,I),e(I,ye),e(I,ae),e(ae,Pe),e(I,B),e(I,ie),e(ie,le),e(P,et),e(P,H),e(H,de),e(H,ce),e(ce,tt),u(v,_e,E),u(v,O,E),e(O,te),e(O,D),e(D,me),e(O,ot)},d(v){v&&t(h),v&&t(c),v&&t(p),v&&t(oe),v&&t(F),v&&t(ge),v&&t(P),v&&t(_e),v&&t(O)}}}function ih(M){let h,x,g,_,T;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=s("Module"),T=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=r(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(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,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function lh(M){let h,x,g,_,T,c,p,q,Be,Fe,N,ee,oe,F,Xe,X,He,ze,R,Ue,ne,re,Ke,Ee,W,Ge,qe,V,xe,Je,ge,P,j,Me,C,be,Ye,se,we,Ze,I,ye,ae,Pe,B,ie,le,et,H,de,ce,tt,_e,O,te,D,me,ot,v,E,st,S,ke,ht,z,ut,Oe,pt,ft,Ae,U,he,Le,gt,ue,_t,pe,nt,Ce,$e,vt,En,_a,va,ms,Tt,Dt,mr,po,Ta,hr,xa,hs,Q,fo,ba,ur,wa,ya,go,ka,qn,La,$a,Fa,at,_o,za,pr,Ea,qa,vo,Mn,Ma,fr,Pa,Oa,Pn,Aa,gr,Ca,Na,St,To,ja,_r,Ia,Da,Ne,xo,Sa,vr,Ra,Qa,Rt,Wa,xt,Va,Tr,Ba,Xa,xr,Ha,Ua,Ka,Qt,bo,Ga,wo,Ja,br,Ya,Za,us,bt,Wt,wr,yo,ei,yr,ti,ps,fe,ko,oi,Lo,ni,kr,ri,si,ai,$o,ii,On,li,di,ci,it,Fo,mi,Lr,hi,ui,zo,An,pi,$r,fi,gi,Cn,_i,Fr,vi,Ti,je,Eo,xi,zr,bi,wi,Vt,yi,wt,ki,Er,Li,$i,qr,Fi,zi,fs,yt,Bt,Mr,qo,Ei,Pr,qi,gs,kt,Mo,Mi,Or,Pi,_s,Lt,Po,Oi,Oo,Ai,Nn,Ci,Ni,vs,$t,Ao,ji,Co,Ii,jn,Di,Si,Ts,Ft,No,Ri,Ar,Qi,xs,zt,jo,Wi,Io,Vi,In,Bi,Xi,bs,Et,Xt,Cr,Do,Hi,Nr,Ui,ws,K,So,Ki,jr,Gi,Ji,Ro,Yi,Qo,Zi,el,tl,Wo,ol,Dn,nl,rl,sl,Vo,al,Bo,il,ll,dl,Ie,Xo,cl,qt,ml,Sn,hl,ul,Ir,pl,fl,gl,Ht,_l,Ut,ys,Mt,Kt,Dr,Ho,vl,Sr,Tl,ks,G,Uo,xl,Rr,bl,wl,Ko,yl,Go,kl,Ll,$l,Jo,Fl,Rn,zl,El,ql,Yo,Ml,Zo,Pl,Ol,Al,lt,en,Cl,Pt,Nl,Qn,jl,Il,Qr,Dl,Sl,Rl,Gt,Ls,Ot,Jt,Wr,tn,Ql,Vr,Wl,$s,J,on,Vl,Br,Bl,Xl,nn,Hl,rn,Ul,Kl,Gl,sn,Jl,Wn,Yl,Zl,ed,an,td,ln,od,nd,rd,ve,dn,sd,At,ad,Vn,id,ld,Xr,dd,cd,md,Yt,hd,Zt,ud,eo,Fs,Ct,to,Hr,cn,pd,Ur,fd,zs,Y,mn,gd,Kr,_d,vd,hn,Td,un,xd,bd,wd,pn,yd,fn,kd,Ld,$d,oo,Fd,De,gn,zd,Nt,Ed,Bn,qd,Md,Gr,Pd,Od,Ad,no,Cd,ro,Es,jt,so,Jr,_n,Nd,Yr,jd,qs,Z,vn,Id,Tn,Dd,Zr,Sd,Rd,Qd,xn,Wd,bn,Vd,Bd,Xd,wn,Hd,yn,Ud,Kd,Gd,ao,Jd,dt,kn,Yd,It,Zd,Xn,ec,tc,es,oc,nc,rc,io,Ms;return c=new rt({}),F=new rt({}),me=new rt({}),ke=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/pr_19907/en/model_doc/lxmert#transformers.LxmertModel">LxmertModel</a> or <a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/configuration_lxmert.py#L29"}}),po=new rt({}),fo=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/vr_19907/src/transformers/models/lxmert/tokenization_lxmert.py#L67"}}),_o=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/vr_19907/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>
`}}),To=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/vr_19907/src/transformers/models/lxmert/tokenization_lxmert.py#L193"}}),xo=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/vr_19907/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>
`}}),Rt=new lr({props:{anchor:"transformers.LxmertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Km]},$$scope:{ctx:M}}}),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/vr_19907/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>
`}}),yo=new rt({}),ko=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/vr_19907/src/transformers/models/lxmert/tokenization_lxmert_fast.py#L48"}}),Fo=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/vr_19907/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>
`}}),Eo=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/vr_19907/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>
`}}),Vt=new lr({props:{anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Gm]},$$scope:{ctx:M}}}),qo=new rt({}),Mo=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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L61"}}),Po=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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L147"}}),Ao=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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L107"}}),No=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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L60"}}),jo=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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L106"}}),Do=new rt({}),So=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L886"}}),Xo=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/pr_19907/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L901",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ht=new zn({props:{$$slots:{default:[Jm]},$$scope:{ctx:M}}}),Ut=new lr({props:{anchor:"transformers.LxmertModel.forward.example",$$slots:{default:[Ym]},$$scope:{ctx:M}}}),Ho=new rt({}),Uo=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L1025"}}),en=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/pr_19907/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gt=new zn({props:{$$slots:{default:[Zm]},$$scope:{ctx:M}}}),tn=new rt({}),on=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L1292"}}),dn=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/pr_19907/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_lxmert.py#L1385",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/en/model_doc/lxmert#transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput"
>transformers.models.lxmert.modeling_lxmert.LxmertForQuestionAnsweringOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yt=new zn({props:{$$slots:{default:[eh]},$$scope:{ctx:M}}}),Zt=new lr({props:{anchor:"transformers.LxmertForQuestionAnswering.forward.example",$$slots:{default:[th]},$$scope:{ctx:M}}}),eo=new lr({props:{anchor:"transformers.LxmertForQuestionAnswering.forward.example-2",$$slots:{default:[oh]},$$scope:{ctx:M}}}),cn=new rt({}),mn=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L946"}}),oo=new zn({props:{$$slots:{default:[nh]},$$scope:{ctx:M}}}),gn=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[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.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/pr_19907/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L951",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/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>
`}}),no=new zn({props:{$$slots:{default:[rh]},$$scope:{ctx:M}}}),ro=new lr({props:{anchor:"transformers.TFLxmertModel.call.example",$$slots:{default:[sh]},$$scope:{ctx:M}}}),_n=new rt({}),vn=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L1187"}}),ao=new zn({props:{$$slots:{default:[ah]},$$scope:{ctx:M}}}),kn=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/pr_19907/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_19907/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/pr_19907/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/vr_19907/src/transformers/models/lxmert/modeling_tf_lxmert.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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/pr_19907/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>
`}}),io=new zn({props:{$$slots:{default:[ih]},$$scope:{ctx:M}}}),{c(){h=n("meta"),x=l(),g=n("h1"),_=n("a"),T=n("span"),b(c.$$.fragment),p=l(),q=n("span"),Be=s("LXMERT"),Fe=l(),N=n("h2"),ee=n("a"),oe=n("span"),b(F.$$.fragment),Xe=l(),X=n("span"),He=s("Overview"),ze=l(),R=n("p"),Ue=s("The LXMERT model was proposed in "),ne=n("a"),re=s("LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),Ke=s(` 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.`),Ee=l(),W=n("p"),Ge=s("The abstract from the paper is the following:"),qe=l(),V=n("p"),xe=n("em"),Je=s(`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(),P=n("p"),j=s("Tips:"),Me=l(),C=n("ul"),be=n("li"),Ye=s(`Bounding boxes are not necessary to be used in the visual feature embeddings, any kind of visual-spacial features
will work.`),se=l(),we=n("li"),Ze=s(`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(),ye=n("li"),ae=s(`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.`),Pe=l(),B=n("p"),ie=s("This model was contributed by "),le=n("a"),et=s("eltoto1219"),H=s(". The original code can be found "),de=n("a"),ce=s("here"),tt=s("."),_e=l(),O=n("h2"),te=n("a"),D=n("span"),b(me.$$.fragment),ot=l(),v=n("span"),E=s("LxmertConfig"),st=l(),S=n("div"),b(ke.$$.fragment),ht=l(),z=n("p"),ut=s("This is the configuration class to store the configuration of a "),Oe=n("a"),pt=s("LxmertModel"),ft=s(" or a "),Ae=n("a"),U=s("TFLxmertModel"),he=s(`. 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
`),Le=n("a"),gt=s("unc-nlp/lxmert-base-uncased"),ue=s(" architecture."),_t=l(),pe=n("p"),nt=s("Configuration objects inherit from "),Ce=n("a"),$e=s("PretrainedConfig"),vt=s(` and can be used to control the model outputs. Read the
documentation from `),En=n("a"),_a=s("PretrainedConfig"),va=s(" for more information."),ms=l(),Tt=n("h2"),Dt=n("a"),mr=n("span"),b(po.$$.fragment),Ta=l(),hr=n("span"),xa=s("LxmertTokenizer"),hs=l(),Q=n("div"),b(fo.$$.fragment),ba=l(),ur=n("p"),wa=s("Construct a Lxmert tokenizer. Based on WordPiece."),ya=l(),go=n("p"),ka=s("This tokenizer inherits from "),qn=n("a"),La=s("PreTrainedTokenizer"),$a=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Fa=l(),at=n("div"),b(_o.$$.fragment),za=l(),pr=n("p"),Ea=s(`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:`),qa=l(),vo=n("ul"),Mn=n("li"),Ma=s("single sequence: "),fr=n("code"),Pa=s("[CLS] X [SEP]"),Oa=l(),Pn=n("li"),Aa=s("pair of sequences: "),gr=n("code"),Ca=s("[CLS] A [SEP] B [SEP]"),Na=l(),St=n("div"),b(To.$$.fragment),ja=l(),_r=n("p"),Ia=s("Converts a sequence of tokens (string) in a single string."),Da=l(),Ne=n("div"),b(xo.$$.fragment),Sa=l(),vr=n("p"),Ra=s("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),Qa=l(),b(Rt.$$.fragment),Wa=l(),xt=n("p"),Va=s("If "),Tr=n("code"),Ba=s("token_ids_1"),Xa=s(" is "),xr=n("code"),Ha=s("None"),Ua=s(", this method only returns the first portion of the mask (0s)."),Ka=l(),Qt=n("div"),b(bo.$$.fragment),Ga=l(),wo=n("p"),Ja=s(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),br=n("code"),Ya=s("prepare_for_model"),Za=s(" method."),us=l(),bt=n("h2"),Wt=n("a"),wr=n("span"),b(yo.$$.fragment),ei=l(),yr=n("span"),ti=s("LxmertTokenizerFast"),ps=l(),fe=n("div"),b(ko.$$.fragment),oi=l(),Lo=n("p"),ni=s("Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),kr=n("em"),ri=s("tokenizers"),si=s(" library). Based on WordPiece."),ai=l(),$o=n("p"),ii=s("This tokenizer inherits from "),On=n("a"),li=s("PreTrainedTokenizerFast"),di=s(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ci=l(),it=n("div"),b(Fo.$$.fragment),mi=l(),Lr=n("p"),hi=s(`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:`),ui=l(),zo=n("ul"),An=n("li"),pi=s("single sequence: "),$r=n("code"),fi=s("[CLS] X [SEP]"),gi=l(),Cn=n("li"),_i=s("pair of sequences: "),Fr=n("code"),vi=s("[CLS] A [SEP] B [SEP]"),Ti=l(),je=n("div"),b(Eo.$$.fragment),xi=l(),zr=n("p"),bi=s("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),wi=l(),b(Vt.$$.fragment),yi=l(),wt=n("p"),ki=s("If "),Er=n("code"),Li=s("token_ids_1"),$i=s(" is "),qr=n("code"),Fi=s("None"),zi=s(", this method only returns the first portion of the mask (0s)."),fs=l(),yt=n("h2"),Bt=n("a"),Mr=n("span"),b(qo.$$.fragment),Ei=l(),Pr=n("span"),qi=s("Lxmert specific outputs"),gs=l(),kt=n("div"),b(Mo.$$.fragment),Mi=l(),Or=n("p"),Pi=s(`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)`),_s=l(),Lt=n("div"),b(Po.$$.fragment),Oi=l(),Oo=n("p"),Ai=s("Output type of "),Nn=n("a"),Ci=s("LxmertForPreTraining"),Ni=s("."),vs=l(),$t=n("div"),b(Ao.$$.fragment),ji=l(),Co=n("p"),Ii=s("Output type of "),jn=n("a"),Di=s("LxmertForQuestionAnswering"),Si=s("."),Ts=l(),Ft=n("div"),b(No.$$.fragment),Ri=l(),Ar=n("p"),Qi=s(`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)`),xs=l(),zt=n("div"),b(jo.$$.fragment),Wi=l(),Io=n("p"),Vi=s("Output type of "),In=n("a"),Bi=s("LxmertForPreTraining"),Xi=s("."),bs=l(),Et=n("h2"),Xt=n("a"),Cr=n("span"),b(Do.$$.fragment),Hi=l(),Nr=n("span"),Ui=s("LxmertModel"),ws=l(),K=n("div"),b(So.$$.fragment),Ki=l(),jr=n("p"),Gi=s("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),Ji=l(),Ro=n("p"),Yi=s("The LXMERT model was proposed in "),Qo=n("a"),Zi=s(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),el=s(` 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.`),tl=l(),Wo=n("p"),ol=s("This model inherits from "),Dn=n("a"),nl=s("PreTrainedModel"),rl=s(`. 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.)`),sl=l(),Vo=n("p"),al=s("This model is also a PyTorch "),Bo=n("a"),il=s("torch.nn.Module"),ll=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dl=l(),Ie=n("div"),b(Xo.$$.fragment),cl=l(),qt=n("p"),ml=s("The "),Sn=n("a"),hl=s("LxmertModel"),ul=s(" forward method, overrides the "),Ir=n("code"),pl=s("__call__"),fl=s(" special method."),gl=l(),b(Ht.$$.fragment),_l=l(),b(Ut.$$.fragment),ys=l(),Mt=n("h2"),Kt=n("a"),Dr=n("span"),b(Ho.$$.fragment),vl=l(),Sr=n("span"),Tl=s("LxmertForPreTraining"),ks=l(),G=n("div"),b(Uo.$$.fragment),xl=l(),Rr=n("p"),bl=s("Lxmert Model with a specified pretraining head on top."),wl=l(),Ko=n("p"),yl=s("The LXMERT model was proposed in "),Go=n("a"),kl=s(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Ll=s(` 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.`),$l=l(),Jo=n("p"),Fl=s("This model inherits from "),Rn=n("a"),zl=s("PreTrainedModel"),El=s(`. 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.)`),ql=l(),Yo=n("p"),Ml=s("This model is also a PyTorch "),Zo=n("a"),Pl=s("torch.nn.Module"),Ol=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Al=l(),lt=n("div"),b(en.$$.fragment),Cl=l(),Pt=n("p"),Nl=s("The "),Qn=n("a"),jl=s("LxmertForPreTraining"),Il=s(" forward method, overrides the "),Qr=n("code"),Dl=s("__call__"),Sl=s(" special method."),Rl=l(),b(Gt.$$.fragment),Ls=l(),Ot=n("h2"),Jt=n("a"),Wr=n("span"),b(tn.$$.fragment),Ql=l(),Vr=n("span"),Wl=s("LxmertForQuestionAnswering"),$s=l(),J=n("div"),b(on.$$.fragment),Vl=l(),Br=n("p"),Bl=s("Lxmert Model with a visual-answering head on top for downstream QA tasks"),Xl=l(),nn=n("p"),Hl=s("The LXMERT model was proposed in "),rn=n("a"),Ul=s(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Kl=s(` 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.`),Gl=l(),sn=n("p"),Jl=s("This model inherits from "),Wn=n("a"),Yl=s("PreTrainedModel"),Zl=s(`. 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.)`),ed=l(),an=n("p"),td=s("This model is also a PyTorch "),ln=n("a"),od=s("torch.nn.Module"),nd=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rd=l(),ve=n("div"),b(dn.$$.fragment),sd=l(),At=n("p"),ad=s("The "),Vn=n("a"),id=s("LxmertForQuestionAnswering"),ld=s(" forward method, overrides the "),Xr=n("code"),dd=s("__call__"),cd=s(" special method."),md=l(),b(Yt.$$.fragment),hd=l(),b(Zt.$$.fragment),ud=l(),b(eo.$$.fragment),Fs=l(),Ct=n("h2"),to=n("a"),Hr=n("span"),b(cn.$$.fragment),pd=l(),Ur=n("span"),fd=s("TFLxmertModel"),zs=l(),Y=n("div"),b(mn.$$.fragment),gd=l(),Kr=n("p"),_d=s("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),vd=l(),hn=n("p"),Td=s("The LXMERT model was proposed in "),un=n("a"),xd=s(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),bd=s(` 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(),pn=n("p"),yd=s("This model is also a "),fn=n("a"),kd=s("tf.keras.Model"),Ld=s(` 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.`),$d=l(),b(oo.$$.fragment),Fd=l(),De=n("div"),b(gn.$$.fragment),zd=l(),Nt=n("p"),Ed=s("The "),Bn=n("a"),qd=s("TFLxmertModel"),Md=s(" forward method, overrides the "),Gr=n("code"),Pd=s("__call__"),Od=s(" special method."),Ad=l(),b(no.$$.fragment),Cd=l(),b(ro.$$.fragment),Es=l(),jt=n("h2"),so=n("a"),Jr=n("span"),b(_n.$$.fragment),Nd=l(),Yr=n("span"),jd=s("TFLxmertForPreTraining"),qs=l(),Z=n("div"),b(vn.$$.fragment),Id=l(),Tn=n("p"),Dd=s("Lxmert Model with a "),Zr=n("code"),Sd=s("language modeling"),Rd=s(" head on top."),Qd=l(),xn=n("p"),Wd=s("The LXMERT model was proposed in "),bn=n("a"),Vd=s(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Bd=s(` 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.`),Xd=l(),wn=n("p"),Hd=s("This model is also a "),yn=n("a"),Ud=s("tf.keras.Model"),Kd=s(` 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.`),Gd=l(),b(ao.$$.fragment),Jd=l(),dt=n("div"),b(kn.$$.fragment),Yd=l(),It=n("p"),Zd=s("The "),Xn=n("a"),ec=s("TFLxmertForPreTraining"),tc=s(" forward method, overrides the "),es=n("code"),oc=s("__call__"),nc=s(" special method."),rc=l(),b(io.$$.fragment),this.h()},l(o){const f=Hm('[data-svelte="svelte-1phssyn"]',document.head);h=r(f,"META",{name:!0,content:!0}),f.forEach(t),x=d(o),g=r(o,"H1",{class:!0});var Ln=i(g);_=r(Ln,"A",{id:!0,class:!0,href:!0});var ts=i(_);T=r(ts,"SPAN",{});var os=i(T);w(c.$$.fragment,os),os.forEach(t),ts.forEach(t),p=d(Ln),q=r(Ln,"SPAN",{});var ns=i(q);Be=a(ns,"LXMERT"),ns.forEach(t),Ln.forEach(t),Fe=d(o),N=r(o,"H2",{class:!0});var $n=i(N);ee=r($n,"A",{id:!0,class:!0,href:!0});var rs=i(ee);oe=r(rs,"SPAN",{});var ss=i(oe);w(F.$$.fragment,ss),ss.forEach(t),rs.forEach(t),Xe=d($n),X=r($n,"SPAN",{});var as=i(X);He=a(as,"Overview"),as.forEach(t),$n.forEach(t),ze=d(o),R=r(o,"P",{});var Fn=i(R);Ue=a(Fn,"The LXMERT model was proposed in "),ne=r(Fn,"A",{href:!0,rel:!0});var is=i(ne);re=a(is,"LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),is.forEach(t),Ke=a(Fn,` 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.`),Fn.forEach(t),Ee=d(o),W=r(o,"P",{});var ls=i(W);Ge=a(ls,"The abstract from the paper is the following:"),ls.forEach(t),qe=d(o),V=r(o,"P",{});var ds=i(V);xe=r(ds,"EM",{});var cs=i(xe);Je=a(cs,`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`),cs.forEach(t),ds.forEach(t),ge=d(o),P=r(o,"P",{});var dc=i(P);j=a(dc,"Tips:"),dc.forEach(t),Me=d(o),C=r(o,"UL",{});var Hn=i(C);be=r(Hn,"LI",{});var cc=i(be);Ye=a(cc,`Bounding boxes are not necessary to be used in the visual feature embeddings, any kind of visual-spacial features
will work.`),cc.forEach(t),se=d(Hn),we=r(Hn,"LI",{});var mc=i(we);Ze=a(mc,`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.`),mc.forEach(t),I=d(Hn),ye=r(Hn,"LI",{});var hc=i(ye);ae=a(hc,`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.`),hc.forEach(t),Hn.forEach(t),Pe=d(o),B=r(o,"P",{});var Un=i(B);ie=a(Un,"This model was contributed by "),le=r(Un,"A",{href:!0,rel:!0});var uc=i(le);et=a(uc,"eltoto1219"),uc.forEach(t),H=a(Un,". The original code can be found "),de=r(Un,"A",{href:!0,rel:!0});var pc=i(de);ce=a(pc,"here"),pc.forEach(t),tt=a(Un,"."),Un.forEach(t),_e=d(o),O=r(o,"H2",{class:!0});var Ps=i(O);te=r(Ps,"A",{id:!0,class:!0,href:!0});var fc=i(te);D=r(fc,"SPAN",{});var gc=i(D);w(me.$$.fragment,gc),gc.forEach(t),fc.forEach(t),ot=d(Ps),v=r(Ps,"SPAN",{});var _c=i(v);E=a(_c,"LxmertConfig"),_c.forEach(t),Ps.forEach(t),st=d(o),S=r(o,"DIV",{class:!0});var Kn=i(S);w(ke.$$.fragment,Kn),ht=d(Kn),z=r(Kn,"P",{});var lo=i(z);ut=a(lo,"This is the configuration class to store the configuration of a "),Oe=r(lo,"A",{href:!0});var vc=i(Oe);pt=a(vc,"LxmertModel"),vc.forEach(t),ft=a(lo," or a "),Ae=r(lo,"A",{href:!0});var Tc=i(Ae);U=a(Tc,"TFLxmertModel"),Tc.forEach(t),he=a(lo,`. 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
`),Le=r(lo,"A",{href:!0,rel:!0});var xc=i(Le);gt=a(xc,"unc-nlp/lxmert-base-uncased"),xc.forEach(t),ue=a(lo," architecture."),lo.forEach(t),_t=d(Kn),pe=r(Kn,"P",{});var Gn=i(pe);nt=a(Gn,"Configuration objects inherit from "),Ce=r(Gn,"A",{href:!0});var bc=i(Ce);$e=a(bc,"PretrainedConfig"),bc.forEach(t),vt=a(Gn,` and can be used to control the model outputs. Read the
documentation from `),En=r(Gn,"A",{href:!0});var wc=i(En);_a=a(wc,"PretrainedConfig"),wc.forEach(t),va=a(Gn," for more information."),Gn.forEach(t),Kn.forEach(t),ms=d(o),Tt=r(o,"H2",{class:!0});var Os=i(Tt);Dt=r(Os,"A",{id:!0,class:!0,href:!0});var yc=i(Dt);mr=r(yc,"SPAN",{});var kc=i(mr);w(po.$$.fragment,kc),kc.forEach(t),yc.forEach(t),Ta=d(Os),hr=r(Os,"SPAN",{});var Lc=i(hr);xa=a(Lc,"LxmertTokenizer"),Lc.forEach(t),Os.forEach(t),hs=d(o),Q=r(o,"DIV",{class:!0});var Te=i(Q);w(fo.$$.fragment,Te),ba=d(Te),ur=r(Te,"P",{});var $c=i(ur);wa=a($c,"Construct a Lxmert tokenizer. Based on WordPiece."),$c.forEach(t),ya=d(Te),go=r(Te,"P",{});var As=i(go);ka=a(As,"This tokenizer inherits from "),qn=r(As,"A",{href:!0});var Fc=i(qn);La=a(Fc,"PreTrainedTokenizer"),Fc.forEach(t),$a=a(As,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),As.forEach(t),Fa=d(Te),at=r(Te,"DIV",{class:!0});var Jn=i(at);w(_o.$$.fragment,Jn),za=d(Jn),pr=r(Jn,"P",{});var zc=i(pr);Ea=a(zc,`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:`),zc.forEach(t),qa=d(Jn),vo=r(Jn,"UL",{});var Cs=i(vo);Mn=r(Cs,"LI",{});var sc=i(Mn);Ma=a(sc,"single sequence: "),fr=r(sc,"CODE",{});var Ec=i(fr);Pa=a(Ec,"[CLS] X [SEP]"),Ec.forEach(t),sc.forEach(t),Oa=d(Cs),Pn=r(Cs,"LI",{});var ac=i(Pn);Aa=a(ac,"pair of sequences: "),gr=r(ac,"CODE",{});var qc=i(gr);Ca=a(qc,"[CLS] A [SEP] B [SEP]"),qc.forEach(t),ac.forEach(t),Cs.forEach(t),Jn.forEach(t),Na=d(Te),St=r(Te,"DIV",{class:!0});var Ns=i(St);w(To.$$.fragment,Ns),ja=d(Ns),_r=r(Ns,"P",{});var Mc=i(_r);Ia=a(Mc,"Converts a sequence of tokens (string) in a single string."),Mc.forEach(t),Ns.forEach(t),Da=d(Te),Ne=r(Te,"DIV",{class:!0});var co=i(Ne);w(xo.$$.fragment,co),Sa=d(co),vr=r(co,"P",{});var Pc=i(vr);Ra=a(Pc,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),Pc.forEach(t),Qa=d(co),w(Rt.$$.fragment,co),Wa=d(co),xt=r(co,"P",{});var Yn=i(xt);Va=a(Yn,"If "),Tr=r(Yn,"CODE",{});var Oc=i(Tr);Ba=a(Oc,"token_ids_1"),Oc.forEach(t),Xa=a(Yn," is "),xr=r(Yn,"CODE",{});var Ac=i(xr);Ha=a(Ac,"None"),Ac.forEach(t),Ua=a(Yn,", this method only returns the first portion of the mask (0s)."),Yn.forEach(t),co.forEach(t),Ka=d(Te),Qt=r(Te,"DIV",{class:!0});var js=i(Qt);w(bo.$$.fragment,js),Ga=d(js),wo=r(js,"P",{});var Is=i(wo);Ja=a(Is,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),br=r(Is,"CODE",{});var Cc=i(br);Ya=a(Cc,"prepare_for_model"),Cc.forEach(t),Za=a(Is," method."),Is.forEach(t),js.forEach(t),Te.forEach(t),us=d(o),bt=r(o,"H2",{class:!0});var Ds=i(bt);Wt=r(Ds,"A",{id:!0,class:!0,href:!0});var Nc=i(Wt);wr=r(Nc,"SPAN",{});var jc=i(wr);w(yo.$$.fragment,jc),jc.forEach(t),Nc.forEach(t),ei=d(Ds),yr=r(Ds,"SPAN",{});var Ic=i(yr);ti=a(Ic,"LxmertTokenizerFast"),Ic.forEach(t),Ds.forEach(t),ps=d(o),fe=r(o,"DIV",{class:!0});var ct=i(fe);w(ko.$$.fragment,ct),oi=d(ct),Lo=r(ct,"P",{});var Ss=i(Lo);ni=a(Ss,"Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),kr=r(Ss,"EM",{});var Dc=i(kr);ri=a(Dc,"tokenizers"),Dc.forEach(t),si=a(Ss," library). Based on WordPiece."),Ss.forEach(t),ai=d(ct),$o=r(ct,"P",{});var Rs=i($o);ii=a(Rs,"This tokenizer inherits from "),On=r(Rs,"A",{href:!0});var Sc=i(On);li=a(Sc,"PreTrainedTokenizerFast"),Sc.forEach(t),di=a(Rs,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Rs.forEach(t),ci=d(ct),it=r(ct,"DIV",{class:!0});var Zn=i(it);w(Fo.$$.fragment,Zn),mi=d(Zn),Lr=r(Zn,"P",{});var Rc=i(Lr);hi=a(Rc,`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:`),Rc.forEach(t),ui=d(Zn),zo=r(Zn,"UL",{});var Qs=i(zo);An=r(Qs,"LI",{});var ic=i(An);pi=a(ic,"single sequence: "),$r=r(ic,"CODE",{});var Qc=i($r);fi=a(Qc,"[CLS] X [SEP]"),Qc.forEach(t),ic.forEach(t),gi=d(Qs),Cn=r(Qs,"LI",{});var lc=i(Cn);_i=a(lc,"pair of sequences: "),Fr=r(lc,"CODE",{});var Wc=i(Fr);vi=a(Wc,"[CLS] A [SEP] B [SEP]"),Wc.forEach(t),lc.forEach(t),Qs.forEach(t),Zn.forEach(t),Ti=d(ct),je=r(ct,"DIV",{class:!0});var mo=i(je);w(Eo.$$.fragment,mo),xi=d(mo),zr=r(mo,"P",{});var Vc=i(zr);bi=a(Vc,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Lxmert"),Vc.forEach(t),wi=d(mo),w(Vt.$$.fragment,mo),yi=d(mo),wt=r(mo,"P",{});var er=i(wt);ki=a(er,"If "),Er=r(er,"CODE",{});var Bc=i(Er);Li=a(Bc,"token_ids_1"),Bc.forEach(t),$i=a(er," is "),qr=r(er,"CODE",{});var Xc=i(qr);Fi=a(Xc,"None"),Xc.forEach(t),zi=a(er,", this method only returns the first portion of the mask (0s)."),er.forEach(t),mo.forEach(t),ct.forEach(t),fs=d(o),yt=r(o,"H2",{class:!0});var Ws=i(yt);Bt=r(Ws,"A",{id:!0,class:!0,href:!0});var Hc=i(Bt);Mr=r(Hc,"SPAN",{});var Uc=i(Mr);w(qo.$$.fragment,Uc),Uc.forEach(t),Hc.forEach(t),Ei=d(Ws),Pr=r(Ws,"SPAN",{});var Kc=i(Pr);qi=a(Kc,"Lxmert specific outputs"),Kc.forEach(t),Ws.forEach(t),gs=d(o),kt=r(o,"DIV",{class:!0});var Vs=i(kt);w(Mo.$$.fragment,Vs),Mi=d(Vs),Or=r(Vs,"P",{});var Gc=i(Or);Pi=a(Gc,`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)`),Gc.forEach(t),Vs.forEach(t),_s=d(o),Lt=r(o,"DIV",{class:!0});var Bs=i(Lt);w(Po.$$.fragment,Bs),Oi=d(Bs),Oo=r(Bs,"P",{});var Xs=i(Oo);Ai=a(Xs,"Output type of "),Nn=r(Xs,"A",{href:!0});var Jc=i(Nn);Ci=a(Jc,"LxmertForPreTraining"),Jc.forEach(t),Ni=a(Xs,"."),Xs.forEach(t),Bs.forEach(t),vs=d(o),$t=r(o,"DIV",{class:!0});var Hs=i($t);w(Ao.$$.fragment,Hs),ji=d(Hs),Co=r(Hs,"P",{});var Us=i(Co);Ii=a(Us,"Output type of "),jn=r(Us,"A",{href:!0});var Yc=i(jn);Di=a(Yc,"LxmertForQuestionAnswering"),Yc.forEach(t),Si=a(Us,"."),Us.forEach(t),Hs.forEach(t),Ts=d(o),Ft=r(o,"DIV",{class:!0});var Ks=i(Ft);w(No.$$.fragment,Ks),Ri=d(Ks),Ar=r(Ks,"P",{});var Zc=i(Ar);Qi=a(Zc,`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)`),Zc.forEach(t),Ks.forEach(t),xs=d(o),zt=r(o,"DIV",{class:!0});var Gs=i(zt);w(jo.$$.fragment,Gs),Wi=d(Gs),Io=r(Gs,"P",{});var Js=i(Io);Vi=a(Js,"Output type of "),In=r(Js,"A",{href:!0});var em=i(In);Bi=a(em,"LxmertForPreTraining"),em.forEach(t),Xi=a(Js,"."),Js.forEach(t),Gs.forEach(t),bs=d(o),Et=r(o,"H2",{class:!0});var Ys=i(Et);Xt=r(Ys,"A",{id:!0,class:!0,href:!0});var tm=i(Xt);Cr=r(tm,"SPAN",{});var om=i(Cr);w(Do.$$.fragment,om),om.forEach(t),tm.forEach(t),Hi=d(Ys),Nr=r(Ys,"SPAN",{});var nm=i(Nr);Ui=a(nm,"LxmertModel"),nm.forEach(t),Ys.forEach(t),ws=d(o),K=r(o,"DIV",{class:!0});var Se=i(K);w(So.$$.fragment,Se),Ki=d(Se),jr=r(Se,"P",{});var rm=i(jr);Gi=a(rm,"The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),rm.forEach(t),Ji=d(Se),Ro=r(Se,"P",{});var Zs=i(Ro);Yi=a(Zs,"The LXMERT model was proposed in "),Qo=r(Zs,"A",{href:!0,rel:!0});var sm=i(Qo);Zi=a(sm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),sm.forEach(t),el=a(Zs,` 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.`),Zs.forEach(t),tl=d(Se),Wo=r(Se,"P",{});var ea=i(Wo);ol=a(ea,"This model inherits from "),Dn=r(ea,"A",{href:!0});var am=i(Dn);nl=a(am,"PreTrainedModel"),am.forEach(t),rl=a(ea,`. 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.)`),ea.forEach(t),sl=d(Se),Vo=r(Se,"P",{});var ta=i(Vo);al=a(ta,"This model is also a PyTorch "),Bo=r(ta,"A",{href:!0,rel:!0});var im=i(Bo);il=a(im,"torch.nn.Module"),im.forEach(t),ll=a(ta,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ta.forEach(t),dl=d(Se),Ie=r(Se,"DIV",{class:!0});var ho=i(Ie);w(Xo.$$.fragment,ho),cl=d(ho),qt=r(ho,"P",{});var tr=i(qt);ml=a(tr,"The "),Sn=r(tr,"A",{href:!0});var lm=i(Sn);hl=a(lm,"LxmertModel"),lm.forEach(t),ul=a(tr," forward method, overrides the "),Ir=r(tr,"CODE",{});var dm=i(Ir);pl=a(dm,"__call__"),dm.forEach(t),fl=a(tr," special method."),tr.forEach(t),gl=d(ho),w(Ht.$$.fragment,ho),_l=d(ho),w(Ut.$$.fragment,ho),ho.forEach(t),Se.forEach(t),ys=d(o),Mt=r(o,"H2",{class:!0});var oa=i(Mt);Kt=r(oa,"A",{id:!0,class:!0,href:!0});var cm=i(Kt);Dr=r(cm,"SPAN",{});var mm=i(Dr);w(Ho.$$.fragment,mm),mm.forEach(t),cm.forEach(t),vl=d(oa),Sr=r(oa,"SPAN",{});var hm=i(Sr);Tl=a(hm,"LxmertForPreTraining"),hm.forEach(t),oa.forEach(t),ks=d(o),G=r(o,"DIV",{class:!0});var Re=i(G);w(Uo.$$.fragment,Re),xl=d(Re),Rr=r(Re,"P",{});var um=i(Rr);bl=a(um,"Lxmert Model with a specified pretraining head on top."),um.forEach(t),wl=d(Re),Ko=r(Re,"P",{});var na=i(Ko);yl=a(na,"The LXMERT model was proposed in "),Go=r(na,"A",{href:!0,rel:!0});var pm=i(Go);kl=a(pm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),pm.forEach(t),Ll=a(na,` 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.`),na.forEach(t),$l=d(Re),Jo=r(Re,"P",{});var ra=i(Jo);Fl=a(ra,"This model inherits from "),Rn=r(ra,"A",{href:!0});var fm=i(Rn);zl=a(fm,"PreTrainedModel"),fm.forEach(t),El=a(ra,`. 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.)`),ra.forEach(t),ql=d(Re),Yo=r(Re,"P",{});var sa=i(Yo);Ml=a(sa,"This model is also a PyTorch "),Zo=r(sa,"A",{href:!0,rel:!0});var gm=i(Zo);Pl=a(gm,"torch.nn.Module"),gm.forEach(t),Ol=a(sa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sa.forEach(t),Al=d(Re),lt=r(Re,"DIV",{class:!0});var or=i(lt);w(en.$$.fragment,or),Cl=d(or),Pt=r(or,"P",{});var nr=i(Pt);Nl=a(nr,"The "),Qn=r(nr,"A",{href:!0});var _m=i(Qn);jl=a(_m,"LxmertForPreTraining"),_m.forEach(t),Il=a(nr," forward method, overrides the "),Qr=r(nr,"CODE",{});var vm=i(Qr);Dl=a(vm,"__call__"),vm.forEach(t),Sl=a(nr," special method."),nr.forEach(t),Rl=d(or),w(Gt.$$.fragment,or),or.forEach(t),Re.forEach(t),Ls=d(o),Ot=r(o,"H2",{class:!0});var aa=i(Ot);Jt=r(aa,"A",{id:!0,class:!0,href:!0});var Tm=i(Jt);Wr=r(Tm,"SPAN",{});var xm=i(Wr);w(tn.$$.fragment,xm),xm.forEach(t),Tm.forEach(t),Ql=d(aa),Vr=r(aa,"SPAN",{});var bm=i(Vr);Wl=a(bm,"LxmertForQuestionAnswering"),bm.forEach(t),aa.forEach(t),$s=d(o),J=r(o,"DIV",{class:!0});var Qe=i(J);w(on.$$.fragment,Qe),Vl=d(Qe),Br=r(Qe,"P",{});var wm=i(Br);Bl=a(wm,"Lxmert Model with a visual-answering head on top for downstream QA tasks"),wm.forEach(t),Xl=d(Qe),nn=r(Qe,"P",{});var ia=i(nn);Hl=a(ia,"The LXMERT model was proposed in "),rn=r(ia,"A",{href:!0,rel:!0});var ym=i(rn);Ul=a(ym,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),ym.forEach(t),Kl=a(ia,` 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.`),ia.forEach(t),Gl=d(Qe),sn=r(Qe,"P",{});var la=i(sn);Jl=a(la,"This model inherits from "),Wn=r(la,"A",{href:!0});var km=i(Wn);Yl=a(km,"PreTrainedModel"),km.forEach(t),Zl=a(la,`. 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.)`),la.forEach(t),ed=d(Qe),an=r(Qe,"P",{});var da=i(an);td=a(da,"This model is also a PyTorch "),ln=r(da,"A",{href:!0,rel:!0});var Lm=i(ln);od=a(Lm,"torch.nn.Module"),Lm.forEach(t),nd=a(da,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),da.forEach(t),rd=d(Qe),ve=r(Qe,"DIV",{class:!0});var mt=i(ve);w(dn.$$.fragment,mt),sd=d(mt),At=r(mt,"P",{});var rr=i(At);ad=a(rr,"The "),Vn=r(rr,"A",{href:!0});var $m=i(Vn);id=a($m,"LxmertForQuestionAnswering"),$m.forEach(t),ld=a(rr," forward method, overrides the "),Xr=r(rr,"CODE",{});var Fm=i(Xr);dd=a(Fm,"__call__"),Fm.forEach(t),cd=a(rr," special method."),rr.forEach(t),md=d(mt),w(Yt.$$.fragment,mt),hd=d(mt),w(Zt.$$.fragment,mt),ud=d(mt),w(eo.$$.fragment,mt),mt.forEach(t),Qe.forEach(t),Fs=d(o),Ct=r(o,"H2",{class:!0});var ca=i(Ct);to=r(ca,"A",{id:!0,class:!0,href:!0});var zm=i(to);Hr=r(zm,"SPAN",{});var Em=i(Hr);w(cn.$$.fragment,Em),Em.forEach(t),zm.forEach(t),pd=d(ca),Ur=r(ca,"SPAN",{});var qm=i(Ur);fd=a(qm,"TFLxmertModel"),qm.forEach(t),ca.forEach(t),zs=d(o),Y=r(o,"DIV",{class:!0});var We=i(Y);w(mn.$$.fragment,We),gd=d(We),Kr=r(We,"P",{});var Mm=i(Kr);_d=a(Mm,"The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),Mm.forEach(t),vd=d(We),hn=r(We,"P",{});var ma=i(hn);Td=a(ma,"The LXMERT model was proposed in "),un=r(ma,"A",{href:!0,rel:!0});var Pm=i(un);xd=a(Pm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Pm.forEach(t),bd=a(ma,` 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.`),ma.forEach(t),wd=d(We),pn=r(We,"P",{});var ha=i(pn);yd=a(ha,"This model is also a "),fn=r(ha,"A",{href:!0,rel:!0});var Om=i(fn);kd=a(Om,"tf.keras.Model"),Om.forEach(t),Ld=a(ha,` 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.`),ha.forEach(t),$d=d(We),w(oo.$$.fragment,We),Fd=d(We),De=r(We,"DIV",{class:!0});var uo=i(De);w(gn.$$.fragment,uo),zd=d(uo),Nt=r(uo,"P",{});var sr=i(Nt);Ed=a(sr,"The "),Bn=r(sr,"A",{href:!0});var Am=i(Bn);qd=a(Am,"TFLxmertModel"),Am.forEach(t),Md=a(sr," forward method, overrides the "),Gr=r(sr,"CODE",{});var Cm=i(Gr);Pd=a(Cm,"__call__"),Cm.forEach(t),Od=a(sr," special method."),sr.forEach(t),Ad=d(uo),w(no.$$.fragment,uo),Cd=d(uo),w(ro.$$.fragment,uo),uo.forEach(t),We.forEach(t),Es=d(o),jt=r(o,"H2",{class:!0});var ua=i(jt);so=r(ua,"A",{id:!0,class:!0,href:!0});var Nm=i(so);Jr=r(Nm,"SPAN",{});var jm=i(Jr);w(_n.$$.fragment,jm),jm.forEach(t),Nm.forEach(t),Nd=d(ua),Yr=r(ua,"SPAN",{});var Im=i(Yr);jd=a(Im,"TFLxmertForPreTraining"),Im.forEach(t),ua.forEach(t),qs=d(o),Z=r(o,"DIV",{class:!0});var Ve=i(Z);w(vn.$$.fragment,Ve),Id=d(Ve),Tn=r(Ve,"P",{});var pa=i(Tn);Dd=a(pa,"Lxmert Model with a "),Zr=r(pa,"CODE",{});var Dm=i(Zr);Sd=a(Dm,"language modeling"),Dm.forEach(t),Rd=a(pa," head on top."),pa.forEach(t),Qd=d(Ve),xn=r(Ve,"P",{});var fa=i(xn);Wd=a(fa,"The LXMERT model was proposed in "),bn=r(fa,"A",{href:!0,rel:!0});var Sm=i(bn);Vd=a(Sm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Sm.forEach(t),Bd=a(fa,` 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.`),fa.forEach(t),Xd=d(Ve),wn=r(Ve,"P",{});var ga=i(wn);Hd=a(ga,"This model is also a "),yn=r(ga,"A",{href:!0,rel:!0});var Rm=i(yn);Ud=a(Rm,"tf.keras.Model"),Rm.forEach(t),Kd=a(ga,` 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.`),ga.forEach(t),Gd=d(Ve),w(ao.$$.fragment,Ve),Jd=d(Ve),dt=r(Ve,"DIV",{class:!0});var ar=i(dt);w(kn.$$.fragment,ar),Yd=d(ar),It=r(ar,"P",{});var ir=i(It);Zd=a(ir,"The "),Xn=r(ir,"A",{href:!0});var Qm=i(Xn);ec=a(Qm,"TFLxmertForPreTraining"),Qm.forEach(t),tc=a(ir," forward method, overrides the "),es=r(ir,"CODE",{});var Wm=i(es);oc=a(Wm,"__call__"),Wm.forEach(t),nc=a(ir," special method."),ir.forEach(t),rc=d(ar),w(io.$$.fragment,ar),ar.forEach(t),Ve.forEach(t),this.h()},h(){m(h,"name","hf:doc:metadata"),m(h,"content",JSON.stringify(dh)),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(O,"class","relative group"),m(Oe,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.LxmertModel"),m(Ae,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.TFLxmertModel"),m(Le,"href","https://huggingface.co/unc-nlp/lxmert-base-uncased"),m(Le,"rel","nofollow"),m(Ce,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),m(En,"href","/docs/transformers/pr_19907/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(Dt,"id","transformers.LxmertTokenizer"),m(Dt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Dt,"href","#transformers.LxmertTokenizer"),m(Tt,"class","relative group"),m(qn,"href","/docs/transformers/pr_19907/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(St,"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(Qt,"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(Wt,"id","transformers.LxmertTokenizerFast"),m(Wt,"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(Wt,"href","#transformers.LxmertTokenizerFast"),m(bt,"class","relative group"),m(On,"href","/docs/transformers/pr_19907/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(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(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(Bt,"id","transformers.models.lxmert.modeling_lxmert.LxmertModelOutput"),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.models.lxmert.modeling_lxmert.LxmertModelOutput"),m(yt,"class","relative group"),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/pr_19907/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(jn,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.LxmertForQuestionAnswering"),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(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(In,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.LxmertForPreTraining"),m(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xt,"id","transformers.LxmertModel"),m(Xt,"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(Xt,"href","#transformers.LxmertModel"),m(Et,"class","relative group"),m(Qo,"href","https://arxiv.org/abs/1908.07490"),m(Qo,"rel","nofollow"),m(Dn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(Bo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Bo,"rel","nofollow"),m(Sn,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.LxmertModel"),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(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(Kt,"id","transformers.LxmertForPreTraining"),m(Kt,"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(Kt,"href","#transformers.LxmertForPreTraining"),m(Mt,"class","relative group"),m(Go,"href","https://arxiv.org/abs/1908.07490"),m(Go,"rel","nofollow"),m(Rn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(Zo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Zo,"rel","nofollow"),m(Qn,"href","/docs/transformers/pr_19907/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(Jt,"id","transformers.LxmertForQuestionAnswering"),m(Jt,"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(Jt,"href","#transformers.LxmertForQuestionAnswering"),m(Ot,"class","relative group"),m(rn,"href","https://arxiv.org/abs/1908.07490"),m(rn,"rel","nofollow"),m(Wn,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),m(ln,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ln,"rel","nofollow"),m(Vn,"href","/docs/transformers/pr_19907/en/model_doc/lxmert#transformers.LxmertForQuestionAnswering"),m(ve,"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(to,"id","transformers.TFLxmertModel"),m(to,"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(to,"href","#transformers.TFLxmertModel"),m(Ct,"class","relative group"),m(un,"href","https://arxiv.org/abs/1908.07490"),m(un,"rel","nofollow"),m(fn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(fn,"rel","nofollow"),m(Bn,"href","/docs/transformers/pr_19907/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(so,"id","transformers.TFLxmertForPreTraining"),m(so,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(so,"href","#transformers.TFLxmertForPreTraining"),m(jt,"class","relative group"),m(bn,"href","https://arxiv.org/abs/1908.07490"),m(bn,"rel","nofollow"),m(yn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(yn,"rel","nofollow"),m(Xn,"href","/docs/transformers/pr_19907/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,x,f),u(o,g,f),e(g,_),e(_,T),y(c,T,null),e(g,p),e(g,q),e(q,Be),u(o,Fe,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,ze,f),u(o,R,f),e(R,Ue),e(R,ne),e(ne,re),e(R,Ke),u(o,Ee,f),u(o,W,f),e(W,Ge),u(o,qe,f),u(o,V,f),e(V,xe),e(xe,Je),u(o,ge,f),u(o,P,f),e(P,j),u(o,Me,f),u(o,C,f),e(C,be),e(be,Ye),e(C,se),e(C,we),e(we,Ze),e(C,I),e(C,ye),e(ye,ae),u(o,Pe,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,O,f),e(O,te),e(te,D),y(me,D,null),e(O,ot),e(O,v),e(v,E),u(o,st,f),u(o,S,f),y(ke,S,null),e(S,ht),e(S,z),e(z,ut),e(z,Oe),e(Oe,pt),e(z,ft),e(z,Ae),e(Ae,U),e(z,he),e(z,Le),e(Le,gt),e(z,ue),e(S,_t),e(S,pe),e(pe,nt),e(pe,Ce),e(Ce,$e),e(pe,vt),e(pe,En),e(En,_a),e(pe,va),u(o,ms,f),u(o,Tt,f),e(Tt,Dt),e(Dt,mr),y(po,mr,null),e(Tt,Ta),e(Tt,hr),e(hr,xa),u(o,hs,f),u(o,Q,f),y(fo,Q,null),e(Q,ba),e(Q,ur),e(ur,wa),e(Q,ya),e(Q,go),e(go,ka),e(go,qn),e(qn,La),e(go,$a),e(Q,Fa),e(Q,at),y(_o,at,null),e(at,za),e(at,pr),e(pr,Ea),e(at,qa),e(at,vo),e(vo,Mn),e(Mn,Ma),e(Mn,fr),e(fr,Pa),e(vo,Oa),e(vo,Pn),e(Pn,Aa),e(Pn,gr),e(gr,Ca),e(Q,Na),e(Q,St),y(To,St,null),e(St,ja),e(St,_r),e(_r,Ia),e(Q,Da),e(Q,Ne),y(xo,Ne,null),e(Ne,Sa),e(Ne,vr),e(vr,Ra),e(Ne,Qa),y(Rt,Ne,null),e(Ne,Wa),e(Ne,xt),e(xt,Va),e(xt,Tr),e(Tr,Ba),e(xt,Xa),e(xt,xr),e(xr,Ha),e(xt,Ua),e(Q,Ka),e(Q,Qt),y(bo,Qt,null),e(Qt,Ga),e(Qt,wo),e(wo,Ja),e(wo,br),e(br,Ya),e(wo,Za),u(o,us,f),u(o,bt,f),e(bt,Wt),e(Wt,wr),y(yo,wr,null),e(bt,ei),e(bt,yr),e(yr,ti),u(o,ps,f),u(o,fe,f),y(ko,fe,null),e(fe,oi),e(fe,Lo),e(Lo,ni),e(Lo,kr),e(kr,ri),e(Lo,si),e(fe,ai),e(fe,$o),e($o,ii),e($o,On),e(On,li),e($o,di),e(fe,ci),e(fe,it),y(Fo,it,null),e(it,mi),e(it,Lr),e(Lr,hi),e(it,ui),e(it,zo),e(zo,An),e(An,pi),e(An,$r),e($r,fi),e(zo,gi),e(zo,Cn),e(Cn,_i),e(Cn,Fr),e(Fr,vi),e(fe,Ti),e(fe,je),y(Eo,je,null),e(je,xi),e(je,zr),e(zr,bi),e(je,wi),y(Vt,je,null),e(je,yi),e(je,wt),e(wt,ki),e(wt,Er),e(Er,Li),e(wt,$i),e(wt,qr),e(qr,Fi),e(wt,zi),u(o,fs,f),u(o,yt,f),e(yt,Bt),e(Bt,Mr),y(qo,Mr,null),e(yt,Ei),e(yt,Pr),e(Pr,qi),u(o,gs,f),u(o,kt,f),y(Mo,kt,null),e(kt,Mi),e(kt,Or),e(Or,Pi),u(o,_s,f),u(o,Lt,f),y(Po,Lt,null),e(Lt,Oi),e(Lt,Oo),e(Oo,Ai),e(Oo,Nn),e(Nn,Ci),e(Oo,Ni),u(o,vs,f),u(o,$t,f),y(Ao,$t,null),e($t,ji),e($t,Co),e(Co,Ii),e(Co,jn),e(jn,Di),e(Co,Si),u(o,Ts,f),u(o,Ft,f),y(No,Ft,null),e(Ft,Ri),e(Ft,Ar),e(Ar,Qi),u(o,xs,f),u(o,zt,f),y(jo,zt,null),e(zt,Wi),e(zt,Io),e(Io,Vi),e(Io,In),e(In,Bi),e(Io,Xi),u(o,bs,f),u(o,Et,f),e(Et,Xt),e(Xt,Cr),y(Do,Cr,null),e(Et,Hi),e(Et,Nr),e(Nr,Ui),u(o,ws,f),u(o,K,f),y(So,K,null),e(K,Ki),e(K,jr),e(jr,Gi),e(K,Ji),e(K,Ro),e(Ro,Yi),e(Ro,Qo),e(Qo,Zi),e(Ro,el),e(K,tl),e(K,Wo),e(Wo,ol),e(Wo,Dn),e(Dn,nl),e(Wo,rl),e(K,sl),e(K,Vo),e(Vo,al),e(Vo,Bo),e(Bo,il),e(Vo,ll),e(K,dl),e(K,Ie),y(Xo,Ie,null),e(Ie,cl),e(Ie,qt),e(qt,ml),e(qt,Sn),e(Sn,hl),e(qt,ul),e(qt,Ir),e(Ir,pl),e(qt,fl),e(Ie,gl),y(Ht,Ie,null),e(Ie,_l),y(Ut,Ie,null),u(o,ys,f),u(o,Mt,f),e(Mt,Kt),e(Kt,Dr),y(Ho,Dr,null),e(Mt,vl),e(Mt,Sr),e(Sr,Tl),u(o,ks,f),u(o,G,f),y(Uo,G,null),e(G,xl),e(G,Rr),e(Rr,bl),e(G,wl),e(G,Ko),e(Ko,yl),e(Ko,Go),e(Go,kl),e(Ko,Ll),e(G,$l),e(G,Jo),e(Jo,Fl),e(Jo,Rn),e(Rn,zl),e(Jo,El),e(G,ql),e(G,Yo),e(Yo,Ml),e(Yo,Zo),e(Zo,Pl),e(Yo,Ol),e(G,Al),e(G,lt),y(en,lt,null),e(lt,Cl),e(lt,Pt),e(Pt,Nl),e(Pt,Qn),e(Qn,jl),e(Pt,Il),e(Pt,Qr),e(Qr,Dl),e(Pt,Sl),e(lt,Rl),y(Gt,lt,null),u(o,Ls,f),u(o,Ot,f),e(Ot,Jt),e(Jt,Wr),y(tn,Wr,null),e(Ot,Ql),e(Ot,Vr),e(Vr,Wl),u(o,$s,f),u(o,J,f),y(on,J,null),e(J,Vl),e(J,Br),e(Br,Bl),e(J,Xl),e(J,nn),e(nn,Hl),e(nn,rn),e(rn,Ul),e(nn,Kl),e(J,Gl),e(J,sn),e(sn,Jl),e(sn,Wn),e(Wn,Yl),e(sn,Zl),e(J,ed),e(J,an),e(an,td),e(an,ln),e(ln,od),e(an,nd),e(J,rd),e(J,ve),y(dn,ve,null),e(ve,sd),e(ve,At),e(At,ad),e(At,Vn),e(Vn,id),e(At,ld),e(At,Xr),e(Xr,dd),e(At,cd),e(ve,md),y(Yt,ve,null),e(ve,hd),y(Zt,ve,null),e(ve,ud),y(eo,ve,null),u(o,Fs,f),u(o,Ct,f),e(Ct,to),e(to,Hr),y(cn,Hr,null),e(Ct,pd),e(Ct,Ur),e(Ur,fd),u(o,zs,f),u(o,Y,f),y(mn,Y,null),e(Y,gd),e(Y,Kr),e(Kr,_d),e(Y,vd),e(Y,hn),e(hn,Td),e(hn,un),e(un,xd),e(hn,bd),e(Y,wd),e(Y,pn),e(pn,yd),e(pn,fn),e(fn,kd),e(pn,Ld),e(Y,$d),y(oo,Y,null),e(Y,Fd),e(Y,De),y(gn,De,null),e(De,zd),e(De,Nt),e(Nt,Ed),e(Nt,Bn),e(Bn,qd),e(Nt,Md),e(Nt,Gr),e(Gr,Pd),e(Nt,Od),e(De,Ad),y(no,De,null),e(De,Cd),y(ro,De,null),u(o,Es,f),u(o,jt,f),e(jt,so),e(so,Jr),y(_n,Jr,null),e(jt,Nd),e(jt,Yr),e(Yr,jd),u(o,qs,f),u(o,Z,f),y(vn,Z,null),e(Z,Id),e(Z,Tn),e(Tn,Dd),e(Tn,Zr),e(Zr,Sd),e(Tn,Rd),e(Z,Qd),e(Z,xn),e(xn,Wd),e(xn,bn),e(bn,Vd),e(xn,Bd),e(Z,Xd),e(Z,wn),e(wn,Hd),e(wn,yn),e(yn,Ud),e(wn,Kd),e(Z,Gd),y(ao,Z,null),e(Z,Jd),e(Z,dt),y(kn,dt,null),e(dt,Yd),e(dt,It),e(It,Zd),e(It,Xn),e(Xn,ec),e(It,tc),e(It,es),e(es,oc),e(It,nc),e(dt,rc),y(io,dt,null),Ms=!0},p(o,[f]){const Ln={};f&2&&(Ln.$$scope={dirty:f,ctx:o}),Rt.$set(Ln);const ts={};f&2&&(ts.$$scope={dirty:f,ctx:o}),Vt.$set(ts);const os={};f&2&&(os.$$scope={dirty:f,ctx:o}),Ht.$set(os);const ns={};f&2&&(ns.$$scope={dirty:f,ctx:o}),Ut.$set(ns);const $n={};f&2&&($n.$$scope={dirty:f,ctx:o}),Gt.$set($n);const rs={};f&2&&(rs.$$scope={dirty:f,ctx:o}),Yt.$set(rs);const ss={};f&2&&(ss.$$scope={dirty:f,ctx:o}),Zt.$set(ss);const as={};f&2&&(as.$$scope={dirty:f,ctx:o}),eo.$set(as);const Fn={};f&2&&(Fn.$$scope={dirty:f,ctx:o}),oo.$set(Fn);const is={};f&2&&(is.$$scope={dirty:f,ctx:o}),no.$set(is);const ls={};f&2&&(ls.$$scope={dirty:f,ctx:o}),ro.$set(ls);const ds={};f&2&&(ds.$$scope={dirty:f,ctx:o}),ao.$set(ds);const cs={};f&2&&(cs.$$scope={dirty:f,ctx:o}),io.$set(cs)},i(o){Ms||(k(c.$$.fragment,o),k(F.$$.fragment,o),k(me.$$.fragment,o),k(ke.$$.fragment,o),k(po.$$.fragment,o),k(fo.$$.fragment,o),k(_o.$$.fragment,o),k(To.$$.fragment,o),k(xo.$$.fragment,o),k(Rt.$$.fragment,o),k(bo.$$.fragment,o),k(yo.$$.fragment,o),k(ko.$$.fragment,o),k(Fo.$$.fragment,o),k(Eo.$$.fragment,o),k(Vt.$$.fragment,o),k(qo.$$.fragment,o),k(Mo.$$.fragment,o),k(Po.$$.fragment,o),k(Ao.$$.fragment,o),k(No.$$.fragment,o),k(jo.$$.fragment,o),k(Do.$$.fragment,o),k(So.$$.fragment,o),k(Xo.$$.fragment,o),k(Ht.$$.fragment,o),k(Ut.$$.fragment,o),k(Ho.$$.fragment,o),k(Uo.$$.fragment,o),k(en.$$.fragment,o),k(Gt.$$.fragment,o),k(tn.$$.fragment,o),k(on.$$.fragment,o),k(dn.$$.fragment,o),k(Yt.$$.fragment,o),k(Zt.$$.fragment,o),k(eo.$$.fragment,o),k(cn.$$.fragment,o),k(mn.$$.fragment,o),k(oo.$$.fragment,o),k(gn.$$.fragment,o),k(no.$$.fragment,o),k(ro.$$.fragment,o),k(_n.$$.fragment,o),k(vn.$$.fragment,o),k(ao.$$.fragment,o),k(kn.$$.fragment,o),k(io.$$.fragment,o),Ms=!0)},o(o){L(c.$$.fragment,o),L(F.$$.fragment,o),L(me.$$.fragment,o),L(ke.$$.fragment,o),L(po.$$.fragment,o),L(fo.$$.fragment,o),L(_o.$$.fragment,o),L(To.$$.fragment,o),L(xo.$$.fragment,o),L(Rt.$$.fragment,o),L(bo.$$.fragment,o),L(yo.$$.fragment,o),L(ko.$$.fragment,o),L(Fo.$$.fragment,o),L(Eo.$$.fragment,o),L(Vt.$$.fragment,o),L(qo.$$.fragment,o),L(Mo.$$.fragment,o),L(Po.$$.fragment,o),L(Ao.$$.fragment,o),L(No.$$.fragment,o),L(jo.$$.fragment,o),L(Do.$$.fragment,o),L(So.$$.fragment,o),L(Xo.$$.fragment,o),L(Ht.$$.fragment,o),L(Ut.$$.fragment,o),L(Ho.$$.fragment,o),L(Uo.$$.fragment,o),L(en.$$.fragment,o),L(Gt.$$.fragment,o),L(tn.$$.fragment,o),L(on.$$.fragment,o),L(dn.$$.fragment,o),L(Yt.$$.fragment,o),L(Zt.$$.fragment,o),L(eo.$$.fragment,o),L(cn.$$.fragment,o),L(mn.$$.fragment,o),L(oo.$$.fragment,o),L(gn.$$.fragment,o),L(no.$$.fragment,o),L(ro.$$.fragment,o),L(_n.$$.fragment,o),L(vn.$$.fragment,o),L(ao.$$.fragment,o),L(kn.$$.fragment,o),L(io.$$.fragment,o),Ms=!1},d(o){t(h),o&&t(x),o&&t(g),$(c),o&&t(Fe),o&&t(N),$(F),o&&t(ze),o&&t(R),o&&t(Ee),o&&t(W),o&&t(qe),o&&t(V),o&&t(ge),o&&t(P),o&&t(Me),o&&t(C),o&&t(Pe),o&&t(B),o&&t(_e),o&&t(O),$(me),o&&t(st),o&&t(S),$(ke),o&&t(ms),o&&t(Tt),$(po),o&&t(hs),o&&t(Q),$(fo),$(_o),$(To),$(xo),$(Rt),$(bo),o&&t(us),o&&t(bt),$(yo),o&&t(ps),o&&t(fe),$(ko),$(Fo),$(Eo),$(Vt),o&&t(fs),o&&t(yt),$(qo),o&&t(gs),o&&t(kt),$(Mo),o&&t(_s),o&&t(Lt),$(Po),o&&t(vs),o&&t($t),$(Ao),o&&t(Ts),o&&t(Ft),$(No),o&&t(xs),o&&t(zt),$(jo),o&&t(bs),o&&t(Et),$(Do),o&&t(ws),o&&t(K),$(So),$(Xo),$(Ht),$(Ut),o&&t(ys),o&&t(Mt),$(Ho),o&&t(ks),o&&t(G),$(Uo),$(en),$(Gt),o&&t(Ls),o&&t(Ot),$(tn),o&&t($s),o&&t(J),$(on),$(dn),$(Yt),$(Zt),$(eo),o&&t(Fs),o&&t(Ct),$(cn),o&&t(zs),o&&t(Y),$(mn),$(oo),$(gn),$(no),$(ro),o&&t(Es),o&&t(jt),$(_n),o&&t(qs),o&&t(Z),$(vn),$(ao),$(kn),$(io)}}}const dh={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 ch(M){return Um(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _h extends Vm{constructor(h){super();Bm(this,h,ch,lh,Xm,{})}}export{_h as default,dh as metadata};
