import{s as Qn,f as Yn,o as Dn,n as S}from"../chunks/scheduler.25b97de1.js";import{S as On,i as Kn,g as c,s,r as g,A as er,h as m,f as n,c as a,j as x,u as h,x as T,k as B,y as d,a as i,v as f,d as u,t as _,w}from"../chunks/index.d9030fc9.js";import{T as yt}from"../chunks/Tip.baa67368.js";import{D as J}from"../chunks/Docstring.ffac8efa.js";import{C as Q}from"../chunks/CodeBlock.e6cd0d95.js";import{E as co}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as L,E as or}from"../chunks/EditOnGithub.91d95064.js";function tr(v){let r,y="Example:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyTW9kZWwlMkMlMjBCcmlkZ2VUb3dlckNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCcmlkZ2VUb3dlciUyMEJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCcmlkZ2VUb3dlckNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMEJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQnJpZGdlVG93ZXJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerModel, BridgeTowerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BridgeTower BridgeTower/bridgetower-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BridgeTowerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the BridgeTower/bridgetower-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function nr(v){let r,y="Example:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyVGV4dENvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCcmlkZ2VUb3dlciUyMEJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUyMGZvciUyMHRoZSUyMHRleHQlMjBtb2RlbCUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCcmlkZ2VUb3dlclRleHRDb25maWcoKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9u",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerTextConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BridgeTower BridgeTower/bridgetower-base style configuration for the text model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BridgeTowerTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function rr(v){let r,y="Example:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyVmlzaW9uQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEJyaWRnZVRvd2VyJTIwQnJpZGdlVG93ZXIlMkZicmlkZ2V0b3dlci1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTIwZm9yJTIwdGhlJTIwdmlzaW9uJTIwbW9kZWwlMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQnJpZGdlVG93ZXJWaXNpb25Db25maWcoKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9u",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BridgeTower BridgeTower/bridgetower-base style configuration for the vision model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BridgeTowerVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function sr(v){let r,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=c("p"),r.innerHTML=y},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function ar(v){let r,y="Examples:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBJTIzJTIwcHJlcGFyZSUyMGltYWdlJTIwYW5kJTIwdGV4dCUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEF0ZXh0JTIwJTNEJTIwJTIyaGVsbG8lMjB3b3JsZCUyMiUwQXByb2Nlc3NvciUyMCUzRCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBCcmlkZ2VUb3dlck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQW91dHB1dHMua2V5cygp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare image and text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;hello world&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerModel.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(image, text, 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>outputs.keys()
odict_keys([<span class="hljs-string">&#x27;text_features&#x27;</span>, <span class="hljs-string">&#x27;image_features&#x27;</span>, <span class="hljs-string">&#x27;pooler_output&#x27;</span>])`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function ir(v){let r,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=c("p"),r.innerHTML=y},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function dr(v){let r,y="Examples:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JDb250cmFzdGl2ZUxlYXJuaW5nJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQWltYWdlX3VybHMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmZhcm00LnN0YXRpY2ZsaWNrci5jb20lMkYzMzk1JTJGMzQyODI3ODQxNV84MWMzZTI3ZjE1X3ouanBnJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUyQyUwQSU1RCUwQXRleHRzJTIwJTNEJTIwJTVCJTIydHdvJTIwZG9ncyUyMGluJTIwYSUyMGNhciUyMiUyQyUyMCUyMnR3byUyMGNhdHMlMjBzbGVlcGluZyUyMG9uJTIwYSUyMGNvdWNoJTIyJTVEJTBBaW1hZ2VzJTIwJTNEJTIwJTVCSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUyMGZvciUyMHVybCUyMGluJTIwaW1hZ2VfdXJscyU1RCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWxhcmdlLWl0bS1tbG0taXRjJTIyKSUwQW1vZGVsJTIwJTNEJTIwQnJpZGdlVG93ZXJGb3JDb250cmFzdGl2ZUxlYXJuaW5nLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWxhcmdlLWl0bS1tbG0taXRjJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlMkMlMjB0ZXh0cyUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjByZXR1cm5fbG9zcyUzRFRydWUpLmxvc3MlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTJDJTIwdGV4dHMlNUIlM0ElM0EtMSU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFsb3NzX3N3YXBwZWQlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHJldHVybl9sb3NzJTNEVHJ1ZSkubG9zcyUwQSUwQXByaW50KCUyMkxvc3MlMjIlMkMlMjByb3VuZChsb3NzLml0ZW0oKSUyQyUyMDQpKSUwQSUwQXByaW50KCUyMkxvc3MlMjB3aXRoJTIwc3dhcHBlZCUyMGltYWdlcyUyMiUyQyUyMHJvdW5kKGxvc3Nfc3dhcHBlZC5pdGVtKCklMkMlMjA0KSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForContrastiveLearning
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>image_urls = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://farm4.staticflickr.com/3395/3428278415_81c3e27f15_z.jpg&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;two dogs in a car&quot;</span>, <span class="hljs-string">&quot;two cats sleeping on a couch&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>images = [Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw) <span class="hljs-keyword">for</span> url <span class="hljs-keyword">in</span> image_urls]

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-large-itm-mlm-itc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForContrastiveLearning.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-large-itm-mlm-itc&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images, texts, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, return_loss=<span class="hljs-literal">True</span>).loss

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images, texts[::-<span class="hljs-number">1</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss_swapped = model(**inputs, return_loss=<span class="hljs-literal">True</span>).loss

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Loss&quot;</span>, <span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">4</span>))
Loss <span class="hljs-number">0.0019</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Loss with swapped images&quot;</span>, <span class="hljs-built_in">round</span>(loss_swapped.item(), <span class="hljs-number">4</span>))
Loss <span class="hljs-keyword">with</span> swapped images <span class="hljs-number">2.126</span>`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function lr(v){let r,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=c("p"),r.innerHTML=y},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function cr(v){let r,y="Examples:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JNYXNrZWRMTSUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMzYwOTQzLmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KS5jb252ZXJ0KCUyMlJHQiUyMiklMEF0ZXh0JTIwJTNEJTIwJTIyYSUyMCUzQ21hc2slM0UlMjBsb29raW5nJTIwb3V0JTIwb2YlMjB0aGUlMjB3aW5kb3clMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBCcmlkZ2VUb3dlclByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyQnJpZGdlVG93ZXIlMkZicmlkZ2V0b3dlci1iYXNlLWl0bS1tbG0lMjIpJTBBbW9kZWwlMjAlM0QlMjBCcmlkZ2VUb3dlckZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWJhc2UtaXRtLW1sbSUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwaW5wdXRzJTBBZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmVuY29kaW5nKSUwQSUwQXJlc3VsdHMlMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKG91dHB1dHMubG9naXRzLmFyZ21heChkaW0lM0QtMSkuc3F1ZWV6ZSgwKS50b2xpc3QoKSklMEElMEFwcmludChyZXN1bHRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000360943.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;a &lt;mask&gt; looking out of the window&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare inputs</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span>results = processor.decode(outputs.logits.argmax(dim=-<span class="hljs-number">1</span>).squeeze(<span class="hljs-number">0</span>).tolist())

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)
.a cat looking out of the window.`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function mr(v){let r,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=c("p"),r.innerHTML=y},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function pr(v){let r,y="Examples:",p,l,b;return l=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JJbWFnZUFuZFRleHRSZXRyaWV2YWwlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEF0ZXh0cyUyMCUzRCUyMCU1QiUyMkFuJTIwaW1hZ2UlMjBvZiUyMHR3byUyMGNhdHMlMjBjaGlsbGluZyUyMG9uJTIwYSUyMGNvdWNoJTIyJTJDJTIwJTIyQSUyMGZvb3RiYWxsJTIwcGxheWVyJTIwc2NvcmluZyUyMGElMjBnb2FsJTIyJTVEJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQnJpZGdlVG93ZXJQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMkJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZS1pdG0tbWxtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQnJpZGdlVG93ZXJGb3JJbWFnZUFuZFRleHRSZXRyaWV2YWwuZnJvbV9wcmV0cmFpbmVkKCUyMkJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZS1pdG0tbWxtJTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBc2NvcmVzJTIwJTNEJTIwZGljdCgpJTBBZm9yJTIwdGV4dCUyMGluJTIwdGV4dHMlM0ElMEElMjAlMjAlMjAlMjAlMjMlMjBwcmVwYXJlJTIwaW5wdXRzJTBBJTIwJTIwJTIwJTIwZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyklMEElMjAlMjAlMjAlMjBzY29yZXMlNUJ0ZXh0JTVEJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlNUIwJTJDJTIwMSU1RC5pdGVtKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForImageAndTextRetrieval
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;An image of two cats chilling on a couch&quot;</span>, <span class="hljs-string">&quot;A football player scoring a goal&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForImageAndTextRetrieval.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = <span class="hljs-built_in">dict</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> texts:
<span class="hljs-meta">... </span>    <span class="hljs-comment"># prepare inputs</span>
<span class="hljs-meta">... </span>    encoding = processor(image, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">... </span>    outputs = model(**encoding)
<span class="hljs-meta">... </span>    scores[text] = outputs.logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>].item()`,wrap:!1}}),{c(){r=c("p"),r.textContent=y,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),b=!0},p:S,i(o){b||(u(l.$$.fragment,o),b=!0)},o(o){_(l.$$.fragment,o),b=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function gr(v){let r,y,p,l,b,o,M,Fo,we,mn=`The BridgeTower model was proposed in <a href="https://arxiv.org/abs/2206.08657" rel="nofollow">BridgeTower: Building Bridges Between Encoders in Vision-Language Representative Learning</a> by Xiao Xu, Chenfei Wu, Shachar Rosenman, Vasudev Lal, Wanxiang Che, Nan Duan. The goal of this model is to build a
bridge between each uni-modal encoder and the cross-modal encoder to enable comprehensive and detailed interaction at each layer of the cross-modal encoder thus achieving remarkable performance on various downstream tasks with almost negligible additional performance and computational costs.`,Ro,Te,pn='This paper has been accepted to the <a href="https://aaai.org/Conferences/AAAI-23/" rel="nofollow">AAAI’23</a> conference.',Vo,be,gn="The abstract from the paper is the following:",Lo,ye,hn=`<em>Vision-Language (VL) models with the TWO-TOWER architecture have dominated visual-language representation learning in recent years.
Current VL models either use lightweight uni-modal encoders and learn to extract, align and fuse both modalities simultaneously in a deep cross-modal encoder, or feed the last-layer uni-modal representations from the deep pre-trained uni-modal encoders into the top cross-modal encoder.
Both approaches potentially restrict vision-language representation learning and limit model performance. In this paper, we propose BRIDGETOWER, which introduces multiple bridge layers that build a connection between the top layers of uni-modal encoders and each layer of the crossmodal encoder.
This enables effective bottom-up cross-modal alignment and fusion between visual and textual representations of different semantic levels of pre-trained uni-modal encoders in the cross-modal encoder. Pre-trained with only 4M images, BRIDGETOWER achieves state-of-the-art performance on various downstream vision-language tasks.
In particular, on the VQAv2 test-std set, BRIDGETOWER achieves an accuracy of 78.73%, outperforming the previous state-of-the-art model METER by 1.09% with the same pre-training data and almost negligible additional parameters and computational costs.
Notably, when further scaling the model, BRIDGETOWER achieves an accuracy of 81.15%, surpassing models that are pre-trained on orders-of-magnitude larger datasets.</em>`,No,K,fn,Go,Me,un='BridgeTower architecture. Taken from the <a href="https://arxiv.org/abs/2206.08657">original paper.</a>',Po,ve,_n='This model was contributed by <a href="https://huggingface.co/anahita-b" rel="nofollow">Anahita Bhiwandiwalla</a>, <a href="https://huggingface.co/Tile" rel="nofollow">Tiep Le</a> and <a href="https://huggingface.co/shaoyent" rel="nofollow">Shaoyen Tseng</a>. The original code can be found <a href="https://github.com/microsoft/BridgeTower" rel="nofollow">here</a>.',Eo,Be,qo,xe,wn=`BridgeTower consists of a visual encoder, a textual encoder and cross-modal encoder with multiple lightweight bridge layers.
The goal of this approach was to build a bridge between each uni-modal encoder and the cross-modal encoder to enable comprehensive and detailed interaction at each layer of the cross-modal encoder.
In principle, one can apply any visual, textual or cross-modal encoder in the proposed architecture.`,Ho,Je,Tn=`The <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> wraps <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a> into a single instance to both
encode the text and prepare the images respectively.`,Xo,je,bn='The following example shows how to run contrastive learning using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> and <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForContrastiveLearning">BridgeTowerForContrastiveLearning</a>.',So,ke,Ao,$e,yn='The following example shows how to run image-text retrieval using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> and <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForImageAndTextRetrieval">BridgeTowerForImageAndTextRetrieval</a>.',Qo,Ie,Yo,Ce,Mn='The following example shows how to run masked language modeling using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> and <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForMaskedLM">BridgeTowerForMaskedLM</a>.',Do,ze,Oo,Ue,vn="Tips:",Ko,Ze,Bn='<li>This implementation of BridgeTower uses <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> to generate text embeddings and OpenAI’s CLIP/ViT model to compute visual embeddings.</li> <li>Checkpoints for pre-trained <a href="https://huggingface.co/BridgeTower/bridgetower-base" rel="nofollow">bridgeTower-base</a> and <a href="https://huggingface.co/BridgeTower/bridgetower-base-itm-mlm" rel="nofollow">bridgetower masked language modeling and image text matching</a> are released.</li> <li>Please refer to <a href="https://arxiv.org/pdf/2206.08657.pdf" rel="nofollow">Table 5</a> for BridgeTower’s performance on Image Retrieval and other down stream tasks.</li> <li>The PyTorch version of this model is only available in torch 1.10 and higher.</li>',et,We,ot,j,Fe,Mt,mo,xn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a>. It is used to instantiate a
BridgeTower 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 bridgetower-base
<a href="https://huggingface.co/BridgeTower/bridgetower-base/" rel="nofollow">BridgeTower/bridgetower-base</a> architecture.`,vt,po,Jn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Bt,ee,xt,oe,Re,Jt,go,jn=`Instantiate a <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a> (or a derived class) from BridgeTower text model configuration. Returns:
<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>: An instance of a configuration object`,tt,Ve,nt,k,Le,jt,ho,kn=`This is the configuration class to store the text configuration of a <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a>. The default values here
are copied from RoBERTa. Instantiating a configuration with the defaults will yield a similar configuration to that
of the bridgetower-base <a href="https://huggingface.co/BridgeTower/bridgetower-base/" rel="nofollow">BridegTower/bridgetower-base</a>
architecture.`,kt,fo,$n=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,$t,te,rt,Ne,st,$,Ge,It,uo,In=`This is the configuration class to store the vision configuration of a <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a>. Instantiating a
configuration with the defaults will yield a similar configuration to that of the bridgetower-base
<a href="https://huggingface.co/BridgeTower/bridgetower-base/" rel="nofollow">BridgeTower/bridgetower-base</a> architecture.`,Ct,_o,Cn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,zt,ne,at,Pe,it,N,Ee,Ut,wo,zn="Constructs a BridgeTower image processor.",Zt,re,qe,Wt,To,Un="Preprocess an image or batch of images.",dt,He,lt,I,Xe,Ft,bo,Zn=`Constructs a BridgeTower processor which wraps a Roberta tokenizer and BridgeTower image processor into a single
processor.`,Rt,yo,Wn=`<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a> and
<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizerFast">RobertaTokenizerFast</a>. See the docstring of <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerProcessor.__call__"><strong>call</strong>()</a> and
<code>decode()</code> for more information.`,Vt,A,Se,Lt,Mo,Fn=`This method uses <a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> method to prepare image(s) for the model, and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">RobertaTokenizerFast.<strong>call</strong>()</a> to prepare text for the model.`,Nt,vo,Rn="Please refer to the docstring of the above two methods for more information.",ct,Ae,mt,G,Qe,Gt,Bo,Vn=`The bare BridgeTower Model transformer outputting BridgeTowerModelOutput object without any specific head on top.
This model is a PyTorch <code>torch.nn.Module &lt;https://pytorch.org/docs/stable/nn.html#torch.nn.Module&gt;</code>_ subclass. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Pt,W,Ye,Et,xo,Ln='The <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a> forward method, overrides the <code>__call__</code> special method.',qt,se,Ht,ae,pt,De,gt,C,Oe,Xt,Jo,Nn="BridgeTower Model with a image-text contrastive head on top computing image-text contrastive loss.",St,jo,Gn=`This model is a PyTorch <code>torch.nn.Module &lt;https://pytorch.org/docs/stable/nn.html#torch.nn.Module&gt;</code>_ subclass. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,At,F,Ke,Qt,ko,Pn='The <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForContrastiveLearning">BridgeTowerForContrastiveLearning</a> forward method, overrides the <code>__call__</code> special method.',Yt,ie,Dt,de,ht,eo,ft,z,oo,Ot,$o,En="BridgeTower Model with a language modeling head on top as done during pretraining.",Kt,Io,qn=`This model is a PyTorch <code>torch.nn.Module &lt;https://pytorch.org/docs/stable/nn.html#torch.nn.Module&gt;</code>_ subclass. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,en,R,to,on,Co,Hn='The <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForMaskedLM">BridgeTowerForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',tn,le,nn,ce,ut,no,_t,U,ro,rn,zo,Xn=`BridgeTower Model transformer with a classifier head on top (a linear layer on top of the final hidden state of the
[CLS] token) for image-to-text matching.`,sn,Uo,Sn=`This model is a PyTorch <code>torch.nn.Module &lt;https://pytorch.org/docs/stable/nn.html#torch.nn.Module&gt;</code>_ subclass. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,an,V,so,dn,Zo,An='The <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerForImageAndTextRetrieval">BridgeTowerForImageAndTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',ln,me,cn,pe,wt,ao,Tt,Wo,bt;return b=new L({props:{title:"BridgeTower",local:"bridgetower",headingTag:"h1"}}),M=new L({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Be=new L({props:{title:"Usage tips and examples",local:"usage-tips-and-examples",headingTag:"h2"}}),ke=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JDb250cmFzdGl2ZUxlYXJuaW5nJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBdGV4dHMlMjAlM0QlMjAlNUIlMjJBbiUyMGltYWdlJTIwb2YlMjB0d28lMjBjYXRzJTIwY2hpbGxpbmclMjBvbiUyMGElMjBjb3VjaCUyMiUyQyUyMCUyMkElMjBmb290YmFsbCUyMHBsYXllciUyMHNjb3JpbmclMjBhJTIwZ29hbCUyMiU1RCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWxhcmdlLWl0bS1tbG0taXRjJTIyKSUwQW1vZGVsJTIwJTNEJTIwQnJpZGdlVG93ZXJGb3JDb250cmFzdGl2ZUxlYXJuaW5nLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWxhcmdlLWl0bS1tbG0taXRjJTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBc2NvcmVzJTIwJTNEJTIwZGljdCgpJTBBZm9yJTIwdGV4dCUyMGluJTIwdGV4dHMlM0ElMEElMjAlMjAlMjAlMjAlMjMlMjBwcmVwYXJlJTIwaW5wdXRzJTBBJTIwJTIwJTIwJTIwZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyklMEElMjAlMjAlMjAlMjBzY29yZXMlNUJ0ZXh0JTVEJTIwJTNEJTIwb3V0cHV0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForContrastiveLearning
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;An image of two cats chilling on a couch&quot;</span>, <span class="hljs-string">&quot;A football player scoring a goal&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-large-itm-mlm-itc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForContrastiveLearning.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-large-itm-mlm-itc&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = <span class="hljs-built_in">dict</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> texts:
<span class="hljs-meta">... </span>    <span class="hljs-comment"># prepare inputs</span>
<span class="hljs-meta">... </span>    encoding = processor(image, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">... </span>    outputs = model(**encoding)
<span class="hljs-meta">... </span>    scores[text] = outputs`,wrap:!1}}),Ie=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JJbWFnZUFuZFRleHRSZXRyaWV2YWwlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEF0ZXh0cyUyMCUzRCUyMCU1QiUyMkFuJTIwaW1hZ2UlMjBvZiUyMHR3byUyMGNhdHMlMjBjaGlsbGluZyUyMG9uJTIwYSUyMGNvdWNoJTIyJTJDJTIwJTIyQSUyMGZvb3RiYWxsJTIwcGxheWVyJTIwc2NvcmluZyUyMGElMjBnb2FsJTIyJTVEJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQnJpZGdlVG93ZXJQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMkJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZS1pdG0tbWxtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQnJpZGdlVG93ZXJGb3JJbWFnZUFuZFRleHRSZXRyaWV2YWwuZnJvbV9wcmV0cmFpbmVkKCUyMkJyaWRnZVRvd2VyJTJGYnJpZGdldG93ZXItYmFzZS1pdG0tbWxtJTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBc2NvcmVzJTIwJTNEJTIwZGljdCgpJTBBZm9yJTIwdGV4dCUyMGluJTIwdGV4dHMlM0ElMEElMjAlMjAlMjAlMjAlMjMlMjBwcmVwYXJlJTIwaW5wdXRzJTBBJTIwJTIwJTIwJTIwZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyklMEElMjAlMjAlMjAlMjBzY29yZXMlNUJ0ZXh0JTVEJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlNUIwJTJDJTIwMSU1RC5pdGVtKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForImageAndTextRetrieval
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;An image of two cats chilling on a couch&quot;</span>, <span class="hljs-string">&quot;A football player scoring a goal&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForImageAndTextRetrieval.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = <span class="hljs-built_in">dict</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> text <span class="hljs-keyword">in</span> texts:
<span class="hljs-meta">... </span>    <span class="hljs-comment"># prepare inputs</span>
<span class="hljs-meta">... </span>    encoding = processor(image, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">... </span>    outputs = model(**encoding)
<span class="hljs-meta">... </span>    scores[text] = outputs.logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>].item()`,wrap:!1}}),ze=new Q({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJyaWRnZVRvd2VyUHJvY2Vzc29yJTJDJTIwQnJpZGdlVG93ZXJGb3JNYXNrZWRMTSUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMzYwOTQzLmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KS5jb252ZXJ0KCUyMlJHQiUyMiklMEF0ZXh0JTIwJTNEJTIwJTIyYSUyMCUzQ21hc2slM0UlMjBsb29raW5nJTIwb3V0JTIwb2YlMjB0aGUlMjB3aW5kb3clMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBCcmlkZ2VUb3dlclByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyQnJpZGdlVG93ZXIlMkZicmlkZ2V0b3dlci1iYXNlLWl0bS1tbG0lMjIpJTBBbW9kZWwlMjAlM0QlMjBCcmlkZ2VUb3dlckZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJCcmlkZ2VUb3dlciUyRmJyaWRnZXRvd2VyLWJhc2UtaXRtLW1sbSUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwaW5wdXRzJTBBZW5jb2RpbmclMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmVuY29kaW5nKSUwQSUwQXJlc3VsdHMlMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKG91dHB1dHMubG9naXRzLmFyZ21heChkaW0lM0QtMSkuc3F1ZWV6ZSgwKS50b2xpc3QoKSklMEElMEFwcmludChyZXN1bHRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BridgeTowerProcessor, BridgeTowerForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000360943.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;a &lt;mask&gt; looking out of the window&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = BridgeTowerProcessor.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BridgeTowerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;BridgeTower/bridgetower-base-itm-mlm&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare inputs</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span>results = processor.decode(outputs.logits.argmax(dim=-<span class="hljs-number">1</span>).squeeze(<span class="hljs-number">0</span>).tolist())

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)
.a cat looking out of the window.`,wrap:!1}}),We=new L({props:{title:"BridgeTowerConfig",local:"transformers.BridgeTowerConfig",headingTag:"h2"}}),Fe=new J({props:{name:"class transformers.BridgeTowerConfig",anchor:"transformers.BridgeTowerConfig",parameters:[{name:"share_cross_modal_transformer_layers",val:" = True"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_size",val:" = 768"},{name:"initializer_factor",val:" = 1"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"share_link_tower_layers",val:" = False"},{name:"link_tower_type",val:" = 'add'"},{name:"num_attention_heads",val:" = 12"},{name:"num_hidden_layers",val:" = 6"},{name:"tie_word_embeddings",val:" = False"},{name:"init_layernorm_from_vision_encoder",val:" = False"},{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerConfig.share_cross_modal_transformer_layers",description:`<strong>share_cross_modal_transformer_layers</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether cross modal transformer layers are shared.`,name:"share_cross_modal_transformer_layers"},{anchor:"transformers.BridgeTowerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler.`,name:"hidden_act"},{anchor:"transformers.BridgeTowerConfig.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.BridgeTowerConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.BridgeTowerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BridgeTowerConfig.share_link_tower_layers",description:`<strong>share_link_tower_layers</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the bride/link tower layers are shared.`,name:"share_link_tower_layers"},{anchor:"transformers.BridgeTowerConfig.link_tower_type",description:`<strong>link_tower_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;add&quot;</code>) &#x2014;
Type of the bridge/link layer.`,name:"link_tower_type"},{anchor:"transformers.BridgeTowerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BridgeTowerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.BridgeTowerConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie input and output embeddings.`,name:"tie_word_embeddings"},{anchor:"transformers.BridgeTowerConfig.init_layernorm_from_vision_encoder",description:`<strong>init_layernorm_from_vision_encoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to init LayerNorm from the vision encoder.`,name:"init_layernorm_from_vision_encoder"},{anchor:"transformers.BridgeTowerConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerTextConfig">BridgeTowerTextConfig</a>.`,name:"text_config"},{anchor:"transformers.BridgeTowerConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerVisionConfig">BridgeTowerVisionConfig</a>.`,name:"vision_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/configuration_bridgetower.py#L205"}}),ee=new co({props:{anchor:"transformers.BridgeTowerConfig.example",$$slots:{default:[tr]},$$scope:{ctx:v}}}),Re=new J({props:{name:"from_text_vision_configs",anchor:"transformers.BridgeTowerConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": BridgeTowerTextConfig"},{name:"vision_config",val:": BridgeTowerVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/configuration_bridgetower.py#L307"}}),Ve=new L({props:{title:"BridgeTowerTextConfig",local:"transformers.BridgeTowerTextConfig",headingTag:"h2"}}),Le=new J({props:{name:"class transformers.BridgeTowerTextConfig",anchor:"transformers.BridgeTowerTextConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"initializer_factor",val:" = 1"},{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:" = 514"},{name:"type_vocab_size",val:" = 1"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the text part of the model. Defines the number of different tokens that can be
represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a>.`,name:"vocab_size"},{anchor:"transformers.BridgeTowerTextConfig.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.BridgeTowerTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.BridgeTowerTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BridgeTowerTextConfig.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.BridgeTowerTextConfig.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.BridgeTowerTextConfig.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.BridgeTowerTextConfig.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.BridgeTowerTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 514) &#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.BridgeTowerTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code>.`,name:"type_vocab_size"},{anchor:"transformers.BridgeTowerTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.BridgeTowerTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BridgeTowerTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.BridgeTowerTextConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.BridgeTowerTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/configuration_bridgetower.py#L97"}}),te=new co({props:{anchor:"transformers.BridgeTowerTextConfig.example",$$slots:{default:[nr]},$$scope:{ctx:v}}}),Ne=new L({props:{title:"BridgeTowerVisionConfig",local:"transformers.BridgeTowerVisionConfig",headingTag:"h2"}}),Ge=new J({props:{name:"class transformers.BridgeTowerVisionConfig",anchor:"transformers.BridgeTowerVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"patch_size",val:" = 16"},{name:"image_size",val:" = 288"},{name:"initializer_factor",val:" = 1"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"stop_gradient",val:" = False"},{name:"share_layernorm",val:" = True"},{name:"remove_last_layer",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerVisionConfig.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.BridgeTowerVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in visual encoder model.`,name:"num_hidden_layers"},{anchor:"transformers.BridgeTowerVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.BridgeTowerVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 288) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.BridgeTowerVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.BridgeTowerVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BridgeTowerVisionConfig.stop_gradient",description:`<strong>stop_gradient</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to stop gradient for training.`,name:"stop_gradient"},{anchor:"transformers.BridgeTowerVisionConfig.share_layernorm",description:`<strong>share_layernorm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether LayerNorm layers are shared.`,name:"share_layernorm"},{anchor:"transformers.BridgeTowerVisionConfig.remove_last_layer",description:`<strong>remove_last_layer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to remove the last layer from the vision encoder.`,name:"remove_last_layer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/configuration_bridgetower.py#L24"}}),ne=new co({props:{anchor:"transformers.BridgeTowerVisionConfig.example",$$slots:{default:[rr]},$$scope:{ctx:v}}}),Pe=new L({props:{title:"BridgeTowerImageProcessor",local:"transformers.BridgeTowerImageProcessor",headingTag:"h2"}}),Ee=new J({props:{name:"class transformers.BridgeTowerImageProcessor",anchor:"transformers.BridgeTowerImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"size_divisor",val:": int = 32"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_pad",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.BridgeTowerImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&apos;shortest_edge&apos; -- 288}</code>):
Resize the shorter side of the input to <code>size[&quot;shortest_edge&quot;]</code>. The longer side will be limited to under
<code>int((1333 / 800) * size[&quot;shortest_edge&quot;])</code> while preserving the aspect ratio. Only has an effect if
<code>do_resize</code> is set to <code>True</code>. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.BridgeTowerImageProcessor.size_divisor",description:`<strong>size_divisor</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size by which to make sure both the height and width can be divided. Only has an effect if <code>do_resize</code>
is set to <code>True</code>. Can be overridden by the <code>size_divisor</code> parameter in the <code>preprocess</code> method.`,name:"size_divisor"},{anchor:"transformers.BridgeTowerImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can be
overridden by the <code>resample</code> parameter in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.BridgeTowerImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.BridgeTowerImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>. Can be
overridden by the <code>rescale_factor</code> parameter in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.BridgeTowerImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.BridgeTowerImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method. Can be
overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.BridgeTowerImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.BridgeTowerImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image. Can be overridden by the <code>do_center_crop</code> parameter in the <code>preprocess</code>
method.`,name:"do_center_crop"},{anchor:"transformers.BridgeTowerImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014;
Desired output size when applying center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.
Can be overridden by the <code>crop_size</code> parameter in the <code>preprocess</code> method. If unset defaults to <code>size</code>,`,name:"crop_size"},{anchor:"transformers.BridgeTowerImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to pad the image to the <code>(max_height, max_width)</code> of the images in the batch. Can be overridden by
the <code>do_pad</code> parameter in the <code>preprocess</code> method.`,name:"do_pad"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/image_processing_bridgetower.py#L124"}}),qe=new J({props:{name:"preprocess",anchor:"transformers.BridgeTowerImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"size_divisor",val:": typing.Optional[int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_pad",val:": typing.Optional[bool] = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.BridgeTowerImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Controls the size of the image after <code>resize</code>. The shortest edge of the image is resized to
<code>size[&quot;shortest_edge&quot;]</code> whilst preserving the aspect ratio. If the longest edge of this resized image
is &gt; <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>, then the image is resized again to make the longest
edge equal to <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>.`,name:"size"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.size_divisor",description:`<strong>size_divisor</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.size_divisor</code>) &#x2014;
The image is resized to a size that is a multiple of this value.`,name:"size_divisor"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to normalize the image by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to normalize the image by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_pad</code>) &#x2014;
Whether to pad the image to the (max_height, max_width) in the batch. If <code>True</code>, a pixel mask is also
created and returned.`,name:"do_pad"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image. If the input size is smaller than <code>crop_size</code> along any edge, the
image is padded with 0&#x2019;s and then center cropped.`,name:"do_center_crop"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the image after center crop. If one edge the image is smaller than <code>crop_size</code>, it will be
padded with zeros and then cropped`,name:"crop_size"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.BridgeTowerImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/image_processing_bridgetower.py#L373"}}),He=new L({props:{title:"BridgeTowerProcessor",local:"transformers.BridgeTowerProcessor",headingTag:"h2"}}),Xe=new J({props:{name:"class transformers.BridgeTowerProcessor",anchor:"transformers.BridgeTowerProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerProcessor.image_processor",description:`<strong>image_processor</strong> (<code>BridgeTowerImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.BridgeTowerProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>RobertaTokenizerFast</code>) &#x2014;\nAn instance of [&#x2018;RobertaTokenizerFast`]. The tokenizer is a required input.",name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/processing_bridgetower.py#L44"}}),Se=new J({props:{name:"__call__",anchor:"transformers.BridgeTowerProcessor.__call__",parameters:[{name:"images",val:""},{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"audio",val:" = None"},{name:"videos",val:" = None"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.bridgetower.processing_bridgetower.BridgeTowerProcessorKwargs]"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/processing_bridgetower.py#L67"}}),Ae=new L({props:{title:"BridgeTowerModel",local:"transformers.BridgeTowerModel",headingTag:"h2"}}),Qe=new J({props:{name:"class transformers.BridgeTowerModel",anchor:"transformers.BridgeTowerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1263"}}),Ye=new J({props:{name:"forward",anchor:"transformers.BridgeTowerModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"image_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"image_token_type_idx",val:": typing.Optional[int] = 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:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BridgeTowerModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.BridgeTowerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.BridgeTowerModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.BridgeTowerModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BridgeTowerModel.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).
<code>What are attention masks? &lt;../glossary.html#attention-mask&gt;</code>__</li>
</ul>`,name:"pixel_mask"},{anchor:"transformers.BridgeTowerModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BridgeTowerModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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.BridgeTowerModel.forward.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>pixel_values</code>, you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>pixel_values</code> into patch embeddings.`,name:"image_embeds"},{anchor:"transformers.BridgeTowerModel.forward.image_token_type_idx",description:`<strong>image_token_type_idx</strong> (<code>int</code>, <em>optional</em>) &#x2014;</p>
<ul>
<li>The token type ids for images.</li>
</ul>`,name:"image_token_type_idx"},{anchor:"transformers.BridgeTowerModel.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.BridgeTowerModel.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.BridgeTowerModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.BridgeTowerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BridgeTowerModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, hidden states are returned as a list containing the hidden states of text, image, and
cross-modal components respectively. i.e. <code>(hidden_states_text, hidden_states_image, hidden_states_cross_modal)</code> where each element is a list of the hidden states of the corresponding
modality. <code>hidden_states_txt/img</code> are a list of tensors corresponding to unimodal hidden states and
<code>hidden_states_cross_modal</code> is a list of tuples containing <code>cross_modal_text_hidden_states</code> and
<code>cross_modal_image_hidden_states</code> of each brdige layer.`,name:"output_hidden_states"},{anchor:"transformers.BridgeTowerModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels are currently not supported.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1331",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.bridgetower.modeling_bridgetower.BridgeTowerModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig"
>BridgeTowerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>text_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, text_sequence_length, hidden_size)</code>) — Sequence of hidden-states at the text output of the last layer of the model.</p>
</li>
<li>
<p><strong>image_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, image_sequence_length, hidden_size)</code>) — Sequence of hidden-states at the image output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size x 2)</code>) — Concatenation of last layer hidden-state of the first token of the text and image sequence (classification
token), respectively, after further processing through layers used for auxiliary pretraining tasks.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of
the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.bridgetower.modeling_bridgetower.BridgeTowerModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),se=new yt({props:{$$slots:{default:[sr]},$$scope:{ctx:v}}}),ae=new co({props:{anchor:"transformers.BridgeTowerModel.forward.example",$$slots:{default:[ar]},$$scope:{ctx:v}}}),De=new L({props:{title:"BridgeTowerForContrastiveLearning",local:"transformers.BridgeTowerForContrastiveLearning",headingTag:"h2"}}),Oe=new J({props:{name:"class transformers.BridgeTowerForContrastiveLearning",anchor:"transformers.BridgeTowerForContrastiveLearning",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerForContrastiveLearning.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1835"}}),Ke=new J({props:{name:"forward",anchor:"transformers.BridgeTowerForContrastiveLearning.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"image_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = True"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).
<code>What are attention masks? &lt;../glossary.html#attention-mask&gt;</code>__</li>
</ul>`,name:"pixel_mask"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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.BridgeTowerForContrastiveLearning.forward.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>pixel_values</code>, you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>pixel_values</code> into patch embeddings.`,name:"image_embeds"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.image_token_type_idx",description:`<strong>image_token_type_idx</strong> (<code>int</code>, <em>optional</em>) &#x2014;</p>
<ul>
<li>The token type ids for images.</li>
</ul>`,name:"image_token_type_idx"},{anchor:"transformers.BridgeTowerForContrastiveLearning.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.BridgeTowerForContrastiveLearning.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.BridgeTowerForContrastiveLearning.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1855",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.bridgetower.modeling_bridgetower.BridgeTowerContrastiveOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig"
>BridgeTowerConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code> — Image-text contrastive loss.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</li>
<li><strong>text_embeds</strong> (<code>torch.FloatTensor)</code>, <em>optional</em>, returned when model is initialized with <code>with_projection=True</code>) — The text embeddings obtained by applying the projection layer to the pooler_output.</li>
<li><strong>image_embeds</strong> (<code>torch.FloatTensor)</code>, <em>optional</em>, returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</li>
<li><strong>cross_embeds</strong>  (<code>torch.FloatTensor)</code>, <em>optional</em>, returned when model is initialized with <code>with_projection=True</code>) — The text-image cross-modal embeddings obtained by applying the projection layer to the pooler_output.</li>
<li><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of
the model at the output of each layer plus the optional initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.bridgetower.modeling_bridgetower.BridgeTowerContrastiveOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new yt({props:{$$slots:{default:[ir]},$$scope:{ctx:v}}}),de=new co({props:{anchor:"transformers.BridgeTowerForContrastiveLearning.forward.example",$$slots:{default:[dr]},$$scope:{ctx:v}}}),eo=new L({props:{title:"BridgeTowerForMaskedLM",local:"transformers.BridgeTowerForMaskedLM",headingTag:"h2"}}),oo=new J({props:{name:"class transformers.BridgeTowerForMaskedLM",anchor:"transformers.BridgeTowerForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1615"}}),to=new J({props:{name:"forward",anchor:"transformers.BridgeTowerForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"image_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"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.BridgeTowerForMaskedLM.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. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.BridgeTowerForMaskedLM.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.BridgeTowerForMaskedLM.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.BridgeTowerForMaskedLM.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BridgeTowerForMaskedLM.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).
<code>What are attention masks? &lt;../glossary.html#attention-mask&gt;</code>__</li>
</ul>`,name:"pixel_mask"},{anchor:"transformers.BridgeTowerForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BridgeTowerForMaskedLM.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.BridgeTowerForMaskedLM.forward.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>pixel_values</code>, you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>pixel_values</code> into patch embeddings.`,name:"image_embeds"},{anchor:"transformers.BridgeTowerForMaskedLM.forward.image_token_type_idx",description:`<strong>image_token_type_idx</strong> (<code>int</code>, <em>optional</em>) &#x2014;</p>
<ul>
<li>The token type ids for images.</li>
</ul>`,name:"image_token_type_idx"},{anchor:"transformers.BridgeTowerForMaskedLM.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.BridgeTowerForMaskedLM.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.BridgeTowerForMaskedLM.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.BridgeTowerForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BridgeTowerForMaskedLM.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>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1639",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig"
>BridgeTowerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new yt({props:{$$slots:{default:[lr]},$$scope:{ctx:v}}}),ce=new co({props:{anchor:"transformers.BridgeTowerForMaskedLM.forward.example",$$slots:{default:[cr]},$$scope:{ctx:v}}}),no=new L({props:{title:"BridgeTowerForImageAndTextRetrieval",local:"transformers.BridgeTowerForImageAndTextRetrieval",headingTag:"h2"}}),ro=new J({props:{name:"class transformers.BridgeTowerForImageAndTextRetrieval",anchor:"transformers.BridgeTowerForImageAndTextRetrieval",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1723"}}),so=new J({props:{name:"forward",anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"image_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"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).
<code>What are attention masks? &lt;../glossary.html#attention-mask&gt;</code>__</li>
</ul>`,name:"pixel_mask"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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.BridgeTowerForImageAndTextRetrieval.forward.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>pixel_values</code>, you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>pixel_values</code> into patch embeddings.`,name:"image_embeds"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.image_token_type_idx",description:`<strong>image_token_type_idx</strong> (<code>int</code>, <em>optional</em>) &#x2014;</p>
<ul>
<li>The token type ids for images.</li>
</ul>`,name:"image_token_type_idx"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.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.BridgeTowerForImageAndTextRetrieval.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.BridgeTowerForImageAndTextRetrieval.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Labels for computing the image-text matching loss. 0 means the pairs don&#x2019;t match and 1 means they match.
The pairs with 0 will be skipped for calculation.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bridgetower/modeling_bridgetower.py#L1741",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bridgetower#transformers.BridgeTowerConfig"
>BridgeTowerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new yt({props:{$$slots:{default:[mr]},$$scope:{ctx:v}}}),pe=new co({props:{anchor:"transformers.BridgeTowerForImageAndTextRetrieval.forward.example",$$slots:{default:[pr]},$$scope:{ctx:v}}}),ao=new or({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/bridgetower.md"}}),{c(){r=c("meta"),y=s(),p=c("p"),l=s(),g(b.$$.fragment),o=s(),g(M.$$.fragment),Fo=s(),we=c("p"),we.innerHTML=mn,Ro=s(),Te=c("p"),Te.innerHTML=pn,Vo=s(),be=c("p"),be.textContent=gn,Lo=s(),ye=c("p"),ye.innerHTML=hn,No=s(),K=c("img"),Go=s(),Me=c("small"),Me.innerHTML=un,Po=s(),ve=c("p"),ve.innerHTML=_n,Eo=s(),g(Be.$$.fragment),qo=s(),xe=c("p"),xe.textContent=wn,Ho=s(),Je=c("p"),Je.innerHTML=Tn,Xo=s(),je=c("p"),je.innerHTML=bn,So=s(),g(ke.$$.fragment),Ao=s(),$e=c("p"),$e.innerHTML=yn,Qo=s(),g(Ie.$$.fragment),Yo=s(),Ce=c("p"),Ce.innerHTML=Mn,Do=s(),g(ze.$$.fragment),Oo=s(),Ue=c("p"),Ue.textContent=vn,Ko=s(),Ze=c("ul"),Ze.innerHTML=Bn,et=s(),g(We.$$.fragment),ot=s(),j=c("div"),g(Fe.$$.fragment),Mt=s(),mo=c("p"),mo.innerHTML=xn,vt=s(),po=c("p"),po.innerHTML=Jn,Bt=s(),g(ee.$$.fragment),xt=s(),oe=c("div"),g(Re.$$.fragment),Jt=s(),go=c("p"),go.innerHTML=jn,tt=s(),g(Ve.$$.fragment),nt=s(),k=c("div"),g(Le.$$.fragment),jt=s(),ho=c("p"),ho.innerHTML=kn,kt=s(),fo=c("p"),fo.innerHTML=$n,$t=s(),g(te.$$.fragment),rt=s(),g(Ne.$$.fragment),st=s(),$=c("div"),g(Ge.$$.fragment),It=s(),uo=c("p"),uo.innerHTML=In,Ct=s(),_o=c("p"),_o.innerHTML=Cn,zt=s(),g(ne.$$.fragment),at=s(),g(Pe.$$.fragment),it=s(),N=c("div"),g(Ee.$$.fragment),Ut=s(),wo=c("p"),wo.textContent=zn,Zt=s(),re=c("div"),g(qe.$$.fragment),Wt=s(),To=c("p"),To.textContent=Un,dt=s(),g(He.$$.fragment),lt=s(),I=c("div"),g(Xe.$$.fragment),Ft=s(),bo=c("p"),bo.textContent=Zn,Rt=s(),yo=c("p"),yo.innerHTML=Wn,Vt=s(),A=c("div"),g(Se.$$.fragment),Lt=s(),Mo=c("p"),Mo.innerHTML=Fn,Nt=s(),vo=c("p"),vo.textContent=Rn,ct=s(),g(Ae.$$.fragment),mt=s(),G=c("div"),g(Qe.$$.fragment),Gt=s(),Bo=c("p"),Bo.innerHTML=Vn,Pt=s(),W=c("div"),g(Ye.$$.fragment),Et=s(),xo=c("p"),xo.innerHTML=Ln,qt=s(),g(se.$$.fragment),Ht=s(),g(ae.$$.fragment),pt=s(),g(De.$$.fragment),gt=s(),C=c("div"),g(Oe.$$.fragment),Xt=s(),Jo=c("p"),Jo.textContent=Nn,St=s(),jo=c("p"),jo.innerHTML=Gn,At=s(),F=c("div"),g(Ke.$$.fragment),Qt=s(),ko=c("p"),ko.innerHTML=Pn,Yt=s(),g(ie.$$.fragment),Dt=s(),g(de.$$.fragment),ht=s(),g(eo.$$.fragment),ft=s(),z=c("div"),g(oo.$$.fragment),Ot=s(),$o=c("p"),$o.textContent=En,Kt=s(),Io=c("p"),Io.innerHTML=qn,en=s(),R=c("div"),g(to.$$.fragment),on=s(),Co=c("p"),Co.innerHTML=Hn,tn=s(),g(le.$$.fragment),nn=s(),g(ce.$$.fragment),ut=s(),g(no.$$.fragment),_t=s(),U=c("div"),g(ro.$$.fragment),rn=s(),zo=c("p"),zo.textContent=Xn,sn=s(),Uo=c("p"),Uo.innerHTML=Sn,an=s(),V=c("div"),g(so.$$.fragment),dn=s(),Zo=c("p"),Zo.innerHTML=An,ln=s(),g(me.$$.fragment),cn=s(),g(pe.$$.fragment),wt=s(),g(ao.$$.fragment),Tt=s(),Wo=c("p"),this.h()},l(e){const t=er("svelte-u9bgzb",document.head);r=m(t,"META",{name:!0,content:!0}),t.forEach(n),y=a(e),p=m(e,"P",{}),x(p).forEach(n),l=a(e),h(b.$$.fragment,e),o=a(e),h(M.$$.fragment,e),Fo=a(e),we=m(e,"P",{"data-svelte-h":!0}),T(we)!=="svelte-1arpmxl"&&(we.innerHTML=mn),Ro=a(e),Te=m(e,"P",{"data-svelte-h":!0}),T(Te)!=="svelte-1dn7w8x"&&(Te.innerHTML=pn),Vo=a(e),be=m(e,"P",{"data-svelte-h":!0}),T(be)!=="svelte-vfdo9a"&&(be.textContent=gn),Lo=a(e),ye=m(e,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-wv6d1z"&&(ye.innerHTML=hn),No=a(e),K=m(e,"IMG",{src:!0,alt:!0,width:!0}),Go=a(e),Me=m(e,"SMALL",{"data-svelte-h":!0}),T(Me)!=="svelte-q18iva"&&(Me.innerHTML=un),Po=a(e),ve=m(e,"P",{"data-svelte-h":!0}),T(ve)!=="svelte-8ov80u"&&(ve.innerHTML=_n),Eo=a(e),h(Be.$$.fragment,e),qo=a(e),xe=m(e,"P",{"data-svelte-h":!0}),T(xe)!=="svelte-pbbts2"&&(xe.textContent=wn),Ho=a(e),Je=m(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-12nwqpp"&&(Je.innerHTML=Tn),Xo=a(e),je=m(e,"P",{"data-svelte-h":!0}),T(je)!=="svelte-5nkuhz"&&(je.innerHTML=bn),So=a(e),h(ke.$$.fragment,e),Ao=a(e),$e=m(e,"P",{"data-svelte-h":!0}),T($e)!=="svelte-ndxw0u"&&($e.innerHTML=yn),Qo=a(e),h(Ie.$$.fragment,e),Yo=a(e),Ce=m(e,"P",{"data-svelte-h":!0}),T(Ce)!=="svelte-9f8stj"&&(Ce.innerHTML=Mn),Do=a(e),h(ze.$$.fragment,e),Oo=a(e),Ue=m(e,"P",{"data-svelte-h":!0}),T(Ue)!=="svelte-axv494"&&(Ue.textContent=vn),Ko=a(e),Ze=m(e,"UL",{"data-svelte-h":!0}),T(Ze)!=="svelte-8tm6lx"&&(Ze.innerHTML=Bn),et=a(e),h(We.$$.fragment,e),ot=a(e),j=m(e,"DIV",{class:!0});var Z=x(j);h(Fe.$$.fragment,Z),Mt=a(Z),mo=m(Z,"P",{"data-svelte-h":!0}),T(mo)!=="svelte-l5xixw"&&(mo.innerHTML=xn),vt=a(Z),po=m(Z,"P",{"data-svelte-h":!0}),T(po)!=="svelte-o55m63"&&(po.innerHTML=Jn),Bt=a(Z),h(ee.$$.fragment,Z),xt=a(Z),oe=m(Z,"DIV",{class:!0});var io=x(oe);h(Re.$$.fragment,io),Jt=a(io),go=m(io,"P",{"data-svelte-h":!0}),T(go)!=="svelte-1ce8wwf"&&(go.innerHTML=jn),io.forEach(n),Z.forEach(n),tt=a(e),h(Ve.$$.fragment,e),nt=a(e),k=m(e,"DIV",{class:!0});var P=x(k);h(Le.$$.fragment,P),jt=a(P),ho=m(P,"P",{"data-svelte-h":!0}),T(ho)!=="svelte-1nli65m"&&(ho.innerHTML=kn),kt=a(P),fo=m(P,"P",{"data-svelte-h":!0}),T(fo)!=="svelte-o55m63"&&(fo.innerHTML=$n),$t=a(P),h(te.$$.fragment,P),P.forEach(n),rt=a(e),h(Ne.$$.fragment,e),st=a(e),$=m(e,"DIV",{class:!0});var E=x($);h(Ge.$$.fragment,E),It=a(E),uo=m(E,"P",{"data-svelte-h":!0}),T(uo)!=="svelte-1j8b5fa"&&(uo.innerHTML=In),Ct=a(E),_o=m(E,"P",{"data-svelte-h":!0}),T(_o)!=="svelte-o55m63"&&(_o.innerHTML=Cn),zt=a(E),h(ne.$$.fragment,E),E.forEach(n),at=a(e),h(Pe.$$.fragment,e),it=a(e),N=m(e,"DIV",{class:!0});var Y=x(N);h(Ee.$$.fragment,Y),Ut=a(Y),wo=m(Y,"P",{"data-svelte-h":!0}),T(wo)!=="svelte-6xw7x4"&&(wo.textContent=zn),Zt=a(Y),re=m(Y,"DIV",{class:!0});var lo=x(re);h(qe.$$.fragment,lo),Wt=a(lo),To=m(lo,"P",{"data-svelte-h":!0}),T(To)!=="svelte-1x3yxsa"&&(To.textContent=Un),lo.forEach(n),Y.forEach(n),dt=a(e),h(He.$$.fragment,e),lt=a(e),I=m(e,"DIV",{class:!0});var q=x(I);h(Xe.$$.fragment,q),Ft=a(q),bo=m(q,"P",{"data-svelte-h":!0}),T(bo)!=="svelte-wdq1yt"&&(bo.textContent=Zn),Rt=a(q),yo=m(q,"P",{"data-svelte-h":!0}),T(yo)!=="svelte-99yi24"&&(yo.innerHTML=Wn),Vt=a(q),A=m(q,"DIV",{class:!0});var D=x(A);h(Se.$$.fragment,D),Lt=a(D),Mo=m(D,"P",{"data-svelte-h":!0}),T(Mo)!=="svelte-51984e"&&(Mo.innerHTML=Fn),Nt=a(D),vo=m(D,"P",{"data-svelte-h":!0}),T(vo)!=="svelte-ws0hzs"&&(vo.textContent=Rn),D.forEach(n),q.forEach(n),ct=a(e),h(Ae.$$.fragment,e),mt=a(e),G=m(e,"DIV",{class:!0});var O=x(G);h(Qe.$$.fragment,O),Gt=a(O),Bo=m(O,"P",{"data-svelte-h":!0}),T(Bo)!=="svelte-1o7tfz9"&&(Bo.innerHTML=Vn),Pt=a(O),W=m(O,"DIV",{class:!0});var H=x(W);h(Ye.$$.fragment,H),Et=a(H),xo=m(H,"P",{"data-svelte-h":!0}),T(xo)!=="svelte-2gbld3"&&(xo.innerHTML=Ln),qt=a(H),h(se.$$.fragment,H),Ht=a(H),h(ae.$$.fragment,H),H.forEach(n),O.forEach(n),pt=a(e),h(De.$$.fragment,e),gt=a(e),C=m(e,"DIV",{class:!0});var X=x(C);h(Oe.$$.fragment,X),Xt=a(X),Jo=m(X,"P",{"data-svelte-h":!0}),T(Jo)!=="svelte-7iw5gf"&&(Jo.textContent=Nn),St=a(X),jo=m(X,"P",{"data-svelte-h":!0}),T(jo)!=="svelte-18e9lmc"&&(jo.innerHTML=Gn),At=a(X),F=m(X,"DIV",{class:!0});var ge=x(F);h(Ke.$$.fragment,ge),Qt=a(ge),ko=m(ge,"P",{"data-svelte-h":!0}),T(ko)!=="svelte-17eq1jd"&&(ko.innerHTML=Pn),Yt=a(ge),h(ie.$$.fragment,ge),Dt=a(ge),h(de.$$.fragment,ge),ge.forEach(n),X.forEach(n),ht=a(e),h(eo.$$.fragment,e),ft=a(e),z=m(e,"DIV",{class:!0});var he=x(z);h(oo.$$.fragment,he),Ot=a(he),$o=m(he,"P",{"data-svelte-h":!0}),T($o)!=="svelte-1mczdox"&&($o.textContent=En),Kt=a(he),Io=m(he,"P",{"data-svelte-h":!0}),T(Io)!=="svelte-18e9lmc"&&(Io.innerHTML=qn),en=a(he),R=m(he,"DIV",{class:!0});var fe=x(R);h(to.$$.fragment,fe),on=a(fe),Co=m(fe,"P",{"data-svelte-h":!0}),T(Co)!=="svelte-1ijkcbn"&&(Co.innerHTML=Hn),tn=a(fe),h(le.$$.fragment,fe),nn=a(fe),h(ce.$$.fragment,fe),fe.forEach(n),he.forEach(n),ut=a(e),h(no.$$.fragment,e),_t=a(e),U=m(e,"DIV",{class:!0});var ue=x(U);h(ro.$$.fragment,ue),rn=a(ue),zo=m(ue,"P",{"data-svelte-h":!0}),T(zo)!=="svelte-7q7qrd"&&(zo.textContent=Xn),sn=a(ue),Uo=m(ue,"P",{"data-svelte-h":!0}),T(Uo)!=="svelte-18e9lmc"&&(Uo.innerHTML=Sn),an=a(ue),V=m(ue,"DIV",{class:!0});var _e=x(V);h(so.$$.fragment,_e),dn=a(_e),Zo=m(_e,"P",{"data-svelte-h":!0}),T(Zo)!=="svelte-wpcyg9"&&(Zo.innerHTML=An),ln=a(_e),h(me.$$.fragment,_e),cn=a(_e),h(pe.$$.fragment,_e),_e.forEach(n),ue.forEach(n),wt=a(e),h(ao.$$.fragment,e),Tt=a(e),Wo=m(e,"P",{}),x(Wo).forEach(n),this.h()},h(){B(r,"name","hf:doc:metadata"),B(r,"content",hr),Yn(K.src,fn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/bridgetower_architecture%20.jpg")||B(K,"src",fn),B(K,"alt","drawing"),B(K,"width","600"),B(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){d(document.head,r),i(e,y,t),i(e,p,t),i(e,l,t),f(b,e,t),i(e,o,t),f(M,e,t),i(e,Fo,t),i(e,we,t),i(e,Ro,t),i(e,Te,t),i(e,Vo,t),i(e,be,t),i(e,Lo,t),i(e,ye,t),i(e,No,t),i(e,K,t),i(e,Go,t),i(e,Me,t),i(e,Po,t),i(e,ve,t),i(e,Eo,t),f(Be,e,t),i(e,qo,t),i(e,xe,t),i(e,Ho,t),i(e,Je,t),i(e,Xo,t),i(e,je,t),i(e,So,t),f(ke,e,t),i(e,Ao,t),i(e,$e,t),i(e,Qo,t),f(Ie,e,t),i(e,Yo,t),i(e,Ce,t),i(e,Do,t),f(ze,e,t),i(e,Oo,t),i(e,Ue,t),i(e,Ko,t),i(e,Ze,t),i(e,et,t),f(We,e,t),i(e,ot,t),i(e,j,t),f(Fe,j,null),d(j,Mt),d(j,mo),d(j,vt),d(j,po),d(j,Bt),f(ee,j,null),d(j,xt),d(j,oe),f(Re,oe,null),d(oe,Jt),d(oe,go),i(e,tt,t),f(Ve,e,t),i(e,nt,t),i(e,k,t),f(Le,k,null),d(k,jt),d(k,ho),d(k,kt),d(k,fo),d(k,$t),f(te,k,null),i(e,rt,t),f(Ne,e,t),i(e,st,t),i(e,$,t),f(Ge,$,null),d($,It),d($,uo),d($,Ct),d($,_o),d($,zt),f(ne,$,null),i(e,at,t),f(Pe,e,t),i(e,it,t),i(e,N,t),f(Ee,N,null),d(N,Ut),d(N,wo),d(N,Zt),d(N,re),f(qe,re,null),d(re,Wt),d(re,To),i(e,dt,t),f(He,e,t),i(e,lt,t),i(e,I,t),f(Xe,I,null),d(I,Ft),d(I,bo),d(I,Rt),d(I,yo),d(I,Vt),d(I,A),f(Se,A,null),d(A,Lt),d(A,Mo),d(A,Nt),d(A,vo),i(e,ct,t),f(Ae,e,t),i(e,mt,t),i(e,G,t),f(Qe,G,null),d(G,Gt),d(G,Bo),d(G,Pt),d(G,W),f(Ye,W,null),d(W,Et),d(W,xo),d(W,qt),f(se,W,null),d(W,Ht),f(ae,W,null),i(e,pt,t),f(De,e,t),i(e,gt,t),i(e,C,t),f(Oe,C,null),d(C,Xt),d(C,Jo),d(C,St),d(C,jo),d(C,At),d(C,F),f(Ke,F,null),d(F,Qt),d(F,ko),d(F,Yt),f(ie,F,null),d(F,Dt),f(de,F,null),i(e,ht,t),f(eo,e,t),i(e,ft,t),i(e,z,t),f(oo,z,null),d(z,Ot),d(z,$o),d(z,Kt),d(z,Io),d(z,en),d(z,R),f(to,R,null),d(R,on),d(R,Co),d(R,tn),f(le,R,null),d(R,nn),f(ce,R,null),i(e,ut,t),f(no,e,t),i(e,_t,t),i(e,U,t),f(ro,U,null),d(U,rn),d(U,zo),d(U,sn),d(U,Uo),d(U,an),d(U,V),f(so,V,null),d(V,dn),d(V,Zo),d(V,ln),f(me,V,null),d(V,cn),f(pe,V,null),i(e,wt,t),f(ao,e,t),i(e,Tt,t),i(e,Wo,t),bt=!0},p(e,[t]){const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),ee.$set(Z);const io={};t&2&&(io.$$scope={dirty:t,ctx:e}),te.$set(io);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),ne.$set(P);const E={};t&2&&(E.$$scope={dirty:t,ctx:e}),se.$set(E);const Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),ae.$set(Y);const lo={};t&2&&(lo.$$scope={dirty:t,ctx:e}),ie.$set(lo);const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),de.$set(q);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),le.$set(D);const O={};t&2&&(O.$$scope={dirty:t,ctx:e}),ce.$set(O);const H={};t&2&&(H.$$scope={dirty:t,ctx:e}),me.$set(H);const X={};t&2&&(X.$$scope={dirty:t,ctx:e}),pe.$set(X)},i(e){bt||(u(b.$$.fragment,e),u(M.$$.fragment,e),u(Be.$$.fragment,e),u(ke.$$.fragment,e),u(Ie.$$.fragment,e),u(ze.$$.fragment,e),u(We.$$.fragment,e),u(Fe.$$.fragment,e),u(ee.$$.fragment,e),u(Re.$$.fragment,e),u(Ve.$$.fragment,e),u(Le.$$.fragment,e),u(te.$$.fragment,e),u(Ne.$$.fragment,e),u(Ge.$$.fragment,e),u(ne.$$.fragment,e),u(Pe.$$.fragment,e),u(Ee.$$.fragment,e),u(qe.$$.fragment,e),u(He.$$.fragment,e),u(Xe.$$.fragment,e),u(Se.$$.fragment,e),u(Ae.$$.fragment,e),u(Qe.$$.fragment,e),u(Ye.$$.fragment,e),u(se.$$.fragment,e),u(ae.$$.fragment,e),u(De.$$.fragment,e),u(Oe.$$.fragment,e),u(Ke.$$.fragment,e),u(ie.$$.fragment,e),u(de.$$.fragment,e),u(eo.$$.fragment,e),u(oo.$$.fragment,e),u(to.$$.fragment,e),u(le.$$.fragment,e),u(ce.$$.fragment,e),u(no.$$.fragment,e),u(ro.$$.fragment,e),u(so.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(ao.$$.fragment,e),bt=!0)},o(e){_(b.$$.fragment,e),_(M.$$.fragment,e),_(Be.$$.fragment,e),_(ke.$$.fragment,e),_(Ie.$$.fragment,e),_(ze.$$.fragment,e),_(We.$$.fragment,e),_(Fe.$$.fragment,e),_(ee.$$.fragment,e),_(Re.$$.fragment,e),_(Ve.$$.fragment,e),_(Le.$$.fragment,e),_(te.$$.fragment,e),_(Ne.$$.fragment,e),_(Ge.$$.fragment,e),_(ne.$$.fragment,e),_(Pe.$$.fragment,e),_(Ee.$$.fragment,e),_(qe.$$.fragment,e),_(He.$$.fragment,e),_(Xe.$$.fragment,e),_(Se.$$.fragment,e),_(Ae.$$.fragment,e),_(Qe.$$.fragment,e),_(Ye.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(De.$$.fragment,e),_(Oe.$$.fragment,e),_(Ke.$$.fragment,e),_(ie.$$.fragment,e),_(de.$$.fragment,e),_(eo.$$.fragment,e),_(oo.$$.fragment,e),_(to.$$.fragment,e),_(le.$$.fragment,e),_(ce.$$.fragment,e),_(no.$$.fragment,e),_(ro.$$.fragment,e),_(so.$$.fragment,e),_(me.$$.fragment,e),_(pe.$$.fragment,e),_(ao.$$.fragment,e),bt=!1},d(e){e&&(n(y),n(p),n(l),n(o),n(Fo),n(we),n(Ro),n(Te),n(Vo),n(be),n(Lo),n(ye),n(No),n(K),n(Go),n(Me),n(Po),n(ve),n(Eo),n(qo),n(xe),n(Ho),n(Je),n(Xo),n(je),n(So),n(Ao),n($e),n(Qo),n(Yo),n(Ce),n(Do),n(Oo),n(Ue),n(Ko),n(Ze),n(et),n(ot),n(j),n(tt),n(nt),n(k),n(rt),n(st),n($),n(at),n(it),n(N),n(dt),n(lt),n(I),n(ct),n(mt),n(G),n(pt),n(gt),n(C),n(ht),n(ft),n(z),n(ut),n(_t),n(U),n(wt),n(Tt),n(Wo)),n(r),w(b,e),w(M,e),w(Be,e),w(ke,e),w(Ie,e),w(ze,e),w(We,e),w(Fe),w(ee),w(Re),w(Ve,e),w(Le),w(te),w(Ne,e),w(Ge),w(ne),w(Pe,e),w(Ee),w(qe),w(He,e),w(Xe),w(Se),w(Ae,e),w(Qe),w(Ye),w(se),w(ae),w(De,e),w(Oe),w(Ke),w(ie),w(de),w(eo,e),w(oo),w(to),w(le),w(ce),w(no,e),w(ro),w(so),w(me),w(pe),w(ao,e)}}}const hr='{"title":"BridgeTower","local":"bridgetower","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips and examples","local":"usage-tips-and-examples","sections":[],"depth":2},{"title":"BridgeTowerConfig","local":"transformers.BridgeTowerConfig","sections":[],"depth":2},{"title":"BridgeTowerTextConfig","local":"transformers.BridgeTowerTextConfig","sections":[],"depth":2},{"title":"BridgeTowerVisionConfig","local":"transformers.BridgeTowerVisionConfig","sections":[],"depth":2},{"title":"BridgeTowerImageProcessor","local":"transformers.BridgeTowerImageProcessor","sections":[],"depth":2},{"title":"BridgeTowerProcessor","local":"transformers.BridgeTowerProcessor","sections":[],"depth":2},{"title":"BridgeTowerModel","local":"transformers.BridgeTowerModel","sections":[],"depth":2},{"title":"BridgeTowerForContrastiveLearning","local":"transformers.BridgeTowerForContrastiveLearning","sections":[],"depth":2},{"title":"BridgeTowerForMaskedLM","local":"transformers.BridgeTowerForMaskedLM","sections":[],"depth":2},{"title":"BridgeTowerForImageAndTextRetrieval","local":"transformers.BridgeTowerForImageAndTextRetrieval","sections":[],"depth":2}],"depth":1}';function fr(v){return Dn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vr extends On{constructor(r){super(),Kn(this,r,fr,gr,Qn,{})}}export{vr as component};
