import{s as _o,o as bo,n as V}from"../chunks/scheduler.bdbef820.js";import{S as To,i as Mo,g as p,s as r,r as h,A as yo,h as m,f as l,c as i,j as J,u,x as v,k as j,y as a,a as g,v as _,d as b,t as T,w as M}from"../chunks/index.33f81d56.js";import{T as Pt}from"../chunks/Tip.34194030.js";import{D as F}from"../chunks/Docstring.662771b3.js";import{C as $t}from"../chunks/CodeBlock.3bad7fc9.js";import{F as vo,M as uo}from"../chunks/Markdown.03194dea.js";import{E as wt}from"../chunks/ExampleCodeBlock.32707fc1.js";import{H as ke,E as wo}from"../chunks/index.e01163b6.js";function $o(k){let e,f="Example:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBDb25maWclMkMlMjBCbGlwTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcENvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEJsaXBNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWclMEElMEElMjMlMjBXZSUyMGNhbiUyMGFsc28lMjBpbml0aWFsaXplJTIwYSUyMEJsaXBDb25maWclMjBmcm9tJTIwYSUyMEJsaXBUZXh0Q29uZmlnJTIwYW5kJTIwYSUyMEJsaXBWaXNpb25Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQkxJUFRleHQlMjBhbmQlMjBCTElQVmlzaW9uJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ190ZXh0JTIwJTNEJTIwQmxpcFRleHRDb25maWcoKSUwQWNvbmZpZ192aXNpb24lMjAlM0QlMjBCbGlwVmlzaW9uQ29uZmlnKCklMEElMEFjb25maWclMjAlM0QlMjBCbGlwQ29uZmlnLmZyb21fdGV4dF92aXNpb25fY29uZmlncyhjb25maWdfdGV4dCUyQyUyMGNvbmZpZ192aXNpb24p",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipConfig, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipPModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel(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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a BlipConfig from a BlipTextConfig and a BlipVisionConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BLIPText and BLIPVision configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = BlipTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = BlipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = BlipConfig.from_text_vision_configs(config_text, config_vision)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Bo(k){let e,f="Example:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBUZXh0Q29uZmlnJTJDJTIwQmxpcFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCbGlwVGV4dENvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwVGV4dENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEJsaXBUZXh0TW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMFNhbGVzZm9yY2UlMkZibGlwLXZxYS1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBCbGlwVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipTextConfig, BlipTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipTextConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipTextModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipTextModel(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(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function xo(k){let e,f="Example:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBWaXNpb25Db25maWclMkMlMjBCbGlwVmlzaW9uTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFZpc2lvbkNvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFZpc2lvbk1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmxpcFZpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipVisionConfig, BlipVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipVisionConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipVisionModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipVisionModel(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(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function ko(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Jo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function jo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBCbGlwTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF0ZXh0X2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X3RleHRfZmVhdHVyZXMoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</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>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Fo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Co(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Io(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function zo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBCbGlwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQXRleHQlMjAlM0QlMjAlMjJBJTIwcGljdHVyZSUyMG9mJTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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;A picture of&quot;</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Uo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Wo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JJbWFnZVRleHRSZXRyaWV2YWwlMEElMEFtb2RlbCUyMCUzRCUyMEJsaXBGb3JJbWFnZVRleHRSZXRyaWV2YWwuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWl0bS1iYXNlLWNvY28lMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaXRtLWJhc2UtY29jbyUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBdGV4dCUyMCUzRCUyMCUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBjYXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKQ==",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForImageTextRetrieval

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForImageTextRetrieval.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</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;an image of a cat&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Zo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function No(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBJTIzJTIwdHJhaW5pbmclMEF0ZXh0JTIwJTNEJTIwJTIySG93JTIwbWFueSUyMGNhdHMlMjBhcmUlMjBpbiUyMHRoZSUyMHBpY3R1cmUlM0YlMjIlMEFsYWJlbCUyMCUzRCUyMCUyMjIlMjIlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBbGFiZWxzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0RsYWJlbCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUwQWlucHV0cyU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMGxhYmVscyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9zcy5iYWNrd2FyZCgpJTBBJTBBJTIzJTIwaW5mZXJlbmNlJTBBdGV4dCUyMCUzRCUyMCUyMkhvdyUyMG1hbnklMjBjYXRzJTIwYXJlJTIwaW4lMjB0aGUlMjBwaWN0dXJlJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFwcmludChwcm9jZXNzb3IuZGVjb2RlKG91dHB1dHMlNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</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><span class="hljs-comment"># training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label = <span class="hljs-string">&quot;2&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = processor(text=label, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(processor.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))
<span class="hljs-number">2</span>`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Vo(k){let e,f,o,s="<code>BlipModel</code>은 향후 버전에서 더 이상 지원되지 않을 예정입니다. 목적에 따라 <code>BlipForConditionalGeneration</code>, <code>BlipForImageTextRetrieval</code> 또는 <code>BlipForQuestionAnswering</code>을 사용하십시오.",y,t,w,Gt,pe,mo="This model is going to be deprecated in future versions. Please use <code>BlipForConditionalGeneration</code>, <code>BlipForQuestionAnswering</code> or <code>BlipForImageTextRetrieval</code> depending on your usecase.",qt,O,io=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Se,Ze,Ne=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,nt,Y,Ye,Dt,Ve,Bt='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipModel">BlipModel</a> forward method, overrides the <code>__call__</code> special method.',Lt,L,oo,q,Je,mt,je,xt,Ae,_e,gt,me,st,ge,E,H,at,se,De,no,Oe,rt=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention is
all you need</a> by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin. argument and <code>is_decoder</code> set to <code>True</code>; an
<code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,ft,K,He,ht,Re,ut=`encoder_hidden_states  (<code>torch.FloatTensor</code>, <em>optional</em>):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (<code>torch.FloatTensor</code>, <em>optional</em>):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,_t,Ke,Et=`<li>1 for tokens that are <strong>not masked</strong>,</li> <li>0 for tokens that are <strong>masked</strong>.
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don’t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.
use_cache (<code>bool</code>, <em>optional</em>):
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).</li>`,ae,be,re,Z,Fe,kt,Te,Jt,jt,Pe,Ot='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel">BlipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Me,Ge,N,ye,ie,z,Ft,Ct,it,lo=`BLIP Model for image captioning. The model consists of a vision encoder and a text decoder. One can optionally pass
<code>input_ids</code> to the model, which serve as a text prompt, to make the text decoder continue the prompt. Otherwise,
the decoder starts generating text from the [BOS] (beginning-of-sequence) token. will start generating the caption
from the text input. If no text input is provided, the decoder will start with the [BOS] token only.`,It,lt,co=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,dt,A,qe=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Xt,C,Le,Kt,le,po='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipForConditionalGeneration">BlipForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',ct,ve,zt,et,U,ee,Qt,W,Vt,eo,de,Ht=`BLIP Model with a vision and text projector, and a classification head on top. The model is used in the context of
image-text retrieval. Given an image and a text, the model returns the probability of the text being relevant to
the image.`,to,we,go=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,St,R,bt=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ce,P,Ut,Wt,Ee,so='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipForImageTextRetrieval">BlipForImageTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',fe,he,Tt,$e,te,Be,tt,G,Xe,Yt,Ie,ao=`BLIP Model for visual question answering. The model consists of a vision encoder, a text encoder as well as a text
decoder. The vision encoder will encode the input image, the text encoder will encode the input question together
with the encoding of the image, and the text decoder will output the answer to the question.`,n,$,ze=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Mt,I,ce=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Qe,D,yt,Zt,xe,ho='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipForQuestionAnswering">BlipForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',At,Rt,c,x,pt;return e=new ke({props:{title:"BlipModel",local:"transformers.BlipModel ][ transformers.BlipModel",headingTag:"h2"}}),w=new F({props:{name:"class transformers.BlipModel",anchor:"transformers.BlipModel",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/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/blip/modeling_blip.py#L642"}}),Ye=new F({props:{name:"forward",anchor:"transformers.BlipModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = 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:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlipModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BlipModel.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"},{anchor:"transformers.BlipModel.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.BlipModel.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.BlipModel.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipModel.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L827",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipOutput</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/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</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>) — Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>torch.FloatTensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_blip.BlipOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),L=new Pt({props:{$$slots:{default:[ko]},$$scope:{ctx:k}}}),q=new wt({props:{anchor:"transformers.BlipModel.forward.example",$$slots:{default:[Jo]},$$scope:{ctx:k}}}),je=new F({props:{name:"get_text_features",anchor:"transformers.BlipModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BlipModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlipModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BlipModel.get_text_features.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L692",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Ae=new wt({props:{anchor:"transformers.BlipModel.get_text_features.example",$$slots:{default:[jo]},$$scope:{ctx:k}}}),me=new F({props:{name:"get_image_features",anchor:"transformers.BlipModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipModel.get_image_features.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipModel.get_image_features.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L730",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ge=new wt({props:{anchor:"transformers.BlipModel.get_image_features.example",$$slots:{default:[Fo]},$$scope:{ctx:k}}}),H=new ke({props:{title:"BlipTextModel",local:"transformers.BlipTextModel ][ transformers.BlipTextModel",headingTag:"h2"}}),De=new F({props:{name:"class transformers.BlipTextModel",anchor:"transformers.BlipTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip_text.py#L571"}}),He=new F({props:{name:"forward",anchor:"transformers.BlipTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = 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:"is_decoder",val:": typing.Optional[bool] = False"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip_text.py#L669"}}),be=new ke({props:{title:"BlipVisionModel",local:"transformers.BlipVisionModel ][ transformers.BlipVisionModel",headingTag:"h2"}}),Fe=new F({props:{name:"class transformers.BlipVisionModel",anchor:"transformers.BlipVisionModel",parameters:[{name:"config",val:": BlipVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L580"}}),Jt=new F({props:{name:"forward",anchor:"transformers.BlipVisionModel.forward",parameters:[{name:"pixel_values",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:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipVisionModel.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.BlipVisionModel.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.BlipVisionModel.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipVisionModel.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L595",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the 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)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new Pt({props:{$$slots:{default:[Co]},$$scope:{ctx:k}}}),ye=new ke({props:{title:"BlipForConditionalGeneration",local:"transformers.BlipForConditionalGeneration ][ transformers.BlipForConditionalGeneration",headingTag:"h2"}}),Ft=new F({props:{name:"class transformers.BlipForConditionalGeneration",anchor:"transformers.BlipForConditionalGeneration",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/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/blip/modeling_blip.py#L924"}}),Le=new F({props:{name:"forward",anchor:"transformers.BlipForConditionalGeneration.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForConditionalGeneration.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlipForConditionalGeneration.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.BlipForConditionalGeneration.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.BlipForConditionalGeneration.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 either be in <code>[0, ..., config.vocab_size]</code> or -100 (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"},{anchor:"transformers.BlipForConditionalGeneration.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForConditionalGeneration.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L956",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipForConditionalGenerationModelOutput</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/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>, <em>optional</em>) — Prediction scores of the language modeling head of the text decoder model.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>) — The image embeddings obtained after applying the Vision Transformer model to the input image.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>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) — 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.blip.modeling_blip.BlipForConditionalGenerationModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new Pt({props:{$$slots:{default:[Io]},$$scope:{ctx:k}}}),et=new wt({props:{anchor:"transformers.BlipForConditionalGeneration.forward.example",$$slots:{default:[zo]},$$scope:{ctx:k}}}),ee=new ke({props:{title:"BlipForImageTextRetrieval",local:"transformers.BlipForImageTextRetrieval ][ transformers.BlipForImageTextRetrieval",headingTag:"h2"}}),Vt=new F({props:{name:"class transformers.BlipForImageTextRetrieval",anchor:"transformers.BlipForImageTextRetrieval",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForImageTextRetrieval.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/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/blip/modeling_blip.py#L1333"}}),Ut=new F({props:{name:"forward",anchor:"transformers.BlipForImageTextRetrieval.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"pixel_values",val:": FloatTensor"},{name:"use_itm_head",val:": typing.Optional[bool] = True"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForImageTextRetrieval.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. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipForImageTextRetrieval.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipForImageTextRetrieval.forward.use_itm_head",description:`<strong>use_itm_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use the image-text matching head.`,name:"use_itm_head"},{anchor:"transformers.BlipForImageTextRetrieval.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlipForImageTextRetrieval.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.BlipForImageTextRetrieval.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.BlipForImageTextRetrieval.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForImageTextRetrieval.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L1379",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</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/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</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) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</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.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</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><code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new Pt({props:{$$slots:{default:[Uo]},$$scope:{ctx:k}}}),$e=new wt({props:{anchor:"transformers.BlipForImageTextRetrieval.forward.example",$$slots:{default:[Wo]},$$scope:{ctx:k}}}),Be=new ke({props:{title:"BlipForQuestionAnswering",local:"transformers.BlipForQuestionAnswering ][ transformers.BlipForQuestionAnswering",headingTag:"h2"}}),Xe=new F({props:{name:"class transformers.BlipForQuestionAnswering",anchor:"transformers.BlipForQuestionAnswering",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/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/blip/modeling_blip.py#L1103"}}),yt=new F({props:{name:"forward",anchor:"transformers.BlipForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"pixel_values",val:": FloatTensor"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForQuestionAnswering.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. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipForQuestionAnswering.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.BlipForQuestionAnswering.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a>`,name:"decoder_input_ids"},{anchor:"transformers.BlipForQuestionAnswering.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on certain token indices. By default, a causal mask will be used, to
make sure the model can only look at previous inputs in order to predict the future.`,name:"decoder_attention_mask"},{anchor:"transformers.BlipForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlipForQuestionAnswering.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.BlipForQuestionAnswering.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.BlipForQuestionAnswering.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 either be in <code>[0, ..., config.vocab_size]</code> or -100 (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"},{anchor:"transformers.BlipForQuestionAnswering.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForQuestionAnswering.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L1136",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</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/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</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) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</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.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</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><code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rt=new Pt({props:{$$slots:{default:[Zo]},$$scope:{ctx:k}}}),x=new wt({props:{anchor:"transformers.BlipForQuestionAnswering.forward.example",$$slots:{default:[No]},$$scope:{ctx:k}}}),{c(){h(e.$$.fragment),f=r(),o=p("p"),o.innerHTML=s,y=r(),t=p("div"),h(w.$$.fragment),Gt=r(),pe=p("p"),pe.innerHTML=mo,qt=r(),O=p("p"),O.innerHTML=io,Se=r(),Ze=p("p"),Ze.innerHTML=Ne,nt=r(),Y=p("div"),h(Ye.$$.fragment),Dt=r(),Ve=p("p"),Ve.innerHTML=Bt,Lt=r(),h(L.$$.fragment),oo=r(),h(q.$$.fragment),Je=r(),mt=p("div"),h(je.$$.fragment),xt=r(),h(Ae.$$.fragment),_e=r(),gt=p("div"),h(me.$$.fragment),st=r(),h(ge.$$.fragment),E=r(),h(H.$$.fragment),at=r(),se=p("div"),h(De.$$.fragment),no=r(),Oe=p("p"),Oe.innerHTML=rt,ft=r(),K=p("div"),h(He.$$.fragment),ht=r(),Re=p("p"),Re.innerHTML=ut,_t=r(),Ke=p("ul"),Ke.innerHTML=Et,ae=r(),h(be.$$.fragment),re=r(),Z=p("div"),h(Fe.$$.fragment),kt=r(),Te=p("div"),h(Jt.$$.fragment),jt=r(),Pe=p("p"),Pe.innerHTML=Ot,Me=r(),h(Ge.$$.fragment),N=r(),h(ye.$$.fragment),ie=r(),z=p("div"),h(Ft.$$.fragment),Ct=r(),it=p("p"),it.innerHTML=lo,It=r(),lt=p("p"),lt.innerHTML=co,dt=r(),A=p("p"),A.innerHTML=qe,Xt=r(),C=p("div"),h(Le.$$.fragment),Kt=r(),le=p("p"),le.innerHTML=po,ct=r(),h(ve.$$.fragment),zt=r(),h(et.$$.fragment),U=r(),h(ee.$$.fragment),Qt=r(),W=p("div"),h(Vt.$$.fragment),eo=r(),de=p("p"),de.textContent=Ht,to=r(),we=p("p"),we.innerHTML=go,St=r(),R=p("p"),R.innerHTML=bt,Ce=r(),P=p("div"),h(Ut.$$.fragment),Wt=r(),Ee=p("p"),Ee.innerHTML=so,fe=r(),h(he.$$.fragment),Tt=r(),h($e.$$.fragment),te=r(),h(Be.$$.fragment),tt=r(),G=p("div"),h(Xe.$$.fragment),Yt=r(),Ie=p("p"),Ie.textContent=ao,n=r(),$=p("p"),$.innerHTML=ze,Mt=r(),I=p("p"),I.innerHTML=ce,Qe=r(),D=p("div"),h(yt.$$.fragment),Zt=r(),xe=p("p"),xe.innerHTML=ho,At=r(),h(Rt.$$.fragment),c=r(),h(x.$$.fragment),this.h()},l(d){u(e.$$.fragment,d),f=i(d),o=m(d,"P",{"data-svelte-h":!0}),v(o)!=="svelte-bcdvay"&&(o.innerHTML=s),y=i(d),t=m(d,"DIV",{class:!0});var B=J(t);u(w.$$.fragment,B),Gt=i(B),pe=m(B,"P",{"data-svelte-h":!0}),v(pe)!=="svelte-1ke3c5j"&&(pe.innerHTML=mo),qt=i(B),O=m(B,"P",{"data-svelte-h":!0}),v(O)!=="svelte-u3dlub"&&(O.innerHTML=io),Se=i(B),Ze=m(B,"P",{"data-svelte-h":!0}),v(Ze)!=="svelte-hswkmf"&&(Ze.innerHTML=Ne),nt=i(B),Y=m(B,"DIV",{class:!0});var ue=J(Y);u(Ye.$$.fragment,ue),Dt=i(ue),Ve=m(ue,"P",{"data-svelte-h":!0}),v(Ve)!=="svelte-1b1xqgb"&&(Ve.innerHTML=Bt),Lt=i(ue),u(L.$$.fragment,ue),oo=i(ue),u(q.$$.fragment,ue),ue.forEach(l),Je=i(B),mt=m(B,"DIV",{class:!0});var ot=J(mt);u(je.$$.fragment,ot),xt=i(ot),u(Ae.$$.fragment,ot),ot.forEach(l),_e=i(B),gt=m(B,"DIV",{class:!0});var vt=J(gt);u(me.$$.fragment,vt),st=i(vt),u(ge.$$.fragment,vt),vt.forEach(l),B.forEach(l),E=i(d),u(H.$$.fragment,d),at=i(d),se=m(d,"DIV",{class:!0});var Ue=J(se);u(De.$$.fragment,Ue),no=i(Ue),Oe=m(Ue,"P",{"data-svelte-h":!0}),v(Oe)!=="svelte-ehxhk2"&&(Oe.innerHTML=rt),ft=i(Ue),K=m(Ue,"DIV",{class:!0});var oe=J(K);u(He.$$.fragment,oe),ht=i(oe),Re=m(oe,"P",{"data-svelte-h":!0}),v(Re)!=="svelte-1misbdl"&&(Re.innerHTML=ut),_t=i(oe),Ke=m(oe,"UL",{"data-svelte-h":!0}),v(Ke)!=="svelte-64obm2"&&(Ke.innerHTML=Et),oe.forEach(l),Ue.forEach(l),ae=i(d),u(be.$$.fragment,d),re=i(d),Z=m(d,"DIV",{class:!0});var We=J(Z);u(Fe.$$.fragment,We),kt=i(We),Te=m(We,"DIV",{class:!0});var ne=J(Te);u(Jt.$$.fragment,ne),jt=i(ne),Pe=m(ne,"P",{"data-svelte-h":!0}),v(Pe)!=="svelte-1b1sxgb"&&(Pe.innerHTML=Ot),Me=i(ne),u(Ge.$$.fragment,ne),ne.forEach(l),We.forEach(l),N=i(d),u(ye.$$.fragment,d),ie=i(d),z=m(d,"DIV",{class:!0});var X=J(z);u(Ft.$$.fragment,X),Ct=i(X),it=m(X,"P",{"data-svelte-h":!0}),v(it)!=="svelte-u9sua2"&&(it.innerHTML=lo),It=i(X),lt=m(X,"P",{"data-svelte-h":!0}),v(lt)!=="svelte-u3dlub"&&(lt.innerHTML=co),dt=i(X),A=m(X,"P",{"data-svelte-h":!0}),v(A)!=="svelte-hswkmf"&&(A.innerHTML=qe),Xt=i(X),C=m(X,"DIV",{class:!0});var Q=J(C);u(Le.$$.fragment,Q),Kt=i(Q),le=m(Q,"P",{"data-svelte-h":!0}),v(le)!=="svelte-fl8rgj"&&(le.innerHTML=po),ct=i(Q),u(ve.$$.fragment,Q),zt=i(Q),u(et.$$.fragment,Q),Q.forEach(l),X.forEach(l),U=i(d),u(ee.$$.fragment,d),Qt=i(d),W=m(d,"DIV",{class:!0});var S=J(W);u(Vt.$$.fragment,S),eo=i(S),de=m(S,"P",{"data-svelte-h":!0}),v(de)!=="svelte-1cwza0e"&&(de.textContent=Ht),to=i(S),we=m(S,"P",{"data-svelte-h":!0}),v(we)!=="svelte-u3dlub"&&(we.innerHTML=go),St=i(S),R=m(S,"P",{"data-svelte-h":!0}),v(R)!=="svelte-hswkmf"&&(R.innerHTML=bt),Ce=i(S),P=m(S,"DIV",{class:!0});var Nt=J(P);u(Ut.$$.fragment,Nt),Wt=i(Nt),Ee=m(Nt,"P",{"data-svelte-h":!0}),v(Ee)!=="svelte-103bq17"&&(Ee.innerHTML=so),fe=i(Nt),u(he.$$.fragment,Nt),Tt=i(Nt),u($e.$$.fragment,Nt),Nt.forEach(l),S.forEach(l),te=i(d),u(Be.$$.fragment,d),tt=i(d),G=m(d,"DIV",{class:!0});var ro=J(G);u(Xe.$$.fragment,ro),Yt=i(ro),Ie=m(ro,"P",{"data-svelte-h":!0}),v(Ie)!=="svelte-tf7otj"&&(Ie.textContent=ao),n=i(ro),$=m(ro,"P",{"data-svelte-h":!0}),v($)!=="svelte-u3dlub"&&($.innerHTML=ze),Mt=i(ro),I=m(ro,"P",{"data-svelte-h":!0}),v(I)!=="svelte-hswkmf"&&(I.innerHTML=ce),Qe=i(ro),D=m(ro,"DIV",{class:!0});var fo=J(D);u(yt.$$.fragment,fo),Zt=i(fo),xe=m(fo,"P",{"data-svelte-h":!0}),v(xe)!=="svelte-1phkm77"&&(xe.innerHTML=ho),At=i(fo),u(Rt.$$.fragment,fo),c=i(fo),u(x.$$.fragment,fo),fo.forEach(l),ro.forEach(l),this.h()},h(){j(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(t,"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(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Te,"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(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(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(P,"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(D,"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")},m(d,B){_(e,d,B),g(d,f,B),g(d,o,B),g(d,y,B),g(d,t,B),_(w,t,null),a(t,Gt),a(t,pe),a(t,qt),a(t,O),a(t,Se),a(t,Ze),a(t,nt),a(t,Y),_(Ye,Y,null),a(Y,Dt),a(Y,Ve),a(Y,Lt),_(L,Y,null),a(Y,oo),_(q,Y,null),a(t,Je),a(t,mt),_(je,mt,null),a(mt,xt),_(Ae,mt,null),a(t,_e),a(t,gt),_(me,gt,null),a(gt,st),_(ge,gt,null),g(d,E,B),_(H,d,B),g(d,at,B),g(d,se,B),_(De,se,null),a(se,no),a(se,Oe),a(se,ft),a(se,K),_(He,K,null),a(K,ht),a(K,Re),a(K,_t),a(K,Ke),g(d,ae,B),_(be,d,B),g(d,re,B),g(d,Z,B),_(Fe,Z,null),a(Z,kt),a(Z,Te),_(Jt,Te,null),a(Te,jt),a(Te,Pe),a(Te,Me),_(Ge,Te,null),g(d,N,B),_(ye,d,B),g(d,ie,B),g(d,z,B),_(Ft,z,null),a(z,Ct),a(z,it),a(z,It),a(z,lt),a(z,dt),a(z,A),a(z,Xt),a(z,C),_(Le,C,null),a(C,Kt),a(C,le),a(C,ct),_(ve,C,null),a(C,zt),_(et,C,null),g(d,U,B),_(ee,d,B),g(d,Qt,B),g(d,W,B),_(Vt,W,null),a(W,eo),a(W,de),a(W,to),a(W,we),a(W,St),a(W,R),a(W,Ce),a(W,P),_(Ut,P,null),a(P,Wt),a(P,Ee),a(P,fe),_(he,P,null),a(P,Tt),_($e,P,null),g(d,te,B),_(Be,d,B),g(d,tt,B),g(d,G,B),_(Xe,G,null),a(G,Yt),a(G,Ie),a(G,n),a(G,$),a(G,Mt),a(G,I),a(G,Qe),a(G,D),_(yt,D,null),a(D,Zt),a(D,xe),a(D,At),_(Rt,D,null),a(D,c),_(x,D,null),pt=!0},p(d,B){const ue={};B&2&&(ue.$$scope={dirty:B,ctx:d}),L.$set(ue);const ot={};B&2&&(ot.$$scope={dirty:B,ctx:d}),q.$set(ot);const vt={};B&2&&(vt.$$scope={dirty:B,ctx:d}),Ae.$set(vt);const Ue={};B&2&&(Ue.$$scope={dirty:B,ctx:d}),ge.$set(Ue);const oe={};B&2&&(oe.$$scope={dirty:B,ctx:d}),Ge.$set(oe);const We={};B&2&&(We.$$scope={dirty:B,ctx:d}),ve.$set(We);const ne={};B&2&&(ne.$$scope={dirty:B,ctx:d}),et.$set(ne);const X={};B&2&&(X.$$scope={dirty:B,ctx:d}),he.$set(X);const Q={};B&2&&(Q.$$scope={dirty:B,ctx:d}),$e.$set(Q);const S={};B&2&&(S.$$scope={dirty:B,ctx:d}),Rt.$set(S);const Nt={};B&2&&(Nt.$$scope={dirty:B,ctx:d}),x.$set(Nt)},i(d){pt||(b(e.$$.fragment,d),b(w.$$.fragment,d),b(Ye.$$.fragment,d),b(L.$$.fragment,d),b(q.$$.fragment,d),b(je.$$.fragment,d),b(Ae.$$.fragment,d),b(me.$$.fragment,d),b(ge.$$.fragment,d),b(H.$$.fragment,d),b(De.$$.fragment,d),b(He.$$.fragment,d),b(be.$$.fragment,d),b(Fe.$$.fragment,d),b(Jt.$$.fragment,d),b(Ge.$$.fragment,d),b(ye.$$.fragment,d),b(Ft.$$.fragment,d),b(Le.$$.fragment,d),b(ve.$$.fragment,d),b(et.$$.fragment,d),b(ee.$$.fragment,d),b(Vt.$$.fragment,d),b(Ut.$$.fragment,d),b(he.$$.fragment,d),b($e.$$.fragment,d),b(Be.$$.fragment,d),b(Xe.$$.fragment,d),b(yt.$$.fragment,d),b(Rt.$$.fragment,d),b(x.$$.fragment,d),pt=!0)},o(d){T(e.$$.fragment,d),T(w.$$.fragment,d),T(Ye.$$.fragment,d),T(L.$$.fragment,d),T(q.$$.fragment,d),T(je.$$.fragment,d),T(Ae.$$.fragment,d),T(me.$$.fragment,d),T(ge.$$.fragment,d),T(H.$$.fragment,d),T(De.$$.fragment,d),T(He.$$.fragment,d),T(be.$$.fragment,d),T(Fe.$$.fragment,d),T(Jt.$$.fragment,d),T(Ge.$$.fragment,d),T(ye.$$.fragment,d),T(Ft.$$.fragment,d),T(Le.$$.fragment,d),T(ve.$$.fragment,d),T(et.$$.fragment,d),T(ee.$$.fragment,d),T(Vt.$$.fragment,d),T(Ut.$$.fragment,d),T(he.$$.fragment,d),T($e.$$.fragment,d),T(Be.$$.fragment,d),T(Xe.$$.fragment,d),T(yt.$$.fragment,d),T(Rt.$$.fragment,d),T(x.$$.fragment,d),pt=!1},d(d){d&&(l(f),l(o),l(y),l(t),l(E),l(at),l(se),l(ae),l(re),l(Z),l(N),l(ie),l(z),l(U),l(Qt),l(W),l(te),l(tt),l(G)),M(e,d),M(w),M(Ye),M(L),M(q),M(je),M(Ae),M(me),M(ge),M(H,d),M(De),M(He),M(be,d),M(Fe),M(Jt),M(Ge),M(ye,d),M(Ft),M(Le),M(ve),M(et),M(ee,d),M(Vt),M(Ut),M(he),M($e),M(Be,d),M(Xe),M(yt),M(Rt),M(x)}}}function Ho(k){let e,f;return e=new uo({props:{$$slots:{default:[Vo]},$$scope:{ctx:k}}}),{c(){h(e.$$.fragment)},l(o){u(e.$$.fragment,o)},m(o,s){_(e,o,s),f=!0},p(o,s){const y={};s&2&&(y.$$scope={dirty:s,ctx:o}),e.$set(y)},i(o){f||(b(e.$$.fragment,o),f=!0)},o(o){T(e.$$.fragment,o),f=!1},d(o){M(e,o)}}}function Ro(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Po(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKCUwQSUyMCUyMCUyMCUyMHRleHQlM0QlNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUwQSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUyMCUyMCUyMyUyMHRoaXMlMjBpcyUyMHRoZSUyMGltYWdlLXRleHQlMjBzaW1pbGFyaXR5JTIwc2NvcmUlMEFwcm9icyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgobG9naXRzX3Blcl9pbWFnZSUyQyUyMGF4aXMlM0QxKSUyMCUyMCUyMyUyMHdlJTIwY2FuJTIwdGFrZSUyMHRoZSUyMHNvZnRtYXglMjB0byUyMGdldCUyMHRoZSUyMGxhYmVsJTIwcHJvYmFiaWxpdGllcw==",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = tf.nn.softmax(logits_per_image, axis=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Go(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function qo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBURkJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZCbGlwTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0QlNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Lo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Eo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Xo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Qo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function So(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Yo(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmxpcEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEF0ZXh0JTIwJTNEJTIwJTIyQSUyMHBpY3R1cmUlMjBvZiUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHRleHQlM0R0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMp",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</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;A picture of&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Ao(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Do(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvckltYWdlVGV4dFJldHJpZXZhbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZCbGlwRm9ySW1hZ2VUZXh0UmV0cmlldmFsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pdG0tYmFzZS1jb2NvJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWl0bS1iYXNlLWNvY28lMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQXRleHQlMjAlM0QlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwY2F0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForImageTextRetrieval

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForImageTextRetrieval.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</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;an image of a cat&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function Oo(k){let e,f=`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(){e=p("p"),e.innerHTML=f},l(o){e=m(o,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=f)},m(o,s){g(o,e,s)},p:V,d(o){o&&l(e)}}}function Ko(k){let e,f="Examples:",o,s,y;return s=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQSUyMyUyMHRyYWluaW5nJTBBdGV4dCUyMCUzRCUyMCUyMkhvdyUyMG1hbnklMjBjYXRzJTIwYXJlJTIwaW4lMjB0aGUlMjBwaWN0dXJlJTNGJTIyJTBBbGFiZWwlMjAlM0QlMjAlMjIyJTIyJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxhYmVscyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEbGFiZWwlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKS5pbnB1dF9pZHMlMEElMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjBsYWJlbHMlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQSUwQSUyMyUyMGluZmVyZW5jZSUwQXRleHQlMjAlM0QlMjAlMjJIb3clMjBtYW55JTIwY2F0cyUyMGFyZSUyMGluJTIwdGhlJTIwcGljdHVyZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHRleHQlM0R0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBcHJpbnQocHJvY2Vzc29yLmRlY29kZShvdXRwdXRzJTVCMCU1RCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSk=",highlighted:`<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-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</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><span class="hljs-comment"># training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label = <span class="hljs-string">&quot;2&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = processor(text=label, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(processor.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))
<span class="hljs-number">2</span>`,wrap:!1}}),{c(){e=p("p"),e.textContent=f,o=r(),h(s.$$.fragment)},l(t){e=m(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=f),o=i(t),u(s.$$.fragment,t)},m(t,w){g(t,e,w),g(t,o,w),_(s,t,w),y=!0},p:V,i(t){y||(b(s.$$.fragment,t),y=!0)},o(t){T(s.$$.fragment,t),y=!1},d(t){t&&(l(e),l(o)),M(s,t)}}}function en(k){let e,f,o,s,y,t,w,Gt,pe,mo='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',qt,O,io,Se,Ze,Ne,nt,Y,Ye,Dt='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',Ve,Bt,Lt,L,oo,q,Je,mt,je,xt='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',Ae,_e,gt,me,st,ge,E,H,at,se,De,no=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention is
all you need</a> by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin. argument and <code>is_decoder</code> set to <code>True</code>; an
<code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,Oe,rt,ft,K,He,ht='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipTextModel">TFBlipTextModel</a> forward method, overrides the <code>__call__</code> special method.',Re,ut,_t,Ke,Et,ae,be,re,Z,Fe,kt,Te,Jt='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipVisionModel">TFBlipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',jt,Pe,Ot,Me,Ge,N,ye,ie,z,Ft=`BLIP Model for image captioning. The model consists of a vision encoder and a text decoder. One can optionally pass
<code>input_ids</code> to the model, which serve as a text prompt, to make the text decoder continue the prompt. Otherwise,
the decoder starts generating text from the [BOS] (beginning-of-sequence) token. will start generating the caption
from the text input. If no text input is provided, the decoder will start with the [BOS] token only.`,Ct,it,lo=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,It,lt,co=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,dt,A,qe,Xt,C,Le='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipForConditionalGeneration">TFBlipForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Kt,le,po,ct,ve,zt,et,U,ee,Qt,W,Vt=`BLIP Model with a vision and text projector, and a classification head on top. The model is used in the context of
image-text retrieval. Given an image and a text, the model returns the probability of the text being relevant to
the image.`,eo,de,Ht=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,to,we,go=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,St,R,bt,Ce,P,Ut='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipForImageTextRetrieval">TFBlipForImageTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',Wt,Ee,so,fe,he,Tt,$e,te,Be,tt,G,Xe=`BLIP Model for visual question answering. The model consists of a vision encoder, a text encoder as well as a text
decoder. The vision encoder will encode the input image, the text encoder will encode the input question together
with the encoding of the image, and the text decoder will output the answer to the question.`,Yt,Ie,ao=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,n,$,ze=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Mt,I,ce,Qe,D,yt='The <a href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipForQuestionAnswering">TFBlipForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Zt,xe,ho,At,Rt;return e=new ke({props:{title:"TFBlipModel",local:"transformers.TFBlipModel ][ transformers.TFBlipModel",headingTag:"h2"}}),s=new F({props:{name:"class transformers.TFBlipModel",anchor:"transformers.TFBlipModel",parameters:[{name:"config",val:": BlipConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L930"}}),w=new F({props:{name:"call",anchor:"transformers.TFBlipModel.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"return_loss",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFBlipModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFBlipModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipModel.call.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"},{anchor:"transformers.TFBlipModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L948",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.blip.configuration_blip.BlipConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>tf.Tensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>tf.Tensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>tf.Tensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>image_embeds(<code>tf.Tensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),O=new Pt({props:{$$slots:{default:[Ro]},$$scope:{ctx:k}}}),Se=new wt({props:{anchor:"transformers.TFBlipModel.call.example",$$slots:{default:[Po]},$$scope:{ctx:k}}}),nt=new F({props:{name:"get_text_features",anchor:"transformers.TFBlipModel.get_text_features",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFBlipModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFBlipModel.get_text_features.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.TFBlipModel.get_text_features.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.TFBlipModel.get_text_features.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1000",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipTextModel"
>TFBlipTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Bt=new Pt({props:{$$slots:{default:[Go]},$$scope:{ctx:k}}}),L=new wt({props:{anchor:"transformers.TFBlipModel.get_text_features.example",$$slots:{default:[qo]},$$scope:{ctx:k}}}),Je=new F({props:{name:"get_image_features",anchor:"transformers.TFBlipModel.get_image_features",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipModel.get_image_features.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.TFBlipModel.get_image_features.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.TFBlipModel.get_image_features.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1038",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.TFBlipVisionModel"
>TFBlipVisionModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>image_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),_e=new Pt({props:{$$slots:{default:[Lo]},$$scope:{ctx:k}}}),me=new wt({props:{anchor:"transformers.TFBlipModel.get_image_features.example",$$slots:{default:[Eo]},$$scope:{ctx:k}}}),ge=new ke({props:{title:"TFBlipTextModel",local:"transformers.TFBlipTextModel ][ transformers.TFBlipTextModel",headingTag:"h2"}}),at=new F({props:{name:"class transformers.TFBlipTextModel",anchor:"transformers.TFBlipTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"},{name:"name",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip_text.py#L729"}}),ft=new F({props:{name:"call",anchor:"transformers.TFBlipTextModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"encoder_embeds",val:": tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": tf.Tensor | None = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"return_dict",val:": bool | None = None"},{name:"is_decoder",val:": bool = False"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFBlipTextModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipTextModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFBlipTextModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFBlipTextModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipTextModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipTextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFBlipTextModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFBlipTextModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFBlipTextModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFBlipTextModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip_text.py#L817"}}),ut=new Pt({props:{$$slots:{default:[Xo]},$$scope:{ctx:k}}}),Ke=new ke({props:{title:"TFBlipVisionModel",local:"transformers.TFBlipVisionModel ][ transformers.TFBlipVisionModel",headingTag:"h2"}}),be=new F({props:{name:"class transformers.TFBlipVisionModel",anchor:"transformers.TFBlipVisionModel",parameters:[{name:"config",val:": BlipVisionConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L696"}}),Fe=new F({props:{name:"call",anchor:"transformers.TFBlipVisionModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipVisionModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipVisionModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipVisionModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipVisionModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L720",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Pe=new Pt({props:{$$slots:{default:[Qo]},$$scope:{ctx:k}}}),Me=new ke({props:{title:"TFBlipForConditionalGeneration",local:"transformers.TFBlipForConditionalGeneration ][ transformers.TFBlipForConditionalGeneration",headingTag:"h2"}}),ye=new F({props:{name:"class transformers.TFBlipForConditionalGeneration",anchor:"transformers.TFBlipForConditionalGeneration",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1084"}}),qe=new F({props:{name:"call",anchor:"transformers.TFBlipForConditionalGeneration.call",parameters:[{name:"pixel_values",val:": tf.Tensor"},{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForConditionalGeneration.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1111",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipForConditionalGenerationModelOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.blip.configuration_blip.BlipConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code>, <em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>, <em>optional</em>) — Prediction scores of the language modeling head of the text decoder model.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>) — The image embeddings obtained after applying the Vision Transformer model to the input image.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed) — Tuple of <code>tf.Tensor</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.blip.modeling_tf_blip.TFBlipForConditionalGenerationModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),le=new Pt({props:{$$slots:{default:[So]},$$scope:{ctx:k}}}),ct=new wt({props:{anchor:"transformers.TFBlipForConditionalGeneration.call.example",$$slots:{default:[Yo]},$$scope:{ctx:k}}}),zt=new ke({props:{title:"TFBlipForImageTextRetrieval",local:"transformers.TFBlipForImageTextRetrieval ][ transformers.TFBlipForImageTextRetrieval",headingTag:"h2"}}),ee=new F({props:{name:"class transformers.TFBlipForImageTextRetrieval",anchor:"transformers.TFBlipForImageTextRetrieval",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForImageTextRetrieval.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1530"}}),bt=new F({props:{name:"call",anchor:"transformers.TFBlipForImageTextRetrieval.call",parameters:[{name:"input_ids",val:": tf.Tensor"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"use_itm_head",val:": Optional[bool] = True"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForImageTextRetrieval.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForImageTextRetrieval.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipForImageTextRetrieval.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipForImageTextRetrieval.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1582",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipImageTextMatchingModelOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>itm_score</strong> (<code>tf.Tensor</code>) — The image-text similarity scores.</p>
</li>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</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.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</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>vision_pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>, <em>optional</em>) — Last layer hidden-state of the vision of the vision-only branch of the model.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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>
<li>
<p><strong>question_embeds</strong> (<code>tf.Tensor</code>) — The question embeddings obtained by the text projection layer.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipImageTextMatchingModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Ee=new Pt({props:{$$slots:{default:[Ao]},$$scope:{ctx:k}}}),fe=new wt({props:{anchor:"transformers.TFBlipForImageTextRetrieval.call.example",$$slots:{default:[Do]},$$scope:{ctx:k}}}),Tt=new ke({props:{title:"TFBlipForQuestionAnswering",local:"transformers.TFBlipForQuestionAnswering ][ transformers.TFBlipForQuestionAnswering",headingTag:"h2"}}),Be=new F({props:{name:"class transformers.TFBlipForQuestionAnswering",anchor:"transformers.TFBlipForQuestionAnswering",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</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/ko/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1275"}}),ce=new F({props:{name:"call",anchor:"transformers.TFBlipForQuestionAnswering.call",parameters:[{name:"input_ids",val:": tf.Tensor"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForQuestionAnswering.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFBlipForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFBlipForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1326",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipTextVisionModelOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</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.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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.blip.modeling_tf_blip.TFBlipTextVisionModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),xe=new Pt({props:{$$slots:{default:[Oo]},$$scope:{ctx:k}}}),At=new wt({props:{anchor:"transformers.TFBlipForQuestionAnswering.call.example",$$slots:{default:[Ko]},$$scope:{ctx:k}}}),{c(){h(e.$$.fragment),f=r(),o=p("div"),h(s.$$.fragment),y=r(),t=p("div"),h(w.$$.fragment),Gt=r(),pe=p("p"),pe.innerHTML=mo,qt=r(),h(O.$$.fragment),io=r(),h(Se.$$.fragment),Ze=r(),Ne=p("div"),h(nt.$$.fragment),Y=r(),Ye=p("p"),Ye.innerHTML=Dt,Ve=r(),h(Bt.$$.fragment),Lt=r(),h(L.$$.fragment),oo=r(),q=p("div"),h(Je.$$.fragment),mt=r(),je=p("p"),je.innerHTML=xt,Ae=r(),h(_e.$$.fragment),gt=r(),h(me.$$.fragment),st=r(),h(ge.$$.fragment),E=r(),H=p("div"),h(at.$$.fragment),se=r(),De=p("p"),De.innerHTML=no,Oe=r(),rt=p("div"),h(ft.$$.fragment),K=r(),He=p("p"),He.innerHTML=ht,Re=r(),h(ut.$$.fragment),_t=r(),h(Ke.$$.fragment),Et=r(),ae=p("div"),h(be.$$.fragment),re=r(),Z=p("div"),h(Fe.$$.fragment),kt=r(),Te=p("p"),Te.innerHTML=Jt,jt=r(),h(Pe.$$.fragment),Ot=r(),h(Me.$$.fragment),Ge=r(),N=p("div"),h(ye.$$.fragment),ie=r(),z=p("p"),z.innerHTML=Ft,Ct=r(),it=p("p"),it.innerHTML=lo,It=r(),lt=p("p"),lt.innerHTML=co,dt=r(),A=p("div"),h(qe.$$.fragment),Xt=r(),C=p("p"),C.innerHTML=Le,Kt=r(),h(le.$$.fragment),po=r(),h(ct.$$.fragment),ve=r(),h(zt.$$.fragment),et=r(),U=p("div"),h(ee.$$.fragment),Qt=r(),W=p("p"),W.textContent=Vt,eo=r(),de=p("p"),de.innerHTML=Ht,to=r(),we=p("p"),we.innerHTML=go,St=r(),R=p("div"),h(bt.$$.fragment),Ce=r(),P=p("p"),P.innerHTML=Ut,Wt=r(),h(Ee.$$.fragment),so=r(),h(fe.$$.fragment),he=r(),h(Tt.$$.fragment),$e=r(),te=p("div"),h(Be.$$.fragment),tt=r(),G=p("p"),G.textContent=Xe,Yt=r(),Ie=p("p"),Ie.innerHTML=ao,n=r(),$=p("p"),$.innerHTML=ze,Mt=r(),I=p("div"),h(ce.$$.fragment),Qe=r(),D=p("p"),D.innerHTML=yt,Zt=r(),h(xe.$$.fragment),ho=r(),h(At.$$.fragment),this.h()},l(c){u(e.$$.fragment,c),f=i(c),o=m(c,"DIV",{class:!0});var x=J(o);u(s.$$.fragment,x),y=i(x),t=m(x,"DIV",{class:!0});var pt=J(t);u(w.$$.fragment,pt),Gt=i(pt),pe=m(pt,"P",{"data-svelte-h":!0}),v(pe)!=="svelte-yvi5er"&&(pe.innerHTML=mo),qt=i(pt),u(O.$$.fragment,pt),io=i(pt),u(Se.$$.fragment,pt),pt.forEach(l),Ze=i(x),Ne=m(x,"DIV",{class:!0});var d=J(Ne);u(nt.$$.fragment,d),Y=i(d),Ye=m(d,"P",{"data-svelte-h":!0}),v(Ye)!=="svelte-yvi5er"&&(Ye.innerHTML=Dt),Ve=i(d),u(Bt.$$.fragment,d),Lt=i(d),u(L.$$.fragment,d),d.forEach(l),oo=i(x),q=m(x,"DIV",{class:!0});var B=J(q);u(Je.$$.fragment,B),mt=i(B),je=m(B,"P",{"data-svelte-h":!0}),v(je)!=="svelte-yvi5er"&&(je.innerHTML=xt),Ae=i(B),u(_e.$$.fragment,B),gt=i(B),u(me.$$.fragment,B),B.forEach(l),x.forEach(l),st=i(c),u(ge.$$.fragment,c),E=i(c),H=m(c,"DIV",{class:!0});var ue=J(H);u(at.$$.fragment,ue),se=i(ue),De=m(ue,"P",{"data-svelte-h":!0}),v(De)!=="svelte-ehxhk2"&&(De.innerHTML=no),Oe=i(ue),rt=m(ue,"DIV",{class:!0});var ot=J(rt);u(ft.$$.fragment,ot),K=i(ot),He=m(ot,"P",{"data-svelte-h":!0}),v(He)!=="svelte-12b84gz"&&(He.innerHTML=ht),Re=i(ot),u(ut.$$.fragment,ot),ot.forEach(l),ue.forEach(l),_t=i(c),u(Ke.$$.fragment,c),Et=i(c),ae=m(c,"DIV",{class:!0});var vt=J(ae);u(be.$$.fragment,vt),re=i(vt),Z=m(vt,"DIV",{class:!0});var Ue=J(Z);u(Fe.$$.fragment,Ue),kt=i(Ue),Te=m(Ue,"P",{"data-svelte-h":!0}),v(Te)!=="svelte-1lr5vbf"&&(Te.innerHTML=Jt),jt=i(Ue),u(Pe.$$.fragment,Ue),Ue.forEach(l),vt.forEach(l),Ot=i(c),u(Me.$$.fragment,c),Ge=i(c),N=m(c,"DIV",{class:!0});var oe=J(N);u(ye.$$.fragment,oe),ie=i(oe),z=m(oe,"P",{"data-svelte-h":!0}),v(z)!=="svelte-u9sua2"&&(z.innerHTML=Ft),Ct=i(oe),it=m(oe,"P",{"data-svelte-h":!0}),v(it)!=="svelte-3ge3jn"&&(it.innerHTML=lo),It=i(oe),lt=m(oe,"P",{"data-svelte-h":!0}),v(lt)!=="svelte-1be7e3c"&&(lt.innerHTML=co),dt=i(oe),A=m(oe,"DIV",{class:!0});var We=J(A);u(qe.$$.fragment,We),Xt=i(We),C=m(We,"P",{"data-svelte-h":!0}),v(C)!=="svelte-19m6pr7"&&(C.innerHTML=Le),Kt=i(We),u(le.$$.fragment,We),po=i(We),u(ct.$$.fragment,We),We.forEach(l),oe.forEach(l),ve=i(c),u(zt.$$.fragment,c),et=i(c),U=m(c,"DIV",{class:!0});var ne=J(U);u(ee.$$.fragment,ne),Qt=i(ne),W=m(ne,"P",{"data-svelte-h":!0}),v(W)!=="svelte-1cwza0e"&&(W.textContent=Vt),eo=i(ne),de=m(ne,"P",{"data-svelte-h":!0}),v(de)!=="svelte-3ge3jn"&&(de.innerHTML=Ht),to=i(ne),we=m(ne,"P",{"data-svelte-h":!0}),v(we)!=="svelte-1be7e3c"&&(we.innerHTML=go),St=i(ne),R=m(ne,"DIV",{class:!0});var X=J(R);u(bt.$$.fragment,X),Ce=i(X),P=m(X,"P",{"data-svelte-h":!0}),v(P)!=="svelte-18kc0yb"&&(P.innerHTML=Ut),Wt=i(X),u(Ee.$$.fragment,X),so=i(X),u(fe.$$.fragment,X),X.forEach(l),ne.forEach(l),he=i(c),u(Tt.$$.fragment,c),$e=i(c),te=m(c,"DIV",{class:!0});var Q=J(te);u(Be.$$.fragment,Q),tt=i(Q),G=m(Q,"P",{"data-svelte-h":!0}),v(G)!=="svelte-tf7otj"&&(G.textContent=Xe),Yt=i(Q),Ie=m(Q,"P",{"data-svelte-h":!0}),v(Ie)!=="svelte-3ge3jn"&&(Ie.innerHTML=ao),n=i(Q),$=m(Q,"P",{"data-svelte-h":!0}),v($)!=="svelte-1be7e3c"&&($.innerHTML=ze),Mt=i(Q),I=m(Q,"DIV",{class:!0});var S=J(I);u(ce.$$.fragment,S),Qe=i(S),D=m(S,"P",{"data-svelte-h":!0}),v(D)!=="svelte-1yy6udb"&&(D.innerHTML=yt),Zt=i(S),u(xe.$$.fragment,S),ho=i(S),u(At.$$.fragment,S),S.forEach(l),Q.forEach(l),this.h()},h(){j(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(H,"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(ae,"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(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(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(U,"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(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(c,x){_(e,c,x),g(c,f,x),g(c,o,x),_(s,o,null),a(o,y),a(o,t),_(w,t,null),a(t,Gt),a(t,pe),a(t,qt),_(O,t,null),a(t,io),_(Se,t,null),a(o,Ze),a(o,Ne),_(nt,Ne,null),a(Ne,Y),a(Ne,Ye),a(Ne,Ve),_(Bt,Ne,null),a(Ne,Lt),_(L,Ne,null),a(o,oo),a(o,q),_(Je,q,null),a(q,mt),a(q,je),a(q,Ae),_(_e,q,null),a(q,gt),_(me,q,null),g(c,st,x),_(ge,c,x),g(c,E,x),g(c,H,x),_(at,H,null),a(H,se),a(H,De),a(H,Oe),a(H,rt),_(ft,rt,null),a(rt,K),a(rt,He),a(rt,Re),_(ut,rt,null),g(c,_t,x),_(Ke,c,x),g(c,Et,x),g(c,ae,x),_(be,ae,null),a(ae,re),a(ae,Z),_(Fe,Z,null),a(Z,kt),a(Z,Te),a(Z,jt),_(Pe,Z,null),g(c,Ot,x),_(Me,c,x),g(c,Ge,x),g(c,N,x),_(ye,N,null),a(N,ie),a(N,z),a(N,Ct),a(N,it),a(N,It),a(N,lt),a(N,dt),a(N,A),_(qe,A,null),a(A,Xt),a(A,C),a(A,Kt),_(le,A,null),a(A,po),_(ct,A,null),g(c,ve,x),_(zt,c,x),g(c,et,x),g(c,U,x),_(ee,U,null),a(U,Qt),a(U,W),a(U,eo),a(U,de),a(U,to),a(U,we),a(U,St),a(U,R),_(bt,R,null),a(R,Ce),a(R,P),a(R,Wt),_(Ee,R,null),a(R,so),_(fe,R,null),g(c,he,x),_(Tt,c,x),g(c,$e,x),g(c,te,x),_(Be,te,null),a(te,tt),a(te,G),a(te,Yt),a(te,Ie),a(te,n),a(te,$),a(te,Mt),a(te,I),_(ce,I,null),a(I,Qe),a(I,D),a(I,Zt),_(xe,I,null),a(I,ho),_(At,I,null),Rt=!0},p(c,x){const pt={};x&2&&(pt.$$scope={dirty:x,ctx:c}),O.$set(pt);const d={};x&2&&(d.$$scope={dirty:x,ctx:c}),Se.$set(d);const B={};x&2&&(B.$$scope={dirty:x,ctx:c}),Bt.$set(B);const ue={};x&2&&(ue.$$scope={dirty:x,ctx:c}),L.$set(ue);const ot={};x&2&&(ot.$$scope={dirty:x,ctx:c}),_e.$set(ot);const vt={};x&2&&(vt.$$scope={dirty:x,ctx:c}),me.$set(vt);const Ue={};x&2&&(Ue.$$scope={dirty:x,ctx:c}),ut.$set(Ue);const oe={};x&2&&(oe.$$scope={dirty:x,ctx:c}),Pe.$set(oe);const We={};x&2&&(We.$$scope={dirty:x,ctx:c}),le.$set(We);const ne={};x&2&&(ne.$$scope={dirty:x,ctx:c}),ct.$set(ne);const X={};x&2&&(X.$$scope={dirty:x,ctx:c}),Ee.$set(X);const Q={};x&2&&(Q.$$scope={dirty:x,ctx:c}),fe.$set(Q);const S={};x&2&&(S.$$scope={dirty:x,ctx:c}),xe.$set(S);const Nt={};x&2&&(Nt.$$scope={dirty:x,ctx:c}),At.$set(Nt)},i(c){Rt||(b(e.$$.fragment,c),b(s.$$.fragment,c),b(w.$$.fragment,c),b(O.$$.fragment,c),b(Se.$$.fragment,c),b(nt.$$.fragment,c),b(Bt.$$.fragment,c),b(L.$$.fragment,c),b(Je.$$.fragment,c),b(_e.$$.fragment,c),b(me.$$.fragment,c),b(ge.$$.fragment,c),b(at.$$.fragment,c),b(ft.$$.fragment,c),b(ut.$$.fragment,c),b(Ke.$$.fragment,c),b(be.$$.fragment,c),b(Fe.$$.fragment,c),b(Pe.$$.fragment,c),b(Me.$$.fragment,c),b(ye.$$.fragment,c),b(qe.$$.fragment,c),b(le.$$.fragment,c),b(ct.$$.fragment,c),b(zt.$$.fragment,c),b(ee.$$.fragment,c),b(bt.$$.fragment,c),b(Ee.$$.fragment,c),b(fe.$$.fragment,c),b(Tt.$$.fragment,c),b(Be.$$.fragment,c),b(ce.$$.fragment,c),b(xe.$$.fragment,c),b(At.$$.fragment,c),Rt=!0)},o(c){T(e.$$.fragment,c),T(s.$$.fragment,c),T(w.$$.fragment,c),T(O.$$.fragment,c),T(Se.$$.fragment,c),T(nt.$$.fragment,c),T(Bt.$$.fragment,c),T(L.$$.fragment,c),T(Je.$$.fragment,c),T(_e.$$.fragment,c),T(me.$$.fragment,c),T(ge.$$.fragment,c),T(at.$$.fragment,c),T(ft.$$.fragment,c),T(ut.$$.fragment,c),T(Ke.$$.fragment,c),T(be.$$.fragment,c),T(Fe.$$.fragment,c),T(Pe.$$.fragment,c),T(Me.$$.fragment,c),T(ye.$$.fragment,c),T(qe.$$.fragment,c),T(le.$$.fragment,c),T(ct.$$.fragment,c),T(zt.$$.fragment,c),T(ee.$$.fragment,c),T(bt.$$.fragment,c),T(Ee.$$.fragment,c),T(fe.$$.fragment,c),T(Tt.$$.fragment,c),T(Be.$$.fragment,c),T(ce.$$.fragment,c),T(xe.$$.fragment,c),T(At.$$.fragment,c),Rt=!1},d(c){c&&(l(f),l(o),l(st),l(E),l(H),l(_t),l(Et),l(ae),l(Ot),l(Ge),l(N),l(ve),l(et),l(U),l(he),l($e),l(te)),M(e,c),M(s),M(w),M(O),M(Se),M(nt),M(Bt),M(L),M(Je),M(_e),M(me),M(ge,c),M(at),M(ft),M(ut),M(Ke,c),M(be),M(Fe),M(Pe),M(Me,c),M(ye),M(qe),M(le),M(ct),M(zt,c),M(ee),M(bt),M(Ee),M(fe),M(Tt,c),M(Be),M(ce),M(xe),M(At)}}}function tn(k){let e,f;return e=new uo({props:{$$slots:{default:[en]},$$scope:{ctx:k}}}),{c(){h(e.$$.fragment)},l(o){u(e.$$.fragment,o)},m(o,s){_(e,o,s),f=!0},p(o,s){const y={};s&2&&(y.$$scope={dirty:s,ctx:o}),e.$set(y)},i(o){f||(b(e.$$.fragment,o),f=!0)},o(o){T(e.$$.fragment,o),f=!1},d(o){M(e,o)}}}function on(k){let e,f,o,s,y,t,w,Gt,pe,mo='BLIP 모델은 Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi의 <a href="https://arxiv.org/abs/2201.12086" rel="nofollow">BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation</a> 논문에서 제안되었습니다.',qt,O,io="BLIP은 여러 멀티모달 작업을 수행할 수 있는 모델입니다:",Se,Ze,Ne="<li>시각 질문 응답 (Visual Question Answering, VQA)</li> <li>이미지-텍스트 검색 (이미지-텍스트 매칭)</li> <li>이미지 캡셔닝</li>",nt,Y,Ye="논문의 초록은 다음과 같습니다:",Dt,Ve,Bt="<em>비전-언어 사전 학습(Vision-Language Pre-training, VLP)은 다양한 비전-언어 작업의 성능을 크게 향상시켰습니다. 하지만, 대부분의 기존 사전 학습 모델들은 이해 기반 작업이나 생성 기반 작업 중 하나에서만 뛰어난 성능을 발휘합니다. 또한 성능 향상은 주로 웹에서 수집한 노이즈가 많은 이미지-텍스트 쌍으로 데이터셋의 규모를 키우는 방식으로 이루어졌는데, 이는 최적의 지도 학습 방식이라고 보기 어렵습니다. 본 논문에서는 BLIP이라는 새로운 VLP 프레임워크를 제안합니다. 이 프레임워크는 비전-언어 이해 및 생성 작업 모두에 유연하게 적용될 수 있습니다. BLIP는 캡셔너가 합성 캡션을 생성하고 필터가 노이즈 캡션을 제거하는 부트스트래핑 방법을 통해 웹 데이터의 노이즈를 효과적으로 활용합니다. 우리는 이미지-텍스트 검색(Recall@1에서 +2.7%), 이미지 캡셔닝(CIDEr에서 +2.8%), 그리고 VQA(VQA 점수에서 +1.6%)와 같은 다양한 비전-언어 작업에서 최신 성과를 달성했습니다. 또한 BLIP은 제로샷 방식으로 비디오-언어 작업에 직접 전이될 때도 강력한 일반화 능력을 보여줍니다. 이 논문의 코드, 모델, 데이터셋은 공개되었습니다.</em>",Lt,L,oo='<img src="https://cdn-uploads.huggingface.co/production/uploads/1670928184033-62441d1d9fdefb55a0b7d12c.gif" alt="BLIP.gif"/>',q,Je,mt=`이 모델은 <a href="https://huggingface.co/ybelkada" rel="nofollow">ybelkada</a>가 기여했습니다.
원본 코드는 <a href="https://github.com/salesforce/BLIP" rel="nofollow">여기</a>에서 찾을 수 있습니다.`,je,xt,Ae,_e,gt='<li><a href="https://github.com/huggingface/notebooks/blob/main/examples/image_captioning_blip.ipynb" rel="nofollow">Jupyter notebook</a>: 사용자 정의 데이터셋에서 BLIP를 이미지 캡셔닝으로 미세 조정하는 방법</li>',me,st,ge,E,H,at,se,De=`<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipModel">BlipModel</a>. It is used to instantiate
a BLIP model according to the specified arguments, defining the text model and vision model configs. Instantiating
a configuration with the defaults will yield a similar configuration to that of the BLIP-base
<a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">Salesforce/blip-vqa-base</a> architecture.`,no,Oe,rt=`Configuration objects inherit from <a href="/docs/transformers/main/ko/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/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ft,K,He,ht,Re,ut,_t,Ke=`Instantiate a <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig">BlipConfig</a> (or a derived class) from blip text model configuration and blip vision model
configuration.`,Et,ae,be,re,Z,Fe,kt,Te=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipTextModel">BlipTextModel</a>. It is used to instantiate a BLIP
text 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 <code>BlipText</code> used by the <a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">base
architectures</a>.`,Jt,jt,Pe=`Configuration objects inherit from <a href="/docs/transformers/main/ko/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/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ot,Me,Ge,N,ye,ie,z,Ft,Ct,it=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipVisionModel">BlipVisionModel</a>. It is used to instantiate a
BLIP vision model according to the specified arguments, defining the model architecture. Instantiating a
configuration defaults will yield a similar configuration to that of the Blip-base
<a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">Salesforce/blip-vqa-base</a> architecture.`,lo,It,lt=`Configuration objects inherit from <a href="/docs/transformers/main/ko/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/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,co,dt,A,qe,Xt,C,Le,Kt,le,po="Constructs a BLIP processor which wraps a BERT tokenizer and BLIP image processor into a single processor.",ct,ve,zt=`<a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipProcessor">BlipProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a> and <a href="/docs/transformers/main/ko/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>. See the
docstring of <code>__call__()</code> and <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipProcessor.decode">decode()</a> for more information.`,et,U,ee,Qt,W,Vt=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,eo,de,Ht,to,we,go=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,St,R,bt,Ce,P,Ut,Wt,Ee="Constructs a BLIP image processor.",so,fe,he,Tt,$e,te="Preprocess an image or batch of images.",Be,tt,G,Xe,Yt,Ie,ao;return y=new ke({props:{title:"BLIP",local:"blip",headingTag:"h1"}}),w=new ke({props:{title:"개요",local:"overview",headingTag:"h2"}}),xt=new ke({props:{title:"자료",local:"resources",headingTag:"h2"}}),st=new ke({props:{title:"BlipConfig",local:"transformers.BlipConfig ][ transformers.BlipConfig",headingTag:"h2"}}),H=new F({props:{name:"class transformers.BlipConfig",anchor:"transformers.BlipConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"image_text_hidden_size",val:" = 256"},{name:"label_smoothing",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipConfig.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/ko/model_doc/blip#transformers.BlipTextConfig">BlipTextConfig</a>.`,name:"text_config"},{anchor:"transformers.BlipConfig.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/ko/model_doc/blip#transformers.BlipVisionConfig">BlipVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.BlipConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.BlipConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The initial value of the <em>logit_scale</em> parameter. Default is used as per the original BLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.BlipConfig.image_text_hidden_size",description:`<strong>image_text_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the hidden state of the image-text fusion layer.`,name:"image_text_hidden_size"},{anchor:"transformers.BlipConfig.label_smoothing",description:`<strong>label_smoothing</strong> (float, optional, <em>optional</em>, defaults to 0.0) &#x2014;
A float in [0.0, 1.0]. Specifies the amount of smoothing when computing the loss, where 0.0 means no smoothing. The targets
become a mixture of the original ground truth and a uniform distribution as described in
<code>Rethinking the Inception Architecture for Computer Vision &lt;https://arxiv.org/abs/1512.00567&gt;</code>__. Default: :math:<code>0.0</code>.`,name:"label_smoothing"},{anchor:"transformers.BlipConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L230"}}),K=new wt({props:{anchor:"transformers.BlipConfig.example",$$slots:{default:[$o]},$$scope:{ctx:k}}}),Re=new F({props:{name:"from_text_vision_configs",anchor:"transformers.BlipConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": BlipTextConfig"},{name:"vision_config",val:": BlipVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L316",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>An instance of a configuration object</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipConfig"
>BlipConfig</a></p>
`}}),ae=new ke({props:{title:"BlipTextConfig",local:"transformers.BlipTextConfig ][ transformers.BlipTextConfig",headingTag:"h2"}}),Z=new F({props:{name:"class transformers.BlipTextConfig",anchor:"transformers.BlipTextConfig",parameters:[{name:"vocab_size",val:" = 30524"},{name:"hidden_size",val:" = 768"},{name:"encoder_hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 512"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"bos_token_id",val:" = 30522"},{name:"eos_token_id",val:" = 2"},{name:"pad_token_id",val:" = 0"},{name:"sep_token_id",val:" = 102"},{name:"is_decoder",val:" = True"},{name:"use_cache",val:" = True"},{name:"label_smoothing",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30524) &#x2014;
Vocabulary size of the <code>Blip</code> text 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/ko/model_doc/blip#transformers.BlipModel">BlipModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlipTextConfig.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.BlipTextConfig.encoder_hidden_size",description:`<strong>encoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers from the vision model.`,name:"encoder_hidden_size"},{anchor:"transformers.BlipTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BlipTextConfig.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.BlipTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BlipTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.BlipTextConfig.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. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BlipTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BlipTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BlipTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.BlipTextConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BlipTextConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
The id of the <code>beginning-of-sequence</code> token.`,name:"bos_token_id"},{anchor:"transformers.BlipTextConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the <code>end-of-sequence</code> token.`,name:"eos_token_id"},{anchor:"transformers.BlipTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the <code>padding</code> token.`,name:"pad_token_id"},{anchor:"transformers.BlipTextConfig.sep_token_id",description:`<strong>sep_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 102) &#x2014;
The id of the <code>separator</code> token.`,name:"sep_token_id"},{anchor:"transformers.BlipTextConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model is used as a decoder.`,name:"is_decoder"},{anchor:"transformers.BlipTextConfig.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).`,name:"use_cache"},{anchor:"transformers.BlipTextConfig.label_smoothing",description:`<strong>label_smoothing</strong> (float, <em>optional</em>) &#x2014;
A float in [0.0, 1.0]. Specifies the amount of smoothing when computing the loss, where 0.0 means no smoothing. The targets
become a mixture of the original ground truth and a uniform distribution as described in
<code>Rethinking the Inception Architecture for Computer Vision &lt;https://arxiv.org/abs/1512.00567&gt;</code>__. Default: :math:<code>0.0</code>.`,name:"label_smoothing"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L24"}}),Me=new wt({props:{anchor:"transformers.BlipTextConfig.example",$$slots:{default:[Bo]},$$scope:{ctx:k}}}),N=new ke({props:{title:"BlipVisionConfig",local:"transformers.BlipVisionConfig ][ transformers.BlipVisionConfig",headingTag:"h2"}}),z=new F({props:{name:"class transformers.BlipVisionConfig",anchor:"transformers.BlipVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"image_size",val:" = 384"},{name:"patch_size",val:" = 16"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 1e-10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipVisionConfig.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.BlipVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BlipVisionConfig.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.BlipVisionConfig.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.BlipVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.BlipVisionConfig.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.BlipVisionConfig.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. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BlipVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BlipVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.BlipVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-10) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L148"}}),dt=new wt({props:{anchor:"transformers.BlipVisionConfig.example",$$slots:{default:[xo]},$$scope:{ctx:k}}}),qe=new ke({props:{title:"BlipProcessor",local:"transformers.BlipProcessor ][ transformers.BlipProcessor",headingTag:"h2"}}),Le=new F({props:{name:"class transformers.BlipProcessor",anchor:"transformers.BlipProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipProcessor.image_processor",description:`<strong>image_processor</strong> (<code>BlipImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/ko/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.BlipProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>BertTokenizerFast</code>) &#x2014;\nAn instance of [&#x2018;BertTokenizerFast`]. The tokenizer is a required input.",name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L43"}}),ee=new F({props:{name:"batch_decode",anchor:"transformers.BlipProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L118"}}),Ht=new F({props:{name:"decode",anchor:"transformers.BlipProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L125"}}),R=new ke({props:{title:"BlipImageProcessor",local:"transformers.BlipImageProcessor ][ transformers.BlipImageProcessor",headingTag:"h2"}}),P=new F({props:{name:"class transformers.BlipImageProcessor",anchor:"transformers.BlipImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{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_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipImageProcessor.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.BlipImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 384, &quot;width&quot;: 384}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/image_processing_blip.py#L46"}}),he=new F({props:{name:"preprocess",anchor:"transformers.BlipImageProcessor.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:"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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"do_convert_rgb",val:": typing.Optional[bool] = 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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.BlipImageProcessor.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.BlipImageProcessor.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.BlipImageProcessor.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/blip/image_processing_blip.py#L159"}}),tt=new vo({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[tn],pytorch:[Ho]},$$scope:{ctx:k}}}),Xe=new wo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/blip.md"}}),{c(){e=p("meta"),f=r(),o=p("p"),s=r(),h(y.$$.fragment),t=r(),h(w.$$.fragment),Gt=r(),pe=p("p"),pe.innerHTML=mo,qt=r(),O=p("p"),O.textContent=io,Se=r(),Ze=p("ul"),Ze.innerHTML=Ne,nt=r(),Y=p("p"),Y.textContent=Ye,Dt=r(),Ve=p("p"),Ve.innerHTML=Bt,Lt=r(),L=p("p"),L.innerHTML=oo,q=r(),Je=p("p"),Je.innerHTML=mt,je=r(),h(xt.$$.fragment),Ae=r(),_e=p("ul"),_e.innerHTML=gt,me=r(),h(st.$$.fragment),ge=r(),E=p("div"),h(H.$$.fragment),at=r(),se=p("p"),se.innerHTML=De,no=r(),Oe=p("p"),Oe.innerHTML=rt,ft=r(),h(K.$$.fragment),He=r(),ht=p("div"),h(Re.$$.fragment),ut=r(),_t=p("p"),_t.innerHTML=Ke,Et=r(),h(ae.$$.fragment),be=r(),re=p("div"),h(Z.$$.fragment),Fe=r(),kt=p("p"),kt.innerHTML=Te,Jt=r(),jt=p("p"),jt.innerHTML=Pe,Ot=r(),h(Me.$$.fragment),Ge=r(),h(N.$$.fragment),ye=r(),ie=p("div"),h(z.$$.fragment),Ft=r(),Ct=p("p"),Ct.innerHTML=it,lo=r(),It=p("p"),It.innerHTML=lt,co=r(),h(dt.$$.fragment),A=r(),h(qe.$$.fragment),Xt=r(),C=p("div"),h(Le.$$.fragment),Kt=r(),le=p("p"),le.textContent=po,ct=r(),ve=p("p"),ve.innerHTML=zt,et=r(),U=p("div"),h(ee.$$.fragment),Qt=r(),W=p("p"),W.innerHTML=Vt,eo=r(),de=p("div"),h(Ht.$$.fragment),to=r(),we=p("p"),we.innerHTML=go,St=r(),h(R.$$.fragment),bt=r(),Ce=p("div"),h(P.$$.fragment),Ut=r(),Wt=p("p"),Wt.textContent=Ee,so=r(),fe=p("div"),h(he.$$.fragment),Tt=r(),$e=p("p"),$e.textContent=te,Be=r(),h(tt.$$.fragment),G=r(),h(Xe.$$.fragment),Yt=r(),Ie=p("p"),this.h()},l(n){const $=yo("svelte-u9bgzb",document.head);e=m($,"META",{name:!0,content:!0}),$.forEach(l),f=i(n),o=m(n,"P",{}),J(o).forEach(l),s=i(n),u(y.$$.fragment,n),t=i(n),u(w.$$.fragment,n),Gt=i(n),pe=m(n,"P",{"data-svelte-h":!0}),v(pe)!=="svelte-1dnejb7"&&(pe.innerHTML=mo),qt=i(n),O=m(n,"P",{"data-svelte-h":!0}),v(O)!=="svelte-1pyyzc1"&&(O.textContent=io),Se=i(n),Ze=m(n,"UL",{"data-svelte-h":!0}),v(Ze)!=="svelte-1l4r9vk"&&(Ze.innerHTML=Ne),nt=i(n),Y=m(n,"P",{"data-svelte-h":!0}),v(Y)!=="svelte-e5r8wp"&&(Y.textContent=Ye),Dt=i(n),Ve=m(n,"P",{"data-svelte-h":!0}),v(Ve)!=="svelte-bq6sjv"&&(Ve.innerHTML=Bt),Lt=i(n),L=m(n,"P",{"data-svelte-h":!0}),v(L)!=="svelte-1nlkgp7"&&(L.innerHTML=oo),q=i(n),Je=m(n,"P",{"data-svelte-h":!0}),v(Je)!=="svelte-c3o2qx"&&(Je.innerHTML=mt),je=i(n),u(xt.$$.fragment,n),Ae=i(n),_e=m(n,"UL",{"data-svelte-h":!0}),v(_e)!=="svelte-36nw9d"&&(_e.innerHTML=gt),me=i(n),u(st.$$.fragment,n),ge=i(n),E=m(n,"DIV",{class:!0});var ze=J(E);u(H.$$.fragment,ze),at=i(ze),se=m(ze,"P",{"data-svelte-h":!0}),v(se)!=="svelte-1u055qt"&&(se.innerHTML=De),no=i(ze),Oe=m(ze,"P",{"data-svelte-h":!0}),v(Oe)!=="svelte-qr3t5r"&&(Oe.innerHTML=rt),ft=i(ze),u(K.$$.fragment,ze),He=i(ze),ht=m(ze,"DIV",{class:!0});var Mt=J(ht);u(Re.$$.fragment,Mt),ut=i(Mt),_t=m(Mt,"P",{"data-svelte-h":!0}),v(_t)!=="svelte-1l3q2ya"&&(_t.innerHTML=Ke),Mt.forEach(l),ze.forEach(l),Et=i(n),u(ae.$$.fragment,n),be=i(n),re=m(n,"DIV",{class:!0});var I=J(re);u(Z.$$.fragment,I),Fe=i(I),kt=m(I,"P",{"data-svelte-h":!0}),v(kt)!=="svelte-ov6vfb"&&(kt.innerHTML=Te),Jt=i(I),jt=m(I,"P",{"data-svelte-h":!0}),v(jt)!=="svelte-qr3t5r"&&(jt.innerHTML=Pe),Ot=i(I),u(Me.$$.fragment,I),I.forEach(l),Ge=i(n),u(N.$$.fragment,n),ye=i(n),ie=m(n,"DIV",{class:!0});var ce=J(ie);u(z.$$.fragment,ce),Ft=i(ce),Ct=m(ce,"P",{"data-svelte-h":!0}),v(Ct)!=="svelte-oli9m4"&&(Ct.innerHTML=it),lo=i(ce),It=m(ce,"P",{"data-svelte-h":!0}),v(It)!=="svelte-qr3t5r"&&(It.innerHTML=lt),co=i(ce),u(dt.$$.fragment,ce),ce.forEach(l),A=i(n),u(qe.$$.fragment,n),Xt=i(n),C=m(n,"DIV",{class:!0});var Qe=J(C);u(Le.$$.fragment,Qe),Kt=i(Qe),le=m(Qe,"P",{"data-svelte-h":!0}),v(le)!=="svelte-4ee3u1"&&(le.textContent=po),ct=i(Qe),ve=m(Qe,"P",{"data-svelte-h":!0}),v(ve)!=="svelte-14edb8l"&&(ve.innerHTML=zt),et=i(Qe),U=m(Qe,"DIV",{class:!0});var D=J(U);u(ee.$$.fragment,D),Qt=i(D),W=m(D,"P",{"data-svelte-h":!0}),v(W)!=="svelte-oqykt7"&&(W.innerHTML=Vt),D.forEach(l),eo=i(Qe),de=m(Qe,"DIV",{class:!0});var yt=J(de);u(Ht.$$.fragment,yt),to=i(yt),we=m(yt,"P",{"data-svelte-h":!0}),v(we)!=="svelte-118yoqt"&&(we.innerHTML=go),yt.forEach(l),Qe.forEach(l),St=i(n),u(R.$$.fragment,n),bt=i(n),Ce=m(n,"DIV",{class:!0});var Zt=J(Ce);u(P.$$.fragment,Zt),Ut=i(Zt),Wt=m(Zt,"P",{"data-svelte-h":!0}),v(Wt)!=="svelte-17e80zr"&&(Wt.textContent=Ee),so=i(Zt),fe=m(Zt,"DIV",{class:!0});var xe=J(fe);u(he.$$.fragment,xe),Tt=i(xe),$e=m(xe,"P",{"data-svelte-h":!0}),v($e)!=="svelte-1x3yxsa"&&($e.textContent=te),xe.forEach(l),Zt.forEach(l),Be=i(n),u(tt.$$.fragment,n),G=i(n),u(Xe.$$.fragment,n),Yt=i(n),Ie=m(n,"P",{}),J(Ie).forEach(l),this.h()},h(){j(e,"name","hf:doc:metadata"),j(e,"content",nn),j(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(E,"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(ie,"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"),j(de,"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(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,$){a(document.head,e),g(n,f,$),g(n,o,$),g(n,s,$),_(y,n,$),g(n,t,$),_(w,n,$),g(n,Gt,$),g(n,pe,$),g(n,qt,$),g(n,O,$),g(n,Se,$),g(n,Ze,$),g(n,nt,$),g(n,Y,$),g(n,Dt,$),g(n,Ve,$),g(n,Lt,$),g(n,L,$),g(n,q,$),g(n,Je,$),g(n,je,$),_(xt,n,$),g(n,Ae,$),g(n,_e,$),g(n,me,$),_(st,n,$),g(n,ge,$),g(n,E,$),_(H,E,null),a(E,at),a(E,se),a(E,no),a(E,Oe),a(E,ft),_(K,E,null),a(E,He),a(E,ht),_(Re,ht,null),a(ht,ut),a(ht,_t),g(n,Et,$),_(ae,n,$),g(n,be,$),g(n,re,$),_(Z,re,null),a(re,Fe),a(re,kt),a(re,Jt),a(re,jt),a(re,Ot),_(Me,re,null),g(n,Ge,$),_(N,n,$),g(n,ye,$),g(n,ie,$),_(z,ie,null),a(ie,Ft),a(ie,Ct),a(ie,lo),a(ie,It),a(ie,co),_(dt,ie,null),g(n,A,$),_(qe,n,$),g(n,Xt,$),g(n,C,$),_(Le,C,null),a(C,Kt),a(C,le),a(C,ct),a(C,ve),a(C,et),a(C,U),_(ee,U,null),a(U,Qt),a(U,W),a(C,eo),a(C,de),_(Ht,de,null),a(de,to),a(de,we),g(n,St,$),_(R,n,$),g(n,bt,$),g(n,Ce,$),_(P,Ce,null),a(Ce,Ut),a(Ce,Wt),a(Ce,so),a(Ce,fe),_(he,fe,null),a(fe,Tt),a(fe,$e),g(n,Be,$),_(tt,n,$),g(n,G,$),_(Xe,n,$),g(n,Yt,$),g(n,Ie,$),ao=!0},p(n,[$]){const ze={};$&2&&(ze.$$scope={dirty:$,ctx:n}),K.$set(ze);const Mt={};$&2&&(Mt.$$scope={dirty:$,ctx:n}),Me.$set(Mt);const I={};$&2&&(I.$$scope={dirty:$,ctx:n}),dt.$set(I);const ce={};$&2&&(ce.$$scope={dirty:$,ctx:n}),tt.$set(ce)},i(n){ao||(b(y.$$.fragment,n),b(w.$$.fragment,n),b(xt.$$.fragment,n),b(st.$$.fragment,n),b(H.$$.fragment,n),b(K.$$.fragment,n),b(Re.$$.fragment,n),b(ae.$$.fragment,n),b(Z.$$.fragment,n),b(Me.$$.fragment,n),b(N.$$.fragment,n),b(z.$$.fragment,n),b(dt.$$.fragment,n),b(qe.$$.fragment,n),b(Le.$$.fragment,n),b(ee.$$.fragment,n),b(Ht.$$.fragment,n),b(R.$$.fragment,n),b(P.$$.fragment,n),b(he.$$.fragment,n),b(tt.$$.fragment,n),b(Xe.$$.fragment,n),ao=!0)},o(n){T(y.$$.fragment,n),T(w.$$.fragment,n),T(xt.$$.fragment,n),T(st.$$.fragment,n),T(H.$$.fragment,n),T(K.$$.fragment,n),T(Re.$$.fragment,n),T(ae.$$.fragment,n),T(Z.$$.fragment,n),T(Me.$$.fragment,n),T(N.$$.fragment,n),T(z.$$.fragment,n),T(dt.$$.fragment,n),T(qe.$$.fragment,n),T(Le.$$.fragment,n),T(ee.$$.fragment,n),T(Ht.$$.fragment,n),T(R.$$.fragment,n),T(P.$$.fragment,n),T(he.$$.fragment,n),T(tt.$$.fragment,n),T(Xe.$$.fragment,n),ao=!1},d(n){n&&(l(f),l(o),l(s),l(t),l(Gt),l(pe),l(qt),l(O),l(Se),l(Ze),l(nt),l(Y),l(Dt),l(Ve),l(Lt),l(L),l(q),l(Je),l(je),l(Ae),l(_e),l(me),l(ge),l(E),l(Et),l(be),l(re),l(Ge),l(ye),l(ie),l(A),l(Xt),l(C),l(St),l(bt),l(Ce),l(Be),l(G),l(Yt),l(Ie)),l(e),M(y,n),M(w,n),M(xt,n),M(st,n),M(H),M(K),M(Re),M(ae,n),M(Z),M(Me),M(N,n),M(z),M(dt),M(qe,n),M(Le),M(ee),M(Ht),M(R,n),M(P),M(he),M(tt,n),M(Xe,n)}}}const nn='{"title":"BLIP","local":"blip","sections":[{"title":"개요","local":"overview","sections":[],"depth":2},{"title":"자료","local":"resources","sections":[],"depth":2},{"title":"BlipConfig","local":"transformers.BlipConfig ][ transformers.BlipConfig","sections":[],"depth":2},{"title":"BlipTextConfig","local":"transformers.BlipTextConfig ][ transformers.BlipTextConfig","sections":[],"depth":2},{"title":"BlipVisionConfig","local":"transformers.BlipVisionConfig ][ transformers.BlipVisionConfig","sections":[],"depth":2},{"title":"BlipProcessor","local":"transformers.BlipProcessor ][ transformers.BlipProcessor","sections":[],"depth":2},{"title":"BlipImageProcessor","local":"transformers.BlipImageProcessor ][ transformers.BlipImageProcessor","sections":[],"depth":2},{"title":"BlipModel","local":"transformers.BlipModel ][ transformers.BlipModel","sections":[],"depth":2},{"title":"BlipTextModel","local":"transformers.BlipTextModel ][ transformers.BlipTextModel","sections":[],"depth":2},{"title":"BlipVisionModel","local":"transformers.BlipVisionModel ][ transformers.BlipVisionModel","sections":[],"depth":2},{"title":"BlipForConditionalGeneration","local":"transformers.BlipForConditionalGeneration ][ transformers.BlipForConditionalGeneration","sections":[],"depth":2},{"title":"BlipForImageTextRetrieval","local":"transformers.BlipForImageTextRetrieval ][ transformers.BlipForImageTextRetrieval","sections":[],"depth":2},{"title":"BlipForQuestionAnswering","local":"transformers.BlipForQuestionAnswering ][ transformers.BlipForQuestionAnswering","sections":[],"depth":2},{"title":"TFBlipModel","local":"transformers.TFBlipModel ][ transformers.TFBlipModel","sections":[],"depth":2},{"title":"TFBlipTextModel","local":"transformers.TFBlipTextModel ][ transformers.TFBlipTextModel","sections":[],"depth":2},{"title":"TFBlipVisionModel","local":"transformers.TFBlipVisionModel ][ transformers.TFBlipVisionModel","sections":[],"depth":2},{"title":"TFBlipForConditionalGeneration","local":"transformers.TFBlipForConditionalGeneration ][ transformers.TFBlipForConditionalGeneration","sections":[],"depth":2},{"title":"TFBlipForImageTextRetrieval","local":"transformers.TFBlipForImageTextRetrieval ][ transformers.TFBlipForImageTextRetrieval","sections":[],"depth":2},{"title":"TFBlipForQuestionAnswering","local":"transformers.TFBlipForQuestionAnswering ][ transformers.TFBlipForQuestionAnswering","sections":[],"depth":2}],"depth":1}';function sn(k){return bo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fn extends To{constructor(e){super(),Mo(this,e,sn,on,_o,{})}}export{fn as component};
