import{s as Qn,f as Dn,o as Yn,n as S}from"../chunks/scheduler.bdbef820.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 B,u as h,x as T,k as j,y as d,a as i,v as f,d as u,t as _,w}from"../chunks/index.33f81d56.js";import{T as bt}from"../chunks/Tip.34194030.js";import{D as J}from"../chunks/Docstring.b3df4217.js";import{C as Q}from"../chunks/CodeBlock.3bad7fc9.js";import{E as co}from"../chunks/ExampleCodeBlock.d705c5b9.js";import{H as L,E as or}from"../chunks/index.474b463a.js";function tr(v){let r,b="Example:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function nr(v){let r,b="Example:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function rr(v){let r,b="Example:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function sr(v){let r,b=`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=b},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function ar(v){let r,b="Examples:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function ir(v){let r,b=`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=b},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function dr(v){let r,b="Examples:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function lr(v){let r,b=`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=b},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function cr(v){let r,b="Examples:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function mr(v){let r,b=`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=b},l(p){r=m(p,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(p,l){i(p,r,l)},p:S,d(p){p&&n(r)}}}function pr(v){let r,b="Examples:",p,l,y;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=b,p=s(),g(l.$$.fragment)},l(o){r=m(o,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=b),p=a(o),h(l.$$.fragment,o)},m(o,M){i(o,r,M),i(o,p,M),f(l,o,M),y=!0},p:S,i(o){y||(u(l.$$.fragment,o),y=!0)},o(o){_(l.$$.fragment,o),y=!1},d(o){o&&(n(r),n(p)),w(l,o)}}}function gr(v){let r,b,p,l,y,o,M,Fo,we,mn=`BridgeTower モデルは、Xiao Xu、Chenfei Wu、Shachar Rosenman、Vasudev Lal、Wanxiang Che、Nan Duan <a href="https://arxiv.org/abs/2206.08657" rel="nofollow">BridgeTower: Building Bridges Between Encoders in Vision-Language Representative Learning</a> で提案されました。ドゥアン。このモデルの目標は、
各ユニモーダル エンコーダとクロスモーダル エンコーダの間のブリッジにより、クロスモーダル エンコーダの各層での包括的かつ詳細な対話が可能になり、追加のパフォーマンスと計算コストがほとんど無視できる程度で、さまざまな下流タスクで優れたパフォーマンスを実現します。`,Ro,Te,pn='この論文は <a href="https://aaai.org/Conferences/AAAI-23/" rel="nofollow">AAAI’23</a> 会議に採択されました。',Vo,ye,gn="論文の要約は次のとおりです。",Lo,be,hn=`<em>TWO-TOWER アーキテクチャを備えたビジョン言語 (VL) モデルは、近年の視覚言語表現学習の主流となっています。
現在の VL モデルは、軽量のユニモーダル エンコーダーを使用して、ディープ クロスモーダル エンコーダーで両方のモダリティを同時に抽出、位置合わせ、融合することを学習するか、事前にトレーニングされたディープ ユニモーダル エンコーダーから最終層のユニモーダル表現を上部のクロスモーダルエンコーダー。
どちらのアプローチも、視覚言語表現の学習を制限し、モデルのパフォーマンスを制限する可能性があります。この論文では、ユニモーダル エンコーダの最上位層とクロスモーダル エンコーダの各層の間の接続を構築する複数のブリッジ層を導入する BRIDGETOWER を提案します。
これにより、効果的なボトムアップのクロスモーダル調整と、クロスモーダル エンコーダー内の事前トレーニング済みユニモーダル エンコーダーのさまざまなセマンティック レベルの視覚表現とテキスト表現の間の融合が可能になります。 BRIDGETOWER は 4M 画像のみで事前トレーニングされており、さまざまな下流の視覚言語タスクで最先端のパフォーマンスを実現します。
特に、VQAv2 テスト標準セットでは、BRIDGETOWER は 78.73% の精度を達成し、同じ事前トレーニング データとほぼ無視できる追加パラメータと計算コストで以前の最先端モデル METER を 1.09% 上回りました。
特に、モデルをさらにスケーリングすると、BRIDGETOWER は 81.15% の精度を達成し、桁違いに大きなデータセットで事前トレーニングされたモデルを上回りました。</em>`,No,K,fn,Go,Me,un='ブリッジタワー アーキテクチャ。 <a href="https://arxiv.org/abs/2206.08657">元の論文から抜粋。</a>',Eo,ve,_n='このモデルは、<a href="https://huggingface.co/anahita-b" rel="nofollow">Anahita Bhiwandiwalla</a>、<a href="https://huggingface.co/Tile" rel="nofollow">Tiep Le</a>、<a href="https://huggingface.co/shaoyent" rel="nofollow">Shaoyen Tseng</a> 。元のコードは <a href="https://github.com/microsoft/BridgeTower" rel="nofollow">ここ</a> にあります。',Po,je,qo,Be,wn=`BridgeTower は、ビジュアル エンコーダー、テキスト エンコーダー、および複数の軽量ブリッジ レイヤーを備えたクロスモーダル エンコーダーで構成されます。
このアプローチの目標は、各ユニモーダル エンコーダーとクロスモーダル エンコーダーの間にブリッジを構築し、クロスモーダル エンコーダーの各層で包括的かつ詳細な対話を可能にすることでした。
原則として、提案されたアーキテクチャでは、任意のビジュアル、テキスト、またはクロスモーダル エンコーダを適用できます。`,Ho,Je,Tn=`<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> は、<code>RobertaTokenizer</code> と <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a> を単一のインスタンスにラップし、両方の機能を実現します。
テキストをエンコードし、画像をそれぞれ用意します。`,Xo,xe,yn='次の例は、<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> と <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerForContrastiveLearning">BridgeTowerForContrastiveLearning</a> を使用して対照学習を実行する方法を示しています。',So,ke,Ao,$e,bn='次の例は、<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> と <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerForImageAndTextRetrieval">BridgeTowerForImageAndTextRetrieval</a> を使用して画像テキストの取得を実行する方法を示しています。',Qo,Ce,Do,Ie,Mn='次の例は、<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> と <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerForMaskedLM">BridgeTowerForMaskedLM</a> を使用してマスクされた言語モデリングを実行する方法を示しています。',Yo,ze,Oo,Ue,vn="チップ：",Ko,Ze,jn='<li>BridgeTower のこの実装では、<code>RobertaTokenizer</code> を使用してテキスト埋め込みを生成し、OpenAI の CLIP/ViT モデルを使用して視覚的埋め込みを計算します。</li> <li>事前トレーニングされた <a href="https://huggingface.co/BridgeTower/bridgetower-base" rel="nofollow">bridgeTower-base</a> および <a href="https://huggingface.co/BridgeTower/bridgetower--base-itm-mlm" rel="nofollow">bridgetower マスクされた言語モデリングと画像テキスト マッチング</a> のチェックポイント がリリースされました。</li> <li>画像検索およびその他の下流タスクにおける BridgeTower のパフォーマンスについては、<a href="https://arxiv.org/pdf/2206.08657.pdf" rel="nofollow">表 5</a> を参照してください。</li> <li>このモデルの PyTorch バージョンは、torch 1.10 以降でのみ使用できます。</li>',et,We,ot,x,Fe,Mt,mo,Bn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/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/ja/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/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,jt,ee,Bt,oe,Re,Jt,go,xn=`Instantiate a <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a> (or a derived class) from BridgeTower text model configuration. Returns:
<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerConfig">BridgeTowerConfig</a>: An instance of a configuration object`,tt,Ve,nt,k,Le,xt,ho,kn=`This is the configuration class to store the text configuration of a <a href="/docs/transformers/main/ja/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/ja/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/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,$t,te,rt,Ne,st,$,Ge,Ct,uo,Cn=`This is the configuration class to store the vision configuration of a <a href="/docs/transformers/main/ja/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.`,It,_o,In=`Configuration objects inherit from <a href="/docs/transformers/main/ja/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/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,zt,ne,at,Ee,it,N,Pe,Ut,wo,zn="Constructs a BridgeTower image processor.",Zt,re,qe,Wt,To,Un="Preprocess an image or batch of images.",dt,He,lt,C,Xe,Ft,yo,Zn=`Constructs a BridgeTower processor which wraps a Roberta tokenizer and BridgeTower image processor into a single
processor.`,Rt,bo,Wn=`<a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerProcessor">BridgeTowerProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a> and
<code>RobertaTokenizerFast</code>. See the docstring of <a href="/docs/transformers/main/ja/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/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__call__">BridgeTowerImageProcessor.<strong>call</strong>()</a> method to prepare image(s) for the model, and
<a href="/docs/transformers/main/ja/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,jo,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.`,Et,W,De,Pt,Bo,Ln='The <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerModel">BridgeTowerModel</a> forward method, overrides the <code>__call__</code> special method.',qt,se,Ht,ae,pt,Ye,gt,I,Oe,Xt,Jo,Nn="BridgeTower Model with a image-text contrastive head on top computing image-text contrastive loss.",St,xo,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,En='The <a href="/docs/transformers/main/ja/model_doc/bridgetower#transformers.BridgeTowerForContrastiveLearning">BridgeTowerForContrastiveLearning</a> forward method, overrides the <code>__call__</code> special method.',Dt,ie,Yt,de,ht,eo,ft,z,oo,Ot,$o,Pn="BridgeTower Model with a language modeling head on top as done during pretraining.",Kt,Co,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,Io,Hn='The <a href="/docs/transformers/main/ja/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/ja/model_doc/bridgetower#transformers.BridgeTowerForImageAndTextRetrieval">BridgeTowerForImageAndTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',ln,me,cn,pe,wt,ao,Tt,Wo,yt;return y=new L({props:{title:"BridgeTower",local:"bridgetower",headingTag:"h1"}}),M=new L({props:{title:"Overview",local:"overview",headingTag:"h2"}}),je=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}}),Ce=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/ja/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/ja/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/ja/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}}}),Ee=new L({props:{title:"BridgeTowerImageProcessor",local:"transformers.BridgeTowerImageProcessor",headingTag:"h2"}}),Pe=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'), list['PIL.Image.Image'], list[numpy.ndarray], list['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/ja/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/ja/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/ja/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"}}),De=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/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/ja/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/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/ja/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/ja/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 bt({props:{$$slots:{default:[sr]},$$scope:{ctx:v}}}),ae=new co({props:{anchor:"transformers.BridgeTowerModel.forward.example",$$slots:{default:[ar]},$$scope:{ctx:v}}}),Ye=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/ja/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/ja/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/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/ja/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/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/ja/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/ja/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 bt({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/ja/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/ja/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/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/ja/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/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/ja/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/ja/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/ja/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/ja/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new bt({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/ja/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/ja/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/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/ja/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/ja/model_doc/bridgetower#transformers.BridgeTowerImageProcessor">BridgeTowerImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/ja/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/ja/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/ja/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/ja/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new bt({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/ja/model_doc/bridgetower.md"}}),{c(){r=c("meta"),b=s(),p=c("p"),l=s(),g(y.$$.fragment),o=s(),g(M.$$.fragment),Fo=s(),we=c("p"),we.innerHTML=mn,Ro=s(),Te=c("p"),Te.innerHTML=pn,Vo=s(),ye=c("p"),ye.textContent=gn,Lo=s(),be=c("p"),be.innerHTML=hn,No=s(),K=c("img"),Go=s(),Me=c("small"),Me.innerHTML=un,Eo=s(),ve=c("p"),ve.innerHTML=_n,Po=s(),g(je.$$.fragment),qo=s(),Be=c("p"),Be.textContent=wn,Ho=s(),Je=c("p"),Je.innerHTML=Tn,Xo=s(),xe=c("p"),xe.innerHTML=yn,So=s(),g(ke.$$.fragment),Ao=s(),$e=c("p"),$e.innerHTML=bn,Qo=s(),g(Ce.$$.fragment),Do=s(),Ie=c("p"),Ie.innerHTML=Mn,Yo=s(),g(ze.$$.fragment),Oo=s(),Ue=c("p"),Ue.textContent=vn,Ko=s(),Ze=c("ul"),Ze.innerHTML=jn,et=s(),g(We.$$.fragment),ot=s(),x=c("div"),g(Fe.$$.fragment),Mt=s(),mo=c("p"),mo.innerHTML=Bn,vt=s(),po=c("p"),po.innerHTML=Jn,jt=s(),g(ee.$$.fragment),Bt=s(),oe=c("div"),g(Re.$$.fragment),Jt=s(),go=c("p"),go.innerHTML=xn,tt=s(),g(Ve.$$.fragment),nt=s(),k=c("div"),g(Le.$$.fragment),xt=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),Ct=s(),uo=c("p"),uo.innerHTML=Cn,It=s(),_o=c("p"),_o.innerHTML=In,zt=s(),g(ne.$$.fragment),at=s(),g(Ee.$$.fragment),it=s(),N=c("div"),g(Pe.$$.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(),C=c("div"),g(Xe.$$.fragment),Ft=s(),yo=c("p"),yo.textContent=Zn,Rt=s(),bo=c("p"),bo.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(),jo=c("p"),jo.innerHTML=Vn,Et=s(),W=c("div"),g(De.$$.fragment),Pt=s(),Bo=c("p"),Bo.innerHTML=Ln,qt=s(),g(se.$$.fragment),Ht=s(),g(ae.$$.fragment),pt=s(),g(Ye.$$.fragment),gt=s(),I=c("div"),g(Oe.$$.fragment),Xt=s(),Jo=c("p"),Jo.textContent=Nn,St=s(),xo=c("p"),xo.innerHTML=Gn,At=s(),F=c("div"),g(Ke.$$.fragment),Qt=s(),ko=c("p"),ko.innerHTML=En,Dt=s(),g(ie.$$.fragment),Yt=s(),g(de.$$.fragment),ht=s(),g(eo.$$.fragment),ft=s(),z=c("div"),g(oo.$$.fragment),Ot=s(),$o=c("p"),$o.textContent=Pn,Kt=s(),Co=c("p"),Co.innerHTML=qn,en=s(),R=c("div"),g(to.$$.fragment),on=s(),Io=c("p"),Io.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),b=a(e),p=m(e,"P",{}),B(p).forEach(n),l=a(e),h(y.$$.fragment,e),o=a(e),h(M.$$.fragment,e),Fo=a(e),we=m(e,"P",{"data-svelte-h":!0}),T(we)!=="svelte-1y5q9qu"&&(we.innerHTML=mn),Ro=a(e),Te=m(e,"P",{"data-svelte-h":!0}),T(Te)!=="svelte-1gc4c4w"&&(Te.innerHTML=pn),Vo=a(e),ye=m(e,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-1cv3nri"&&(ye.textContent=gn),Lo=a(e),be=m(e,"P",{"data-svelte-h":!0}),T(be)!=="svelte-1k1npc1"&&(be.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-zwxe54"&&(Me.innerHTML=un),Eo=a(e),ve=m(e,"P",{"data-svelte-h":!0}),T(ve)!=="svelte-lhhz16"&&(ve.innerHTML=_n),Po=a(e),h(je.$$.fragment,e),qo=a(e),Be=m(e,"P",{"data-svelte-h":!0}),T(Be)!=="svelte-2e29iy"&&(Be.textContent=wn),Ho=a(e),Je=m(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-istyay"&&(Je.innerHTML=Tn),Xo=a(e),xe=m(e,"P",{"data-svelte-h":!0}),T(xe)!=="svelte-1q1k5z4"&&(xe.innerHTML=yn),So=a(e),h(ke.$$.fragment,e),Ao=a(e),$e=m(e,"P",{"data-svelte-h":!0}),T($e)!=="svelte-a9a60"&&($e.innerHTML=bn),Qo=a(e),h(Ce.$$.fragment,e),Do=a(e),Ie=m(e,"P",{"data-svelte-h":!0}),T(Ie)!=="svelte-zeathb"&&(Ie.innerHTML=Mn),Yo=a(e),h(ze.$$.fragment,e),Oo=a(e),Ue=m(e,"P",{"data-svelte-h":!0}),T(Ue)!=="svelte-fhhf9b"&&(Ue.textContent=vn),Ko=a(e),Ze=m(e,"UL",{"data-svelte-h":!0}),T(Ze)!=="svelte-a7g7wf"&&(Ze.innerHTML=jn),et=a(e),h(We.$$.fragment,e),ot=a(e),x=m(e,"DIV",{class:!0});var Z=B(x);h(Fe.$$.fragment,Z),Mt=a(Z),mo=m(Z,"P",{"data-svelte-h":!0}),T(mo)!=="svelte-lfy63m"&&(mo.innerHTML=Bn),vt=a(Z),po=m(Z,"P",{"data-svelte-h":!0}),T(po)!=="svelte-1s6wgpv"&&(po.innerHTML=Jn),jt=a(Z),h(ee.$$.fragment,Z),Bt=a(Z),oe=m(Z,"DIV",{class:!0});var io=B(oe);h(Re.$$.fragment,io),Jt=a(io),go=m(io,"P",{"data-svelte-h":!0}),T(go)!=="svelte-1frlhnf"&&(go.innerHTML=xn),io.forEach(n),Z.forEach(n),tt=a(e),h(Ve.$$.fragment,e),nt=a(e),k=m(e,"DIV",{class:!0});var E=B(k);h(Le.$$.fragment,E),xt=a(E),ho=m(E,"P",{"data-svelte-h":!0}),T(ho)!=="svelte-1634d5o"&&(ho.innerHTML=kn),kt=a(E),fo=m(E,"P",{"data-svelte-h":!0}),T(fo)!=="svelte-1s6wgpv"&&(fo.innerHTML=$n),$t=a(E),h(te.$$.fragment,E),E.forEach(n),rt=a(e),h(Ne.$$.fragment,e),st=a(e),$=m(e,"DIV",{class:!0});var P=B($);h(Ge.$$.fragment,P),Ct=a(P),uo=m(P,"P",{"data-svelte-h":!0}),T(uo)!=="svelte-1wrzz88"&&(uo.innerHTML=Cn),It=a(P),_o=m(P,"P",{"data-svelte-h":!0}),T(_o)!=="svelte-1s6wgpv"&&(_o.innerHTML=In),zt=a(P),h(ne.$$.fragment,P),P.forEach(n),at=a(e),h(Ee.$$.fragment,e),it=a(e),N=m(e,"DIV",{class:!0});var D=B(N);h(Pe.$$.fragment,D),Ut=a(D),wo=m(D,"P",{"data-svelte-h":!0}),T(wo)!=="svelte-6xw7x4"&&(wo.textContent=zn),Zt=a(D),re=m(D,"DIV",{class:!0});var lo=B(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),D.forEach(n),dt=a(e),h(He.$$.fragment,e),lt=a(e),C=m(e,"DIV",{class:!0});var q=B(C);h(Xe.$$.fragment,q),Ft=a(q),yo=m(q,"P",{"data-svelte-h":!0}),T(yo)!=="svelte-wdq1yt"&&(yo.textContent=Zn),Rt=a(q),bo=m(q,"P",{"data-svelte-h":!0}),T(bo)!=="svelte-shahmv"&&(bo.innerHTML=Wn),Vt=a(q),A=m(q,"DIV",{class:!0});var Y=B(A);h(Se.$$.fragment,Y),Lt=a(Y),Mo=m(Y,"P",{"data-svelte-h":!0}),T(Mo)!=="svelte-1p7wsyh"&&(Mo.innerHTML=Fn),Nt=a(Y),vo=m(Y,"P",{"data-svelte-h":!0}),T(vo)!=="svelte-ws0hzs"&&(vo.textContent=Rn),Y.forEach(n),q.forEach(n),ct=a(e),h(Ae.$$.fragment,e),mt=a(e),G=m(e,"DIV",{class:!0});var O=B(G);h(Qe.$$.fragment,O),Gt=a(O),jo=m(O,"P",{"data-svelte-h":!0}),T(jo)!=="svelte-1o7tfz9"&&(jo.innerHTML=Vn),Et=a(O),W=m(O,"DIV",{class:!0});var H=B(W);h(De.$$.fragment,H),Pt=a(H),Bo=m(H,"P",{"data-svelte-h":!0}),T(Bo)!=="svelte-1qa8gip"&&(Bo.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(Ye.$$.fragment,e),gt=a(e),I=m(e,"DIV",{class:!0});var X=B(I);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),xo=m(X,"P",{"data-svelte-h":!0}),T(xo)!=="svelte-18e9lmc"&&(xo.innerHTML=Gn),At=a(X),F=m(X,"DIV",{class:!0});var ge=B(F);h(Ke.$$.fragment,ge),Qt=a(ge),ko=m(ge,"P",{"data-svelte-h":!0}),T(ko)!=="svelte-pqmhn7"&&(ko.innerHTML=En),Dt=a(ge),h(ie.$$.fragment,ge),Yt=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=B(z);h(oo.$$.fragment,he),Ot=a(he),$o=m(he,"P",{"data-svelte-h":!0}),T($o)!=="svelte-1mczdox"&&($o.textContent=Pn),Kt=a(he),Co=m(he,"P",{"data-svelte-h":!0}),T(Co)!=="svelte-18e9lmc"&&(Co.innerHTML=qn),en=a(he),R=m(he,"DIV",{class:!0});var fe=B(R);h(to.$$.fragment,fe),on=a(fe),Io=m(fe,"P",{"data-svelte-h":!0}),T(Io)!=="svelte-c4woel"&&(Io.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=B(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=B(V);h(so.$$.fragment,_e),dn=a(_e),Zo=m(_e,"P",{"data-svelte-h":!0}),T(Zo)!=="svelte-bw0usz"&&(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",{}),B(Wo).forEach(n),this.h()},h(){j(r,"name","hf:doc:metadata"),j(r,"content",hr),Dn(K.src,fn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/bridgetower_architecture%20.jpg")||j(K,"src",fn),j(K,"alt","drawing"),j(K,"width","600"),j(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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,b,t),i(e,p,t),i(e,l,t),f(y,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,ye,t),i(e,Lo,t),i(e,be,t),i(e,No,t),i(e,K,t),i(e,Go,t),i(e,Me,t),i(e,Eo,t),i(e,ve,t),i(e,Po,t),f(je,e,t),i(e,qo,t),i(e,Be,t),i(e,Ho,t),i(e,Je,t),i(e,Xo,t),i(e,xe,t),i(e,So,t),f(ke,e,t),i(e,Ao,t),i(e,$e,t),i(e,Qo,t),f(Ce,e,t),i(e,Do,t),i(e,Ie,t),i(e,Yo,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,x,t),f(Fe,x,null),d(x,Mt),d(x,mo),d(x,vt),d(x,po),d(x,jt),f(ee,x,null),d(x,Bt),d(x,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,xt),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($,Ct),d($,uo),d($,It),d($,_o),d($,zt),f(ne,$,null),i(e,at,t),f(Ee,e,t),i(e,it,t),i(e,N,t),f(Pe,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,C,t),f(Xe,C,null),d(C,Ft),d(C,yo),d(C,Rt),d(C,bo),d(C,Vt),d(C,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,jo),d(G,Et),d(G,W),f(De,W,null),d(W,Pt),d(W,Bo),d(W,qt),f(se,W,null),d(W,Ht),f(ae,W,null),i(e,pt,t),f(Ye,e,t),i(e,gt,t),i(e,I,t),f(Oe,I,null),d(I,Xt),d(I,Jo),d(I,St),d(I,xo),d(I,At),d(I,F),f(Ke,F,null),d(F,Qt),d(F,ko),d(F,Dt),f(ie,F,null),d(F,Yt),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,Co),d(z,en),d(z,R),f(to,R,null),d(R,on),d(R,Io),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),yt=!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 E={};t&2&&(E.$$scope={dirty:t,ctx:e}),ne.$set(E);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),se.$set(P);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),ae.$set(D);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 Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),le.$set(Y);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){yt||(u(y.$$.fragment,e),u(M.$$.fragment,e),u(je.$$.fragment,e),u(ke.$$.fragment,e),u(Ce.$$.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(Ee.$$.fragment,e),u(Pe.$$.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(De.$$.fragment,e),u(se.$$.fragment,e),u(ae.$$.fragment,e),u(Ye.$$.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),yt=!0)},o(e){_(y.$$.fragment,e),_(M.$$.fragment,e),_(je.$$.fragment,e),_(ke.$$.fragment,e),_(Ce.$$.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),_(Ee.$$.fragment,e),_(Pe.$$.fragment,e),_(qe.$$.fragment,e),_(He.$$.fragment,e),_(Xe.$$.fragment,e),_(Se.$$.fragment,e),_(Ae.$$.fragment,e),_(Qe.$$.fragment,e),_(De.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(Ye.$$.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),yt=!1},d(e){e&&(n(b),n(p),n(l),n(o),n(Fo),n(we),n(Ro),n(Te),n(Vo),n(ye),n(Lo),n(be),n(No),n(K),n(Go),n(Me),n(Eo),n(ve),n(Po),n(qo),n(Be),n(Ho),n(Je),n(Xo),n(xe),n(So),n(Ao),n($e),n(Qo),n(Do),n(Ie),n(Yo),n(Oo),n(Ue),n(Ko),n(Ze),n(et),n(ot),n(x),n(tt),n(nt),n(k),n(rt),n(st),n($),n(at),n(it),n(N),n(dt),n(lt),n(C),n(ct),n(mt),n(G),n(pt),n(gt),n(I),n(ht),n(ft),n(z),n(ut),n(_t),n(U),n(wt),n(Tt),n(Wo)),n(r),w(y,e),w(M,e),w(je,e),w(ke,e),w(Ce,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(Ee,e),w(Pe),w(qe),w(He,e),w(Xe),w(Se),w(Ae,e),w(Qe),w(De),w(se),w(ae),w(Ye,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 Yn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vr extends On{constructor(r){super(),Kn(this,r,fr,gr,Qn,{})}}export{vr as component};
