import{S as Vm,i as Bm,s as Xm,e as n,k as l,w as b,t as r,M as Hm,c as s,d as t,m as d,a as i,x as w,h as a,b as m,G as e,g as u,y,q as k,o as L,B as $,v as Um,L as ds}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 cs}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as st}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ls}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Km(M){let h,x,g,_,T;return _=new cs({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=r("sequence pair mask has the following format:"),g=l(),b(_.$$.fragment)},l(c){h=s(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:ds,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 cs({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=r("sequence pair mask has the following format:"),g=l(),b(_.$$.fragment)},l(c){h=s(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:ds,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=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=s(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function Ym(M){let h,x,g,_,T;return _=new cs({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=r("Example:"),g=l(),b(_.$$.fragment)},l(c){h=s(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:ds,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=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=s(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,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=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=s(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function th(M){let h,x,g,_,T;return _=new cs({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, skip_special_tokens=True)
`,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, skip_special_tokens=<span class="hljs-literal">True</span>)
`}}),{c(){h=n("p"),x=r("Example:"),g=l(),b(_.$$.fragment)},l(c){h=s(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:ds,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 cs({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:ds,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,se,Ke,Ee,W,Ge,qe,V,xe,Je,ge,P,j,Me,C,be,Ye,re,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=r("TensorFlow models and layers in "),g=n("code"),_=r("transformers"),T=r(" accept two formats as input:"),c=l(),p=n("ul"),q=n("li"),Be=r("having all inputs as keyword arguments (like PyTorch models), or"),Fe=l(),N=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),oe=l(),F=n("p"),Xe=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=n("code"),He=r("model.fit()"),ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=n("code"),Ue=r("model.fit()"),ne=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=n("code"),Ke=r("fit()"),Ee=r(" and "),W=n("code"),Ge=r("predict()"),qe=r(`, such as when creating your own layers or models with
the Keras `),V=n("code"),xe=r("Functional"),Je=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ge=l(),P=n("ul"),j=n("li"),Me=r("a single Tensor with "),C=n("code"),be=r("input_ids"),Ye=r(" only and nothing else: "),re=n("code"),we=r("model(input_ids)"),Ze=l(),I=n("li"),ye=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=n("code"),Pe=r("model([input_ids, attention_mask])"),B=r(" or "),ie=n("code"),le=r("model([input_ids, attention_mask, token_type_ids])"),et=l(),H=n("li"),de=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n("code"),tt=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),_e=l(),O=n("p"),te=r(`Note that when creating models and layers with
`),D=n("a"),me=r("subclassing"),ot=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){h=s(v,"P",{});var E=i(h);x=a(E,"TensorFlow models and layers in "),g=s(E,"CODE",{});var rt=i(g);_=a(rt,"transformers"),rt.forEach(t),T=a(E," accept two formats as input:"),E.forEach(t),c=d(v),p=s(v,"UL",{});var S=i(p);q=s(S,"LI",{});var ke=i(q);Be=a(ke,"having all inputs as keyword arguments (like PyTorch models), or"),ke.forEach(t),Fe=d(S),N=s(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=s(v,"P",{});var z=i(F);Xe=a(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s(z,"CODE",{});var 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=s(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 `),se=s(z,"CODE",{});var pt=i(se);Ke=a(pt,"fit()"),pt.forEach(t),Ee=a(z," and "),W=s(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=s(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=s(v,"UL",{});var U=i(P);j=s(U,"LI",{});var he=i(j);Me=a(he,"a single Tensor with "),C=s(he,"CODE",{});var Le=i(C);be=a(Le,"input_ids"),Le.forEach(t),Ye=a(he," only and nothing else: "),re=s(he,"CODE",{});var gt=i(re);we=a(gt,"model(input_ids)"),gt.forEach(t),he.forEach(t),Ze=d(U),I=s(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=s(ue,"CODE",{});var _t=i(ae);Pe=a(_t,"model([input_ids, attention_mask])"),_t.forEach(t),B=a(ue," or "),ie=s(ue,"CODE",{});var pe=i(ie);le=a(pe,"model([input_ids, attention_mask, token_type_ids])"),pe.forEach(t),ue.forEach(t),et=d(U),H=s(U,"LI",{});var nt=i(H);de=a(nt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=s(nt,"CODE",{});var 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=s(v,"P",{});var $e=i(O);te=a($e,`Note that when creating models and layers with
`),D=s($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,se),e(se,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,re),e(re,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 sh(M){let h,x,g,_,T;return{c(){h=n("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=s(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,x),e(h,g),e(g,_),e(h,T)},d(c){c&&t(h)}}}function rh(M){let h,x,g,_,T;return _=new cs({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=r("Example:"),g=l(),b(_.$$.fragment)},l(c){h=s(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:ds,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,se,Ke,Ee,W,Ge,qe,V,xe,Je,ge,P,j,Me,C,be,Ye,re,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=r("TensorFlow models and layers in "),g=n("code"),_=r("transformers"),T=r(" accept two formats as input:"),c=l(),p=n("ul"),q=n("li"),Be=r("having all inputs as keyword arguments (like PyTorch models), or"),Fe=l(),N=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),oe=l(),F=n("p"),Xe=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=n("code"),He=r("model.fit()"),ze=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),R=n("code"),Ue=r("model.fit()"),ne=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),se=n("code"),Ke=r("fit()"),Ee=r(" and "),W=n("code"),Ge=r("predict()"),qe=r(`, such as when creating your own layers or models with
the Keras `),V=n("code"),xe=r("Functional"),Je=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ge=l(),P=n("ul"),j=n("li"),Me=r("a single Tensor with "),C=n("code"),be=r("input_ids"),Ye=r(" only and nothing else: "),re=n("code"),we=r("model(input_ids)"),Ze=l(),I=n("li"),ye=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=n("code"),Pe=r("model([input_ids, attention_mask])"),B=r(" or "),ie=n("code"),le=r("model([input_ids, attention_mask, token_type_ids])"),et=l(),H=n("li"),de=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n("code"),tt=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),_e=l(),O=n("p"),te=r(`Note that when creating models and layers with
`),D=n("a"),me=r("subclassing"),ot=r(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){h=s(v,"P",{});var E=i(h);x=a(E,"TensorFlow models and layers in "),g=s(E,"CODE",{});var rt=i(g);_=a(rt,"transformers"),rt.forEach(t),T=a(E," accept two formats as input:"),E.forEach(t),c=d(v),p=s(v,"UL",{});var S=i(p);q=s(S,"LI",{});var ke=i(q);Be=a(ke,"having all inputs as keyword arguments (like PyTorch models), or"),ke.forEach(t),Fe=d(S),N=s(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=s(v,"P",{});var z=i(F);Xe=a(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s(z,"CODE",{});var 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=s(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 `),se=s(z,"CODE",{});var pt=i(se);Ke=a(pt,"fit()"),pt.forEach(t),Ee=a(z," and "),W=s(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=s(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=s(v,"UL",{});var U=i(P);j=s(U,"LI",{});var he=i(j);Me=a(he,"a single Tensor with "),C=s(he,"CODE",{});var Le=i(C);be=a(Le,"input_ids"),Le.forEach(t),Ye=a(he," only and nothing else: "),re=s(he,"CODE",{});var gt=i(re);we=a(gt,"model(input_ids)"),gt.forEach(t),he.forEach(t),Ze=d(U),I=s(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=s(ue,"CODE",{});var _t=i(ae);Pe=a(_t,"model([input_ids, attention_mask])"),_t.forEach(t),B=a(ue," or "),ie=s(ue,"CODE",{});var pe=i(ie);le=a(pe,"model([input_ids, attention_mask, token_type_ids])"),pe.forEach(t),ue.forEach(t),et=d(U),H=s(U,"LI",{});var nt=i(H);de=a(nt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=s(nt,"CODE",{});var 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=s(v,"P",{});var $e=i(O);te=a($e,`Note that when creating models and layers with
`),D=s($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,se),e(se,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,re),e(re,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=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),_=r("Module"),T=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=s(c,"P",{});var p=i(h);x=a(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(p,"CODE",{});var q=i(g);_=a(q,"Module"),q.forEach(t),T=a(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(c,p){u(c,h,p),e(h,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,se,Ke,Ee,W,Ge,qe,V,xe,Je,ge,P,j,Me,C,be,Ye,re,we,Ze,I,ye,ae,Pe,B,ie,le,et,H,de,ce,tt,_e,O,te,D,me,ot,v,E,rt,S,ke,ht,z,ut,Oe,pt,ft,Ae,U,he,Le,gt,ue,_t,pe,nt,Ce,$e,vt,En,_a,va,mr,Tt,Dt,ms,po,Ta,hs,xa,hr,Q,fo,ba,us,wa,ya,go,ka,qn,La,$a,Fa,at,_o,za,ps,Ea,qa,vo,Mn,Ma,fs,Pa,Oa,Pn,Aa,gs,Ca,Na,St,To,ja,_s,Ia,Da,Ne,xo,Sa,vs,Ra,Qa,Rt,Wa,xt,Va,Ts,Ba,Xa,xs,Ha,Ua,Ka,Qt,bo,Ga,wo,Ja,bs,Ya,Za,ur,bt,Wt,ws,yo,ei,ys,ti,pr,fe,ko,oi,Lo,ni,ks,si,ri,ai,$o,ii,On,li,di,ci,it,Fo,mi,Ls,hi,ui,zo,An,pi,$s,fi,gi,Cn,_i,Fs,vi,Ti,je,Eo,xi,zs,bi,wi,Vt,yi,wt,ki,Es,Li,$i,qs,Fi,zi,fr,yt,Bt,Ms,qo,Ei,Ps,qi,gr,kt,Mo,Mi,Os,Pi,_r,Lt,Po,Oi,Oo,Ai,Nn,Ci,Ni,vr,$t,Ao,ji,Co,Ii,jn,Di,Si,Tr,Ft,No,Ri,As,Qi,xr,zt,jo,Wi,Io,Vi,In,Bi,Xi,br,Et,Xt,Cs,Do,Hi,Ns,Ui,wr,K,So,Ki,js,Gi,Ji,Ro,Yi,Qo,Zi,el,tl,Wo,ol,Dn,nl,sl,rl,Vo,al,Bo,il,ll,dl,Ie,Xo,cl,qt,ml,Sn,hl,ul,Is,pl,fl,gl,Ht,_l,Ut,yr,Mt,Kt,Ds,Ho,vl,Ss,Tl,kr,G,Uo,xl,Rs,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,Qs,Dl,Sl,Rl,Gt,Lr,Ot,Jt,Ws,tn,Ql,Vs,Wl,$r,J,on,Vl,Bs,Bl,Xl,nn,Hl,sn,Ul,Kl,Gl,rn,Jl,Wn,Yl,Zl,ed,an,td,ln,od,nd,sd,ve,dn,rd,At,ad,Vn,id,ld,Xs,dd,cd,md,Yt,hd,Zt,ud,eo,Fr,Ct,to,Hs,cn,pd,Us,fd,zr,Y,mn,gd,Ks,_d,vd,hn,Td,un,xd,bd,wd,pn,yd,fn,kd,Ld,$d,oo,Fd,De,gn,zd,Nt,Ed,Bn,qd,Md,Gs,Pd,Od,Ad,no,Cd,so,Er,jt,ro,Js,_n,Nd,Ys,jd,qr,Z,vn,Id,Tn,Dd,Zs,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,er,oc,nc,sc,io,Mr;return c=new st({}),F=new st({}),me=new st({}),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/v4.25.1/en/model_doc/lxmert#transformers.LxmertModel">LxmertModel</a> or <a href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/configuration_lxmert.py#L29"}}),po=new st({}),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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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 ls({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/v4.25.1/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 st({}),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/v4.25.1/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/v4.25.1/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/v4.25.1/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 ls({props:{anchor:"transformers.LxmertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Gm]},$$scope:{ctx:M}}}),qo=new st({}),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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/modeling_tf_lxmert.py#L106"}}),Do=new st({}),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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/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/v4.25.1/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/lxmert/modeling_lxmert.py#L901",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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 ls({props:{anchor:"transformers.LxmertModel.forward.example",$$slots:{default:[Ym]},$$scope:{ctx:M}}}),Ho=new st({}),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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/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/v4.25.1/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/modeling_lxmert.py#L1155",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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 st({}),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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/lxmert/modeling_lxmert.py#L1294"}}),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/v4.25.1/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/modeling_lxmert.py#L1387",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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 ls({props:{anchor:"transformers.LxmertForQuestionAnswering.forward.example",$$slots:{default:[th]},$$scope:{ctx:M}}}),eo=new ls({props:{anchor:"transformers.LxmertForQuestionAnswering.forward.example-2",$$slots:{default:[oh]},$$scope:{ctx:M}}}),cn=new st({}),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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/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/v4.25.1/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/modeling_tf_lxmert.py#L951",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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:[sh]},$$scope:{ctx:M}}}),so=new ls({props:{anchor:"transformers.TFLxmertModel.call.example",$$slots:{default:[rh]},$$scope:{ctx:M}}}),_n=new st({}),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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/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/v4.25.1/en/model_doc/lxmert#transformers.LxmertTokenizer">LxmertTokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/lxmert/modeling_tf_lxmert.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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=r("LXMERT"),Fe=l(),N=n("h2"),ee=n("a"),oe=n("span"),b(F.$$.fragment),Xe=l(),X=n("span"),He=r("Overview"),ze=l(),R=n("p"),Ue=r("The LXMERT model was proposed in "),ne=n("a"),se=r("LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),Ke=r(` by Hao Tan & Mohit Bansal. It is a series of bidirectional transformer encoders
(one for the vision modality, one for the language modality, and then one to fuse both modalities) pretrained using a
combination of masked language modeling, visual-language text alignment, ROI-feature regression, masked
visual-attribute modeling, masked visual-object modeling, and visual-question answering objectives. The pretraining
consists of multiple multi-modal datasets: MSCOCO, Visual-Genome + Visual-Genome Question Answering, VQA 2.0, and GQA.`),Ee=l(),W=n("p"),Ge=r("The abstract from the paper is the following:"),qe=l(),V=n("p"),xe=n("em"),Je=r(`Vision-and-language reasoning requires an understanding of visual concepts, language semantics, and, most importantly,
the alignment and relationships between these two modalities. We thus propose the LXMERT (Learning Cross-Modality
Encoder Representations from Transformers) framework to learn these vision-and-language connections. In LXMERT, we
build a large-scale Transformer model that consists of three encoders: an object relationship encoder, a language
encoder, and a cross-modality encoder. Next, to endow our model with the capability of connecting vision and language
semantics, we pre-train the model with large amounts of image-and-sentence pairs, via five diverse representative
pretraining tasks: masked language modeling, masked object prediction (feature regression and label classification),
cross-modality matching, and image question answering. These tasks help in learning both intra-modality and
cross-modality relationships. After fine-tuning from our pretrained parameters, our model achieves the state-of-the-art
results on two visual question answering datasets (i.e., VQA and GQA). We also show the generalizability of our
pretrained cross-modality model by adapting it to a challenging visual-reasoning task, NLVR, and improve the previous
best result by 22% absolute (54% to 76%). Lastly, we demonstrate detailed ablation studies to prove that both our novel
model components and pretraining strategies significantly contribute to our strong results; and also present several
attention visualizations for the different encoders`),ge=l(),P=n("p"),j=r("Tips:"),Me=l(),C=n("ul"),be=n("li"),Ye=r(`Bounding boxes are not necessary to be used in the visual feature embeddings, any kind of visual-spacial features
will work.`),re=l(),we=n("li"),Ze=r(`Both the language hidden states and the visual hidden states that LXMERT outputs are passed through the
cross-modality layer, so they contain information from both modalities. To access a modality that only attends to
itself, select the vision/language hidden states from the first input in the tuple.`),I=l(),ye=n("li"),ae=r(`The bidirectional cross-modality encoder attention only returns attention values when the language modality is used
as the input and the vision modality is used as the context vector. Further, while the cross-modality encoder
contains self-attention for each respective modality and cross-attention, only the cross attention is returned and
both self attention outputs are disregarded.`),Pe=l(),B=n("p"),ie=r("This model was contributed by "),le=n("a"),et=r("eltoto1219"),H=r(". The original code can be found "),de=n("a"),ce=r("here"),tt=r("."),_e=l(),O=n("h2"),te=n("a"),D=n("span"),b(me.$$.fragment),ot=l(),v=n("span"),E=r("LxmertConfig"),rt=l(),S=n("div"),b(ke.$$.fragment),ht=l(),z=n("p"),ut=r("This is the configuration class to store the configuration of a "),Oe=n("a"),pt=r("LxmertModel"),ft=r(" or a "),Ae=n("a"),U=r("TFLxmertModel"),he=r(`. It is used
to instantiate a LXMERT model according to the specified arguments, defining the model architecture. Instantiating
a configuration with the defaults will yield a similar configuration to that of the Lxmert
`),Le=n("a"),gt=r("unc-nlp/lxmert-base-uncased"),ue=r(" architecture."),_t=l(),pe=n("p"),nt=r("Configuration objects inherit from "),Ce=n("a"),$e=r("PretrainedConfig"),vt=r(` and can be used to control the model outputs. Read the
documentation from `),En=n("a"),_a=r("PretrainedConfig"),va=r(" for more information."),mr=l(),Tt=n("h2"),Dt=n("a"),ms=n("span"),b(po.$$.fragment),Ta=l(),hs=n("span"),xa=r("LxmertTokenizer"),hr=l(),Q=n("div"),b(fo.$$.fragment),ba=l(),us=n("p"),wa=r("Construct a Lxmert tokenizer. Based on WordPiece."),ya=l(),go=n("p"),ka=r("This tokenizer inherits from "),qn=n("a"),La=r("PreTrainedTokenizer"),$a=r(` 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(),ps=n("p"),Ea=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),qa=l(),vo=n("ul"),Mn=n("li"),Ma=r("single sequence: "),fs=n("code"),Pa=r("[CLS] X [SEP]"),Oa=l(),Pn=n("li"),Aa=r("pair of sequences: "),gs=n("code"),Ca=r("[CLS] A [SEP] B [SEP]"),Na=l(),St=n("div"),b(To.$$.fragment),ja=l(),_s=n("p"),Ia=r("Converts a sequence of tokens (string) in a single string."),Da=l(),Ne=n("div"),b(xo.$$.fragment),Sa=l(),vs=n("p"),Ra=r("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=r("If "),Ts=n("code"),Ba=r("token_ids_1"),Xa=r(" is "),xs=n("code"),Ha=r("None"),Ua=r(", 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=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),bs=n("code"),Ya=r("prepare_for_model"),Za=r(" method."),ur=l(),bt=n("h2"),Wt=n("a"),ws=n("span"),b(yo.$$.fragment),ei=l(),ys=n("span"),ti=r("LxmertTokenizerFast"),pr=l(),fe=n("div"),b(ko.$$.fragment),oi=l(),Lo=n("p"),ni=r("Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),ks=n("em"),si=r("tokenizers"),ri=r(" library). Based on WordPiece."),ai=l(),$o=n("p"),ii=r("This tokenizer inherits from "),On=n("a"),li=r("PreTrainedTokenizerFast"),di=r(` 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(),Ls=n("p"),hi=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Lxmert sequence has the following format:`),ui=l(),zo=n("ul"),An=n("li"),pi=r("single sequence: "),$s=n("code"),fi=r("[CLS] X [SEP]"),gi=l(),Cn=n("li"),_i=r("pair of sequences: "),Fs=n("code"),vi=r("[CLS] A [SEP] B [SEP]"),Ti=l(),je=n("div"),b(Eo.$$.fragment),xi=l(),zs=n("p"),bi=r("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=r("If "),Es=n("code"),Li=r("token_ids_1"),$i=r(" is "),qs=n("code"),Fi=r("None"),zi=r(", this method only returns the first portion of the mask (0s)."),fr=l(),yt=n("h2"),Bt=n("a"),Ms=n("span"),b(qo.$$.fragment),Ei=l(),Ps=n("span"),qi=r("Lxmert specific outputs"),gr=l(),kt=n("div"),b(Mo.$$.fragment),Mi=l(),Os=n("p"),Pi=r(`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),_r=l(),Lt=n("div"),b(Po.$$.fragment),Oi=l(),Oo=n("p"),Ai=r("Output type of "),Nn=n("a"),Ci=r("LxmertForPreTraining"),Ni=r("."),vr=l(),$t=n("div"),b(Ao.$$.fragment),ji=l(),Co=n("p"),Ii=r("Output type of "),jn=n("a"),Di=r("LxmertForQuestionAnswering"),Si=r("."),Tr=l(),Ft=n("div"),b(No.$$.fragment),Ri=l(),As=n("p"),Qi=r(`Lxmert\u2019s outputs that contain the last hidden states, pooled outputs, and attention probabilities for the language,
visual, and, cross-modality encoders. (note: the visual encoder in Lxmert is referred to as the \u201Crelation-ship\u201D
encoder\u201D)`),xr=l(),zt=n("div"),b(jo.$$.fragment),Wi=l(),Io=n("p"),Vi=r("Output type of "),In=n("a"),Bi=r("LxmertForPreTraining"),Xi=r("."),br=l(),Et=n("h2"),Xt=n("a"),Cs=n("span"),b(Do.$$.fragment),Hi=l(),Ns=n("span"),Ui=r("LxmertModel"),wr=l(),K=n("div"),b(So.$$.fragment),Ki=l(),js=n("p"),Gi=r("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),Ji=l(),Ro=n("p"),Yi=r("The LXMERT model was proposed in "),Qo=n("a"),Zi=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),el=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),tl=l(),Wo=n("p"),ol=r("This model inherits from "),Dn=n("a"),nl=r("PreTrainedModel"),sl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rl=l(),Vo=n("p"),al=r("This model is also a PyTorch "),Bo=n("a"),il=r("torch.nn.Module"),ll=r(` 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=r("The "),Sn=n("a"),hl=r("LxmertModel"),ul=r(" forward method, overrides the "),Is=n("code"),pl=r("__call__"),fl=r(" special method."),gl=l(),b(Ht.$$.fragment),_l=l(),b(Ut.$$.fragment),yr=l(),Mt=n("h2"),Kt=n("a"),Ds=n("span"),b(Ho.$$.fragment),vl=l(),Ss=n("span"),Tl=r("LxmertForPreTraining"),kr=l(),G=n("div"),b(Uo.$$.fragment),xl=l(),Rs=n("p"),bl=r("Lxmert Model with a specified pretraining head on top."),wl=l(),Ko=n("p"),yl=r("The LXMERT model was proposed in "),Go=n("a"),kl=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Ll=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),$l=l(),Jo=n("p"),Fl=r("This model inherits from "),Rn=n("a"),zl=r("PreTrainedModel"),El=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ql=l(),Yo=n("p"),Ml=r("This model is also a PyTorch "),Zo=n("a"),Pl=r("torch.nn.Module"),Ol=r(` 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=r("The "),Qn=n("a"),jl=r("LxmertForPreTraining"),Il=r(" forward method, overrides the "),Qs=n("code"),Dl=r("__call__"),Sl=r(" special method."),Rl=l(),b(Gt.$$.fragment),Lr=l(),Ot=n("h2"),Jt=n("a"),Ws=n("span"),b(tn.$$.fragment),Ql=l(),Vs=n("span"),Wl=r("LxmertForQuestionAnswering"),$r=l(),J=n("div"),b(on.$$.fragment),Vl=l(),Bs=n("p"),Bl=r("Lxmert Model with a visual-answering head on top for downstream QA tasks"),Xl=l(),nn=n("p"),Hl=r("The LXMERT model was proposed in "),sn=n("a"),Ul=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Kl=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pretrained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Gl=l(),rn=n("p"),Jl=r("This model inherits from "),Wn=n("a"),Yl=r("PreTrainedModel"),Zl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ed=l(),an=n("p"),td=r("This model is also a PyTorch "),ln=n("a"),od=r("torch.nn.Module"),nd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sd=l(),ve=n("div"),b(dn.$$.fragment),rd=l(),At=n("p"),ad=r("The "),Vn=n("a"),id=r("LxmertForQuestionAnswering"),ld=r(" forward method, overrides the "),Xs=n("code"),dd=r("__call__"),cd=r(" special method."),md=l(),b(Yt.$$.fragment),hd=l(),b(Zt.$$.fragment),ud=l(),b(eo.$$.fragment),Fr=l(),Ct=n("h2"),to=n("a"),Hs=n("span"),b(cn.$$.fragment),pd=l(),Us=n("span"),fd=r("TFLxmertModel"),zr=l(),Y=n("div"),b(mn.$$.fragment),gd=l(),Ks=n("p"),_d=r("The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),vd=l(),hn=n("p"),Td=r("The LXMERT model was proposed in "),un=n("a"),xd=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),bd=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),wd=l(),pn=n("p"),yd=r("This model is also a "),fn=n("a"),kd=r("tf.keras.Model"),Ld=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),$d=l(),b(oo.$$.fragment),Fd=l(),De=n("div"),b(gn.$$.fragment),zd=l(),Nt=n("p"),Ed=r("The "),Bn=n("a"),qd=r("TFLxmertModel"),Md=r(" forward method, overrides the "),Gs=n("code"),Pd=r("__call__"),Od=r(" special method."),Ad=l(),b(no.$$.fragment),Cd=l(),b(so.$$.fragment),Er=l(),jt=n("h2"),ro=n("a"),Js=n("span"),b(_n.$$.fragment),Nd=l(),Ys=n("span"),jd=r("TFLxmertForPreTraining"),qr=l(),Z=n("div"),b(vn.$$.fragment),Id=l(),Tn=n("p"),Dd=r("Lxmert Model with a "),Zs=n("code"),Sd=r("language modeling"),Rd=r(" head on top."),Qd=l(),xn=n("p"),Wd=r("The LXMERT model was proposed in "),bn=n("a"),Vd=r(`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),Bd=r(` by Hao Tan and Mohit Bansal. It\u2019s a vision and language transformer
model, pre-trained on a variety of multi-modal datasets comprising of GQA, VQAv2.0, MCSCOCO captions, and Visual
genome, using a combination of masked language modeling, region of interest feature regression, cross entropy loss
for question answering attribute prediction, and object tag prediction.`),Xd=l(),wn=n("p"),Hd=r("This model is also a "),yn=n("a"),Ud=r("tf.keras.Model"),Kd=r(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Gd=l(),b(ao.$$.fragment),Jd=l(),dt=n("div"),b(kn.$$.fragment),Yd=l(),It=n("p"),Zd=r("The "),Xn=n("a"),ec=r("TFLxmertForPreTraining"),tc=r(" forward method, overrides the "),er=n("code"),oc=r("__call__"),nc=r(" special method."),sc=l(),b(io.$$.fragment),this.h()},l(o){const f=Hm('[data-svelte="svelte-1phssyn"]',document.head);h=s(f,"META",{name:!0,content:!0}),f.forEach(t),x=d(o),g=s(o,"H1",{class:!0});var Ln=i(g);_=s(Ln,"A",{id:!0,class:!0,href:!0});var tr=i(_);T=s(tr,"SPAN",{});var or=i(T);w(c.$$.fragment,or),or.forEach(t),tr.forEach(t),p=d(Ln),q=s(Ln,"SPAN",{});var nr=i(q);Be=a(nr,"LXMERT"),nr.forEach(t),Ln.forEach(t),Fe=d(o),N=s(o,"H2",{class:!0});var $n=i(N);ee=s($n,"A",{id:!0,class:!0,href:!0});var sr=i(ee);oe=s(sr,"SPAN",{});var rr=i(oe);w(F.$$.fragment,rr),rr.forEach(t),sr.forEach(t),Xe=d($n),X=s($n,"SPAN",{});var ar=i(X);He=a(ar,"Overview"),ar.forEach(t),$n.forEach(t),ze=d(o),R=s(o,"P",{});var Fn=i(R);Ue=a(Fn,"The LXMERT model was proposed in "),ne=s(Fn,"A",{href:!0,rel:!0});var ir=i(ne);se=a(ir,"LXMERT: Learning Cross-Modality Encoder Representations from Transformers"),ir.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=s(o,"P",{});var lr=i(W);Ge=a(lr,"The abstract from the paper is the following:"),lr.forEach(t),qe=d(o),V=s(o,"P",{});var dr=i(V);xe=s(dr,"EM",{});var cr=i(xe);Je=a(cr,`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`),cr.forEach(t),dr.forEach(t),ge=d(o),P=s(o,"P",{});var dc=i(P);j=a(dc,"Tips:"),dc.forEach(t),Me=d(o),C=s(o,"UL",{});var Hn=i(C);be=s(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),re=d(Hn),we=s(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=s(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=s(o,"P",{});var Un=i(B);ie=a(Un,"This model was contributed by "),le=s(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=s(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=s(o,"H2",{class:!0});var Pr=i(O);te=s(Pr,"A",{id:!0,class:!0,href:!0});var fc=i(te);D=s(fc,"SPAN",{});var gc=i(D);w(me.$$.fragment,gc),gc.forEach(t),fc.forEach(t),ot=d(Pr),v=s(Pr,"SPAN",{});var _c=i(v);E=a(_c,"LxmertConfig"),_c.forEach(t),Pr.forEach(t),rt=d(o),S=s(o,"DIV",{class:!0});var Kn=i(S);w(ke.$$.fragment,Kn),ht=d(Kn),z=s(Kn,"P",{});var lo=i(z);ut=a(lo,"This is the configuration class to store the configuration of a "),Oe=s(lo,"A",{href:!0});var vc=i(Oe);pt=a(vc,"LxmertModel"),vc.forEach(t),ft=a(lo," or a "),Ae=s(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=s(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=s(Kn,"P",{});var Gn=i(pe);nt=a(Gn,"Configuration objects inherit from "),Ce=s(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=s(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),mr=d(o),Tt=s(o,"H2",{class:!0});var Or=i(Tt);Dt=s(Or,"A",{id:!0,class:!0,href:!0});var yc=i(Dt);ms=s(yc,"SPAN",{});var kc=i(ms);w(po.$$.fragment,kc),kc.forEach(t),yc.forEach(t),Ta=d(Or),hs=s(Or,"SPAN",{});var Lc=i(hs);xa=a(Lc,"LxmertTokenizer"),Lc.forEach(t),Or.forEach(t),hr=d(o),Q=s(o,"DIV",{class:!0});var Te=i(Q);w(fo.$$.fragment,Te),ba=d(Te),us=s(Te,"P",{});var $c=i(us);wa=a($c,"Construct a Lxmert tokenizer. Based on WordPiece."),$c.forEach(t),ya=d(Te),go=s(Te,"P",{});var Ar=i(go);ka=a(Ar,"This tokenizer inherits from "),qn=s(Ar,"A",{href:!0});var Fc=i(qn);La=a(Fc,"PreTrainedTokenizer"),Fc.forEach(t),$a=a(Ar,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ar.forEach(t),Fa=d(Te),at=s(Te,"DIV",{class:!0});var Jn=i(at);w(_o.$$.fragment,Jn),za=d(Jn),ps=s(Jn,"P",{});var zc=i(ps);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=s(Jn,"UL",{});var Cr=i(vo);Mn=s(Cr,"LI",{});var rc=i(Mn);Ma=a(rc,"single sequence: "),fs=s(rc,"CODE",{});var Ec=i(fs);Pa=a(Ec,"[CLS] X [SEP]"),Ec.forEach(t),rc.forEach(t),Oa=d(Cr),Pn=s(Cr,"LI",{});var ac=i(Pn);Aa=a(ac,"pair of sequences: "),gs=s(ac,"CODE",{});var qc=i(gs);Ca=a(qc,"[CLS] A [SEP] B [SEP]"),qc.forEach(t),ac.forEach(t),Cr.forEach(t),Jn.forEach(t),Na=d(Te),St=s(Te,"DIV",{class:!0});var Nr=i(St);w(To.$$.fragment,Nr),ja=d(Nr),_s=s(Nr,"P",{});var Mc=i(_s);Ia=a(Mc,"Converts a sequence of tokens (string) in a single string."),Mc.forEach(t),Nr.forEach(t),Da=d(Te),Ne=s(Te,"DIV",{class:!0});var co=i(Ne);w(xo.$$.fragment,co),Sa=d(co),vs=s(co,"P",{});var Pc=i(vs);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=s(co,"P",{});var Yn=i(xt);Va=a(Yn,"If "),Ts=s(Yn,"CODE",{});var Oc=i(Ts);Ba=a(Oc,"token_ids_1"),Oc.forEach(t),Xa=a(Yn," is "),xs=s(Yn,"CODE",{});var Ac=i(xs);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=s(Te,"DIV",{class:!0});var jr=i(Qt);w(bo.$$.fragment,jr),Ga=d(jr),wo=s(jr,"P",{});var Ir=i(wo);Ja=a(Ir,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),bs=s(Ir,"CODE",{});var Cc=i(bs);Ya=a(Cc,"prepare_for_model"),Cc.forEach(t),Za=a(Ir," method."),Ir.forEach(t),jr.forEach(t),Te.forEach(t),ur=d(o),bt=s(o,"H2",{class:!0});var Dr=i(bt);Wt=s(Dr,"A",{id:!0,class:!0,href:!0});var Nc=i(Wt);ws=s(Nc,"SPAN",{});var jc=i(ws);w(yo.$$.fragment,jc),jc.forEach(t),Nc.forEach(t),ei=d(Dr),ys=s(Dr,"SPAN",{});var Ic=i(ys);ti=a(Ic,"LxmertTokenizerFast"),Ic.forEach(t),Dr.forEach(t),pr=d(o),fe=s(o,"DIV",{class:!0});var ct=i(fe);w(ko.$$.fragment,ct),oi=d(ct),Lo=s(ct,"P",{});var Sr=i(Lo);ni=a(Sr,"Construct a \u201Cfast\u201D Lxmert tokenizer (backed by HuggingFace\u2019s "),ks=s(Sr,"EM",{});var Dc=i(ks);si=a(Dc,"tokenizers"),Dc.forEach(t),ri=a(Sr," library). Based on WordPiece."),Sr.forEach(t),ai=d(ct),$o=s(ct,"P",{});var Rr=i($o);ii=a(Rr,"This tokenizer inherits from "),On=s(Rr,"A",{href:!0});var Sc=i(On);li=a(Sc,"PreTrainedTokenizerFast"),Sc.forEach(t),di=a(Rr,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Rr.forEach(t),ci=d(ct),it=s(ct,"DIV",{class:!0});var Zn=i(it);w(Fo.$$.fragment,Zn),mi=d(Zn),Ls=s(Zn,"P",{});var Rc=i(Ls);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=s(Zn,"UL",{});var Qr=i(zo);An=s(Qr,"LI",{});var ic=i(An);pi=a(ic,"single sequence: "),$s=s(ic,"CODE",{});var Qc=i($s);fi=a(Qc,"[CLS] X [SEP]"),Qc.forEach(t),ic.forEach(t),gi=d(Qr),Cn=s(Qr,"LI",{});var lc=i(Cn);_i=a(lc,"pair of sequences: "),Fs=s(lc,"CODE",{});var Wc=i(Fs);vi=a(Wc,"[CLS] A [SEP] B [SEP]"),Wc.forEach(t),lc.forEach(t),Qr.forEach(t),Zn.forEach(t),Ti=d(ct),je=s(ct,"DIV",{class:!0});var mo=i(je);w(Eo.$$.fragment,mo),xi=d(mo),zs=s(mo,"P",{});var Vc=i(zs);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=s(mo,"P",{});var es=i(wt);ki=a(es,"If "),Es=s(es,"CODE",{});var Bc=i(Es);Li=a(Bc,"token_ids_1"),Bc.forEach(t),$i=a(es," is "),qs=s(es,"CODE",{});var Xc=i(qs);Fi=a(Xc,"None"),Xc.forEach(t),zi=a(es,", this method only returns the first portion of the mask (0s)."),es.forEach(t),mo.forEach(t),ct.forEach(t),fr=d(o),yt=s(o,"H2",{class:!0});var Wr=i(yt);Bt=s(Wr,"A",{id:!0,class:!0,href:!0});var Hc=i(Bt);Ms=s(Hc,"SPAN",{});var Uc=i(Ms);w(qo.$$.fragment,Uc),Uc.forEach(t),Hc.forEach(t),Ei=d(Wr),Ps=s(Wr,"SPAN",{});var Kc=i(Ps);qi=a(Kc,"Lxmert specific outputs"),Kc.forEach(t),Wr.forEach(t),gr=d(o),kt=s(o,"DIV",{class:!0});var Vr=i(kt);w(Mo.$$.fragment,Vr),Mi=d(Vr),Os=s(Vr,"P",{});var Gc=i(Os);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),Vr.forEach(t),_r=d(o),Lt=s(o,"DIV",{class:!0});var Br=i(Lt);w(Po.$$.fragment,Br),Oi=d(Br),Oo=s(Br,"P",{});var Xr=i(Oo);Ai=a(Xr,"Output type of "),Nn=s(Xr,"A",{href:!0});var Jc=i(Nn);Ci=a(Jc,"LxmertForPreTraining"),Jc.forEach(t),Ni=a(Xr,"."),Xr.forEach(t),Br.forEach(t),vr=d(o),$t=s(o,"DIV",{class:!0});var Hr=i($t);w(Ao.$$.fragment,Hr),ji=d(Hr),Co=s(Hr,"P",{});var Ur=i(Co);Ii=a(Ur,"Output type of "),jn=s(Ur,"A",{href:!0});var Yc=i(jn);Di=a(Yc,"LxmertForQuestionAnswering"),Yc.forEach(t),Si=a(Ur,"."),Ur.forEach(t),Hr.forEach(t),Tr=d(o),Ft=s(o,"DIV",{class:!0});var Kr=i(Ft);w(No.$$.fragment,Kr),Ri=d(Kr),As=s(Kr,"P",{});var Zc=i(As);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),Kr.forEach(t),xr=d(o),zt=s(o,"DIV",{class:!0});var Gr=i(zt);w(jo.$$.fragment,Gr),Wi=d(Gr),Io=s(Gr,"P",{});var Jr=i(Io);Vi=a(Jr,"Output type of "),In=s(Jr,"A",{href:!0});var em=i(In);Bi=a(em,"LxmertForPreTraining"),em.forEach(t),Xi=a(Jr,"."),Jr.forEach(t),Gr.forEach(t),br=d(o),Et=s(o,"H2",{class:!0});var Yr=i(Et);Xt=s(Yr,"A",{id:!0,class:!0,href:!0});var tm=i(Xt);Cs=s(tm,"SPAN",{});var om=i(Cs);w(Do.$$.fragment,om),om.forEach(t),tm.forEach(t),Hi=d(Yr),Ns=s(Yr,"SPAN",{});var nm=i(Ns);Ui=a(nm,"LxmertModel"),nm.forEach(t),Yr.forEach(t),wr=d(o),K=s(o,"DIV",{class:!0});var Se=i(K);w(So.$$.fragment,Se),Ki=d(Se),js=s(Se,"P",{});var sm=i(js);Gi=a(sm,"The bare Lxmert Model transformer outputting raw hidden-states without any specific head on top."),sm.forEach(t),Ji=d(Se),Ro=s(Se,"P",{});var Zr=i(Ro);Yi=a(Zr,"The LXMERT model was proposed in "),Qo=s(Zr,"A",{href:!0,rel:!0});var rm=i(Qo);Zi=a(rm,`LXMERT: Learning Cross-Modality Encoder Representations from
Transformers`),rm.forEach(t),el=a(Zr,` 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.`),Zr.forEach(t),tl=d(Se),Wo=s(Se,"P",{});var ea=i(Wo);ol=a(ea,"This model inherits from "),Dn=s(ea,"A",{href:!0});var am=i(Dn);nl=a(am,"PreTrainedModel"),am.forEach(t),sl=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),rl=d(Se),Vo=s(Se,"P",{});var ta=i(Vo);al=a(ta,"This model is also a PyTorch "),Bo=s(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=s(Se,"DIV",{class:!0});var ho=i(Ie);w(Xo.$$.fragment,ho),cl=d(ho),qt=s(ho,"P",{});var ts=i(qt);ml=a(ts,"The "),Sn=s(ts,"A",{href:!0});var lm=i(Sn);hl=a(lm,"LxmertModel"),lm.forEach(t),ul=a(ts," forward method, overrides the "),Is=s(ts,"CODE",{});var dm=i(Is);pl=a(dm,"__call__"),dm.forEach(t),fl=a(ts," special method."),ts.forEach(t),gl=d(ho),w(Ht.$$.fragment,ho),_l=d(ho),w(Ut.$$.fragment,ho),ho.forEach(t),Se.forEach(t),yr=d(o),Mt=s(o,"H2",{class:!0});var oa=i(Mt);Kt=s(oa,"A",{id:!0,class:!0,href:!0});var cm=i(Kt);Ds=s(cm,"SPAN",{});var mm=i(Ds);w(Ho.$$.fragment,mm),mm.forEach(t),cm.forEach(t),vl=d(oa),Ss=s(oa,"SPAN",{});var hm=i(Ss);Tl=a(hm,"LxmertForPreTraining"),hm.forEach(t),oa.forEach(t),kr=d(o),G=s(o,"DIV",{class:!0});var Re=i(G);w(Uo.$$.fragment,Re),xl=d(Re),Rs=s(Re,"P",{});var um=i(Rs);bl=a(um,"Lxmert Model with a specified pretraining head on top."),um.forEach(t),wl=d(Re),Ko=s(Re,"P",{});var na=i(Ko);yl=a(na,"The LXMERT model was proposed in "),Go=s(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=s(Re,"P",{});var sa=i(Jo);Fl=a(sa,"This model inherits from "),Rn=s(sa,"A",{href:!0});var fm=i(Rn);zl=a(fm,"PreTrainedModel"),fm.forEach(t),El=a(sa,`. 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.)`),sa.forEach(t),ql=d(Re),Yo=s(Re,"P",{});var ra=i(Yo);Ml=a(ra,"This model is also a PyTorch "),Zo=s(ra,"A",{href:!0,rel:!0});var gm=i(Zo);Pl=a(gm,"torch.nn.Module"),gm.forEach(t),Ol=a(ra,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ra.forEach(t),Al=d(Re),lt=s(Re,"DIV",{class:!0});var os=i(lt);w(en.$$.fragment,os),Cl=d(os),Pt=s(os,"P",{});var ns=i(Pt);Nl=a(ns,"The "),Qn=s(ns,"A",{href:!0});var _m=i(Qn);jl=a(_m,"LxmertForPreTraining"),_m.forEach(t),Il=a(ns," forward method, overrides the "),Qs=s(ns,"CODE",{});var vm=i(Qs);Dl=a(vm,"__call__"),vm.forEach(t),Sl=a(ns," special method."),ns.forEach(t),Rl=d(os),w(Gt.$$.fragment,os),os.forEach(t),Re.forEach(t),Lr=d(o),Ot=s(o,"H2",{class:!0});var aa=i(Ot);Jt=s(aa,"A",{id:!0,class:!0,href:!0});var Tm=i(Jt);Ws=s(Tm,"SPAN",{});var xm=i(Ws);w(tn.$$.fragment,xm),xm.forEach(t),Tm.forEach(t),Ql=d(aa),Vs=s(aa,"SPAN",{});var bm=i(Vs);Wl=a(bm,"LxmertForQuestionAnswering"),bm.forEach(t),aa.forEach(t),$r=d(o),J=s(o,"DIV",{class:!0});var Qe=i(J);w(on.$$.fragment,Qe),Vl=d(Qe),Bs=s(Qe,"P",{});var wm=i(Bs);Bl=a(wm,"Lxmert Model with a visual-answering head on top for downstream QA tasks"),wm.forEach(t),Xl=d(Qe),nn=s(Qe,"P",{});var ia=i(nn);Hl=a(ia,"The LXMERT model was proposed in "),sn=s(ia,"A",{href:!0,rel:!0});var ym=i(sn);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),rn=s(Qe,"P",{});var la=i(rn);Jl=a(la,"This model inherits from "),Wn=s(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=s(Qe,"P",{});var da=i(an);td=a(da,"This model is also a PyTorch "),ln=s(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),sd=d(Qe),ve=s(Qe,"DIV",{class:!0});var mt=i(ve);w(dn.$$.fragment,mt),rd=d(mt),At=s(mt,"P",{});var ss=i(At);ad=a(ss,"The "),Vn=s(ss,"A",{href:!0});var $m=i(Vn);id=a($m,"LxmertForQuestionAnswering"),$m.forEach(t),ld=a(ss," forward method, overrides the "),Xs=s(ss,"CODE",{});var Fm=i(Xs);dd=a(Fm,"__call__"),Fm.forEach(t),cd=a(ss," special method."),ss.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),Fr=d(o),Ct=s(o,"H2",{class:!0});var ca=i(Ct);to=s(ca,"A",{id:!0,class:!0,href:!0});var zm=i(to);Hs=s(zm,"SPAN",{});var Em=i(Hs);w(cn.$$.fragment,Em),Em.forEach(t),zm.forEach(t),pd=d(ca),Us=s(ca,"SPAN",{});var qm=i(Us);fd=a(qm,"TFLxmertModel"),qm.forEach(t),ca.forEach(t),zr=d(o),Y=s(o,"DIV",{class:!0});var We=i(Y);w(mn.$$.fragment,We),gd=d(We),Ks=s(We,"P",{});var Mm=i(Ks);_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=s(We,"P",{});var ma=i(hn);Td=a(ma,"The LXMERT model was proposed in "),un=s(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=s(We,"P",{});var ha=i(pn);yd=a(ha,"This model is also a "),fn=s(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=s(We,"DIV",{class:!0});var uo=i(De);w(gn.$$.fragment,uo),zd=d(uo),Nt=s(uo,"P",{});var rs=i(Nt);Ed=a(rs,"The "),Bn=s(rs,"A",{href:!0});var Am=i(Bn);qd=a(Am,"TFLxmertModel"),Am.forEach(t),Md=a(rs," forward method, overrides the "),Gs=s(rs,"CODE",{});var Cm=i(Gs);Pd=a(Cm,"__call__"),Cm.forEach(t),Od=a(rs," special method."),rs.forEach(t),Ad=d(uo),w(no.$$.fragment,uo),Cd=d(uo),w(so.$$.fragment,uo),uo.forEach(t),We.forEach(t),Er=d(o),jt=s(o,"H2",{class:!0});var ua=i(jt);ro=s(ua,"A",{id:!0,class:!0,href:!0});var Nm=i(ro);Js=s(Nm,"SPAN",{});var jm=i(Js);w(_n.$$.fragment,jm),jm.forEach(t),Nm.forEach(t),Nd=d(ua),Ys=s(ua,"SPAN",{});var Im=i(Ys);jd=a(Im,"TFLxmertForPreTraining"),Im.forEach(t),ua.forEach(t),qr=d(o),Z=s(o,"DIV",{class:!0});var Ve=i(Z);w(vn.$$.fragment,Ve),Id=d(Ve),Tn=s(Ve,"P",{});var pa=i(Tn);Dd=a(pa,"Lxmert Model with a "),Zs=s(pa,"CODE",{});var Dm=i(Zs);Sd=a(Dm,"language modeling"),Dm.forEach(t),Rd=a(pa," head on top."),pa.forEach(t),Qd=d(Ve),xn=s(Ve,"P",{});var fa=i(xn);Wd=a(fa,"The LXMERT model was proposed in "),bn=s(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=s(Ve,"P",{});var ga=i(wn);Hd=a(ga,"This model is also a "),yn=s(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=s(Ve,"DIV",{class:!0});var as=i(dt);w(kn.$$.fragment,as),Yd=d(as),It=s(as,"P",{});var is=i(It);Zd=a(is,"The "),Xn=s(is,"A",{href:!0});var Qm=i(Xn);ec=a(Qm,"TFLxmertForPreTraining"),Qm.forEach(t),tc=a(is," forward method, overrides the "),er=s(is,"CODE",{});var Wm=i(er);oc=a(Wm,"__call__"),Wm.forEach(t),nc=a(is," special method."),is.forEach(t),sc=d(as),w(io.$$.fragment,as),as.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/v4.25.1/en/model_doc/lxmert#transformers.LxmertModel"),m(Ae,"href","/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),m(En,"href","/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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(sn,"href","https://arxiv.org/abs/1908.07490"),m(sn,"rel","nofollow"),m(Wn,"href","/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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(ro,"id","transformers.TFLxmertForPreTraining"),m(ro,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ro,"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/v4.25.1/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,se),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,re),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,rt,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,mr,f),u(o,Tt,f),e(Tt,Dt),e(Dt,ms),y(po,ms,null),e(Tt,Ta),e(Tt,hs),e(hs,xa),u(o,hr,f),u(o,Q,f),y(fo,Q,null),e(Q,ba),e(Q,us),e(us,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,ps),e(ps,Ea),e(at,qa),e(at,vo),e(vo,Mn),e(Mn,Ma),e(Mn,fs),e(fs,Pa),e(vo,Oa),e(vo,Pn),e(Pn,Aa),e(Pn,gs),e(gs,Ca),e(Q,Na),e(Q,St),y(To,St,null),e(St,ja),e(St,_s),e(_s,Ia),e(Q,Da),e(Q,Ne),y(xo,Ne,null),e(Ne,Sa),e(Ne,vs),e(vs,Ra),e(Ne,Qa),y(Rt,Ne,null),e(Ne,Wa),e(Ne,xt),e(xt,Va),e(xt,Ts),e(Ts,Ba),e(xt,Xa),e(xt,xs),e(xs,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,bs),e(bs,Ya),e(wo,Za),u(o,ur,f),u(o,bt,f),e(bt,Wt),e(Wt,ws),y(yo,ws,null),e(bt,ei),e(bt,ys),e(ys,ti),u(o,pr,f),u(o,fe,f),y(ko,fe,null),e(fe,oi),e(fe,Lo),e(Lo,ni),e(Lo,ks),e(ks,si),e(Lo,ri),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,Ls),e(Ls,hi),e(it,ui),e(it,zo),e(zo,An),e(An,pi),e(An,$s),e($s,fi),e(zo,gi),e(zo,Cn),e(Cn,_i),e(Cn,Fs),e(Fs,vi),e(fe,Ti),e(fe,je),y(Eo,je,null),e(je,xi),e(je,zs),e(zs,bi),e(je,wi),y(Vt,je,null),e(je,yi),e(je,wt),e(wt,ki),e(wt,Es),e(Es,Li),e(wt,$i),e(wt,qs),e(qs,Fi),e(wt,zi),u(o,fr,f),u(o,yt,f),e(yt,Bt),e(Bt,Ms),y(qo,Ms,null),e(yt,Ei),e(yt,Ps),e(Ps,qi),u(o,gr,f),u(o,kt,f),y(Mo,kt,null),e(kt,Mi),e(kt,Os),e(Os,Pi),u(o,_r,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,vr,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,Tr,f),u(o,Ft,f),y(No,Ft,null),e(Ft,Ri),e(Ft,As),e(As,Qi),u(o,xr,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,br,f),u(o,Et,f),e(Et,Xt),e(Xt,Cs),y(Do,Cs,null),e(Et,Hi),e(Et,Ns),e(Ns,Ui),u(o,wr,f),u(o,K,f),y(So,K,null),e(K,Ki),e(K,js),e(js,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,sl),e(K,rl),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,Is),e(Is,pl),e(qt,fl),e(Ie,gl),y(Ht,Ie,null),e(Ie,_l),y(Ut,Ie,null),u(o,yr,f),u(o,Mt,f),e(Mt,Kt),e(Kt,Ds),y(Ho,Ds,null),e(Mt,vl),e(Mt,Ss),e(Ss,Tl),u(o,kr,f),u(o,G,f),y(Uo,G,null),e(G,xl),e(G,Rs),e(Rs,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,Qs),e(Qs,Dl),e(Pt,Sl),e(lt,Rl),y(Gt,lt,null),u(o,Lr,f),u(o,Ot,f),e(Ot,Jt),e(Jt,Ws),y(tn,Ws,null),e(Ot,Ql),e(Ot,Vs),e(Vs,Wl),u(o,$r,f),u(o,J,f),y(on,J,null),e(J,Vl),e(J,Bs),e(Bs,Bl),e(J,Xl),e(J,nn),e(nn,Hl),e(nn,sn),e(sn,Ul),e(nn,Kl),e(J,Gl),e(J,rn),e(rn,Jl),e(rn,Wn),e(Wn,Yl),e(rn,Zl),e(J,ed),e(J,an),e(an,td),e(an,ln),e(ln,od),e(an,nd),e(J,sd),e(J,ve),y(dn,ve,null),e(ve,rd),e(ve,At),e(At,ad),e(At,Vn),e(Vn,id),e(At,ld),e(At,Xs),e(Xs,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,Fr,f),u(o,Ct,f),e(Ct,to),e(to,Hs),y(cn,Hs,null),e(Ct,pd),e(Ct,Us),e(Us,fd),u(o,zr,f),u(o,Y,f),y(mn,Y,null),e(Y,gd),e(Y,Ks),e(Ks,_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,Gs),e(Gs,Pd),e(Nt,Od),e(De,Ad),y(no,De,null),e(De,Cd),y(so,De,null),u(o,Er,f),u(o,jt,f),e(jt,ro),e(ro,Js),y(_n,Js,null),e(jt,Nd),e(jt,Ys),e(Ys,jd),u(o,qr,f),u(o,Z,f),y(vn,Z,null),e(Z,Id),e(Z,Tn),e(Tn,Dd),e(Tn,Zs),e(Zs,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,er),e(er,oc),e(It,nc),e(dt,sc),y(io,dt,null),Mr=!0},p(o,[f]){const Ln={};f&2&&(Ln.$$scope={dirty:f,ctx:o}),Rt.$set(Ln);const tr={};f&2&&(tr.$$scope={dirty:f,ctx:o}),Vt.$set(tr);const or={};f&2&&(or.$$scope={dirty:f,ctx:o}),Ht.$set(or);const nr={};f&2&&(nr.$$scope={dirty:f,ctx:o}),Ut.$set(nr);const $n={};f&2&&($n.$$scope={dirty:f,ctx:o}),Gt.$set($n);const sr={};f&2&&(sr.$$scope={dirty:f,ctx:o}),Yt.$set(sr);const rr={};f&2&&(rr.$$scope={dirty:f,ctx:o}),Zt.$set(rr);const ar={};f&2&&(ar.$$scope={dirty:f,ctx:o}),eo.$set(ar);const Fn={};f&2&&(Fn.$$scope={dirty:f,ctx:o}),oo.$set(Fn);const ir={};f&2&&(ir.$$scope={dirty:f,ctx:o}),no.$set(ir);const lr={};f&2&&(lr.$$scope={dirty:f,ctx:o}),so.$set(lr);const dr={};f&2&&(dr.$$scope={dirty:f,ctx:o}),ao.$set(dr);const cr={};f&2&&(cr.$$scope={dirty:f,ctx:o}),io.$set(cr)},i(o){Mr||(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(so.$$.fragment,o),k(_n.$$.fragment,o),k(vn.$$.fragment,o),k(ao.$$.fragment,o),k(kn.$$.fragment,o),k(io.$$.fragment,o),Mr=!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(so.$$.fragment,o),L(_n.$$.fragment,o),L(vn.$$.fragment,o),L(ao.$$.fragment,o),L(kn.$$.fragment,o),L(io.$$.fragment,o),Mr=!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(rt),o&&t(S),$(ke),o&&t(mr),o&&t(Tt),$(po),o&&t(hr),o&&t(Q),$(fo),$(_o),$(To),$(xo),$(Rt),$(bo),o&&t(ur),o&&t(bt),$(yo),o&&t(pr),o&&t(fe),$(ko),$(Fo),$(Eo),$(Vt),o&&t(fr),o&&t(yt),$(qo),o&&t(gr),o&&t(kt),$(Mo),o&&t(_r),o&&t(Lt),$(Po),o&&t(vr),o&&t($t),$(Ao),o&&t(Tr),o&&t(Ft),$(No),o&&t(xr),o&&t(zt),$(jo),o&&t(br),o&&t(Et),$(Do),o&&t(wr),o&&t(K),$(So),$(Xo),$(Ht),$(Ut),o&&t(yr),o&&t(Mt),$(Ho),o&&t(kr),o&&t(G),$(Uo),$(en),$(Gt),o&&t(Lr),o&&t(Ot),$(tn),o&&t($r),o&&t(J),$(on),$(dn),$(Yt),$(Zt),$(eo),o&&t(Fr),o&&t(Ct),$(cn),o&&t(zr),o&&t(Y),$(mn),$(oo),$(gn),$(no),$(so),o&&t(Er),o&&t(jt),$(_n),o&&t(qr),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};
