import{s as To,o as vo,n as L}from"../chunks/scheduler.9bc65507.js";import{S as wo,i as $o,g as m,s as a,r as f,A as ko,h as p,f as o,c as r,j as k,u as h,x as g,k as x,y as l,a as i,v as u,d as _,t as b,w as M}from"../chunks/index.707bf1b6.js";import{T as vt}from"../chunks/Tip.c2ecdbf4.js";import{D as C}from"../chunks/Docstring.86474e80.js";import{C as ge}from"../chunks/CodeBlock.54a9f38d.js";import{E as Oe}from"../chunks/ExampleCodeBlock.034f3a73.js";import{H as Ke,E as xo}from"../chunks/EditOnGithub.922df6ba.js";function jo(w){let n,T="Example:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduQ29uZmlnJTJDJTIwQWxpZ25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnbkNvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduTW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZyUwQSUwQSUyMyUyMFdlJTIwY2FuJTIwYWxzbyUyMGluaXRpYWxpemUlMjBhJTIwQWxpZ25Db25maWclMjBmcm9tJTIwYSUyMEFsaWduVGV4dENvbmZpZyUyMGFuZCUyMGElMjBBbGlnblZpc2lvbkNvbmZpZyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBbGlnblRleHRDb25maWclMkMlMjBBbGlnblZpc2lvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMEFMSUdOJTIwVGV4dCUyMGFuZCUyMFZpc2lvbiUyMGNvbmZpZ3VyYXRpb25zJTBBY29uZmlnX3RleHQlMjAlM0QlMjBBbGlnblRleHRDb25maWcoKSUwQWNvbmZpZ192aXNpb24lMjAlM0QlMjBBbGlnblZpc2lvbkNvbmZpZygpJTBBJTBBY29uZmlnJTIwJTNEJTIwQWxpZ25Db25maWcuZnJvbV90ZXh0X3Zpc2lvbl9jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX3Zpc2lvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignConfig, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel(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 AlignConfig from a AlignTextConfig and a AlignVisionConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignTextConfig, AlignVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing ALIGN Text and Vision configurations</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = AlignTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = AlignVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AlignConfig.from_text_vision_configs(config_text, config_vision)`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Ao(w){let n,T="Example:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduVGV4dENvbmZpZyUyQyUyMEFsaWduVGV4dE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduVGV4dENvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnblRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnblRleHRNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwa2FrYW9icmFpbiUyRmFsaWduLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEFsaWduVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignTextConfig, AlignTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignTextConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignTextModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignTextModel(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(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Co(w){let n,T="Example:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduVmlzaW9uQ29uZmlnJTJDJTIwQWxpZ25WaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnblZpc2lvbkNvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnblZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduVmlzaW9uTW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBBbGlnblZpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignVisionConfig, AlignVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignVisionConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignVisionModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignVisionModel(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(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Jo(w){let n,T=`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(){n=m("p"),n.innerHTML=T},l(d){n=p(d,"P",{"data-svelte-h":!0}),g(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,c){i(d,n,c)},p:L,d(d){d&&o(n)}}}function zo(w){let n,T=`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(){n=m("p"),n.innerHTML=T},l(d){n=p(d,"P",{"data-svelte-h":!0}),g(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,c){i(d,n,c)},p:L,d(d){d&&o(n)}}}function Zo(w){let n,T="Examples:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGlnbk1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<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(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Wo(w){let n,T=`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(){n=m("p"),n.innerHTML=T},l(d){n=p(d,"P",{"data-svelte-h":!0}),g(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,c){i(d,n,c)},p:L,d(d){d&&o(n)}}}function Uo(w){let n,T="Examples:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEFsaWduTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEFsaWduTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",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, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-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(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Bo(w){let n,T=`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(){n=m("p"),n.innerHTML=T},l(d){n=p(d,"P",{"data-svelte-h":!0}),g(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,c){i(d,n,c)},p:L,d(d){d&&o(n)}}}function Io(w){let n,T="Examples:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGlnblRleHRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQWxpZ25UZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjAoRU9TJTIwdG9rZW4pJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlignTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignTextModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<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>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function Vo(w){let n,T=`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(){n=m("p"),n.innerHTML=T},l(d){n=p(d,"P",{"data-svelte-h":!0}),g(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,c){i(d,n,c)},p:L,d(d){d&&o(n)}}}function Go(w){let n,T="Examples:",d,c,y;return c=new ge({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEFsaWduVmlzaW9uTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEFsaWduVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwQ0xTJTIwc3RhdGVz",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, AlignVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignVisionModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-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>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,d=a(),f(c.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),g(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),h(c.$$.fragment,t)},m(t,v){i(t,n,v),i(t,d,v),u(c,t,v),y=!0},p:L,i(t){y||(_(c.$$.fragment,t),y=!0)},o(t){b(c.$$.fragment,t),y=!1},d(t){t&&(o(n),o(d)),M(c,t)}}}function No(w){let n,T,d,c,y,t,v,wt,fe,Ln='ALIGNモデルは、「<a href="https://arxiv.org/abs/2102.05918" rel="nofollow">Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision</a>」という論文でChao Jia、Yinfei Yang、Ye Xia、Yi-Ting Chen、Zarana Parekh、Hieu Pham、Quoc V. Le、Yunhsuan Sung、Zhen Li、Tom Duerigによって提案されました。ALIGNはマルチモーダルな視覚言語モデルです。これは画像とテキストの類似度や、ゼロショット画像分類に使用できます。ALIGNは<a href="efficientnet">EfficientNet</a>を視覚エンコーダーとして、<a href="bert">BERT</a>をテキストエンコーダーとして搭載したデュアルエンコーダー構造を特徴とし、対照学習によって視覚とテキストの表現を整合させることを学びます。それまでの研究とは異なり、ALIGNは巨大でノイジーなデータセットを活用し、コーパスのスケールを利用して単純な方法ながら最先端の表現を達成できることを示しています。',$t,he,Pn="論文の要旨は以下の通りです：",kt,ue,Fn="<em>事前学習された表現は、多くの自然言語処理（NLP）および知覚タスクにとって重要になっています。NLPにおける表現学習は、人間のアノテーションのない生のテキストでの学習へと移行していますが、視覚および視覚言語の表現は依然として精巧な学習データセットに大きく依存しており、これは高価であったり専門知識を必要としたりします。視覚アプリケーションの場合、ImageNetやOpenImagesのような明示的なクラスラベルを持つデータセットを使用して学習されることがほとんどです。視覚言語の場合、Conceptual Captions、MSCOCO、CLIPなどの人気のあるデータセットはすべて、それぞれ無視できないデータ収集（およびクリーニング）プロセスを含みます。このコストのかかるキュレーションプロセスはデータセットのサイズを制限し、訓練されたモデルのスケーリングを妨げます。本論文では、Conceptual Captionsデータセットの高価なフィルタリングや後処理ステップなしで得られた、10億を超える画像alt-textペアのノイズの多いデータセットを活用します。シンプルなデュアルエンコーダーアーキテクチャは、対照損失を使用して画像とテキストペアの視覚的および言語的表現を整合させることを学習します。我々は、コーパスの規模がそのノイズを補い、このような単純な学習スキームでも最先端の表現につながることを示します。我々の視覚表現は、ImageNetやVTABなどの分類タスクへの転移において強力な性能を発揮します。整合した視覚的および言語的表現は、ゼロショット画像分類を可能にし、また、より洗練されたクロスアテンションモデルと比較しても、Flickr30KおよびMSCOCO画像テキスト検索ベンチマークにおいて新たな最先端の結果を達成します。また、これらの表現は、複雑なテキストおよびテキスト+画像のクエリを用いたクロスモーダル検索を可能にします。</em>",xt,_e,Hn=`このモデルは<a href="https://huggingface.co/adirik" rel="nofollow">Alara Dirik</a>により提供されました。
オリジナルのコードは公開されておらず、この実装は元論文に基づいたKakao Brainの実装をベースにしています。`,jt,be,At,Me,En="ALIGNはEfficientNetを使用して視覚的特徴を、BERTを使用してテキスト特徴を取得します。テキストと視覚の両方の特徴は、同一の次元を持つ潜在空間に射影されます。射影された画像とテキスト特徴間のドット積が類似度スコアとして使用されます。",Ct,ye,Rn='<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignProcessor">AlignProcessor</a>は、テキストのエンコードと画像の前処理を両方行うために、<code>EfficientNetImageProcessor</code>と<a href="/docs/transformers/pr_31172/ja/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>を単一のインスタンスにラップします。以下の例は、<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignProcessor">AlignProcessor</a>と<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignModel">AlignModel</a>を使用して画像-テキスト類似度スコアを取得する方法を示しています。',Jt,Te,zt,ve,Zt,we,qn="ALIGNの使用を開始するのに役立つ公式のHugging Faceとコミュニティ（🌎で示されている）の参考資料の一覧です。",Wt,$e,Xn='<li><a href="https://huggingface.co/blog/vit-align" rel="nofollow">ALIGNとCOYO-700Mデータセット</a>に関するブログ投稿。</li> <li>ゼロショット画像分類<a href="https://huggingface.co/spaces/adirik/ALIGN-zero-shot-image-classification" rel="nofollow">デモ</a>。</li> <li><code>kakaobrain/align-base</code> モデルの<a href="https://huggingface.co/kakaobrain/align-base" rel="nofollow">モデルカード</a>。</li>',Ut,ke,Yn="ここに参考資料を提出したい場合は、気兼ねなくPull Requestを開いてください。私たちはそれをレビューいたします！参考資料は、既存のものを複製するのではなく、何か新しいことを示すことが理想的です。",Bt,xe,It,j,je,Ot,et,Sn=`<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignConfig">AlignConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignModel">AlignModel</a>. It is used to
instantiate a ALIGN 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 ALIGN
<a href="https://huggingface.co/kakaobrain/align-base" rel="nofollow">kakaobrain/align-base</a> architecture.`,Kt,tt,Qn=`Configuration objects inherit from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,en,S,tn,Q,Ae,nn,nt,Dn=`Instantiate a <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignConfig">AlignConfig</a> (or a derived class) from align text model configuration and align vision model
configuration.`,Vt,Ce,Gt,J,Je,on,ot,On=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignTextModel">AlignTextModel</a>. It is used to instantiate a
ALIGN text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the text encoder of the ALIGN
<a href="https://huggingface.co/kakaobrain/align-base" rel="nofollow">kakaobrain/align-base</a> architecture. The default values here are
copied from BERT.`,sn,st,Kn=`Configuration objects inherit from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,an,D,Nt,ze,Lt,z,Ze,rn,at,eo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignVisionModel">AlignVisionModel</a>. It is used to instantiate a
ALIGN vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder of the ALIGN
<a href="https://huggingface.co/kakaobrain/align-base" rel="nofollow">kakaobrain/align-base</a> architecture. The default values are copied
from EfficientNet (efficientnet-b7)`,ln,rt,to=`Configuration objects inherit from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31172/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,dn,O,Pt,We,no="## AlignProcessor[[transformers.AlignProcessor]]",Ft,Z,Ue,cn,it,oo=`Constructs an ALIGN processor which wraps <code>EfficientNetImageProcessor</code> and
<a href="/docs/transformers/pr_31172/ja/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>/<a href="/docs/transformers/pr_31172/ja/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a> into a single processor that interits both the image processor and
tokenizer functionalities. See the <code>__call__()</code> and <code>decode()</code> for more
information.`,mn,K,Be,pn,lt,so=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/pr_31172/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,gn,ee,Ie,fn,dt,ao=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/pr_31172/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Ht,Ve,ro="## AlignModel[[transformers.AlignModel]]",Et,$,Ge,hn,ct,io=`This model inherits from <a href="/docs/transformers/pr_31172/ja/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.)`,un,mt,lo=`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.`,_n,X,Ne,bn,pt,co='The <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignModel">AlignModel</a> forward method, overrides the <code>__call__</code> special method.',Mn,te,yn,I,Le,Tn,gt,mo='The <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignModel">AlignModel</a> forward method, overrides the <code>__call__</code> special method.',vn,ne,wn,oe,$n,V,Pe,kn,ft,po='The <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignModel">AlignModel</a> forward method, overrides the <code>__call__</code> special method.',xn,se,jn,ae,Rt,Fe,go="## AlignTextModel[[transformers.AlignTextModel]]",qt,W,He,An,ht,fo=`The text model from ALIGN without any head or projection on top.
This model inherits from <a href="/docs/transformers/pr_31172/ja/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.)`,Cn,ut,ho=`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.`,Jn,G,Ee,zn,_t,uo='The <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignTextModel">AlignTextModel</a> forward method, overrides the <code>__call__</code> special method.',Zn,re,Wn,ie,Xt,Re,_o="## AlignVisionModel[[transformers.AlignVisionModel]]",Yt,U,qe,Un,bt,bo=`The vision model from ALIGN without any head or projection on top.
This model inherits from <a href="/docs/transformers/pr_31172/ja/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.)`,Bn,Mt,Mo=`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.`,In,N,Xe,Vn,yt,yo='The <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignVisionModel">AlignVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Gn,le,Nn,de,St,Ye,Qt,Tt,Dt;return y=new Ke({props:{title:"ALIGN",local:"align",headingTag:"h1"}}),v=new Ke({props:{title:"概要",local:"概要",headingTag:"h2"}}),be=new Ke({props:{title:"使用例",local:"使用例",headingTag:"h2"}}),Te=new ge({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBbGlnblByb2Nlc3NvciUyQyUyMEFsaWduTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBbGlnblByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIya2FrYW9icmFpbiUyRmFsaWduLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBY2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0RjYW5kaWRhdGVfbGFiZWxzJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMEElMEElMjMlMjB3ZSUyMGNhbiUyMHRha2UlMjB0aGUlMjBzb2Z0bWF4JTIwdG8lMjBnZXQlMjB0aGUlMjBsYWJlbCUyMHByb2JhYmlsaXRpZXMlMEFwcm9icyUyMCUzRCUyMGxvZ2l0c19wZXJfaW1hZ2Uuc29mdG1heChkaW0lM0QxKSUwQXByaW50KHByb2JzKQ==",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignProcessor, AlignModel

processor = AlignProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
candidate_labels = [<span class="hljs-string">&quot;an image of a cat&quot;</span>, <span class="hljs-string">&quot;an image of a dog&quot;</span>]

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

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs)

<span class="hljs-comment"># this is the image-text similarity score</span>
logits_per_image = outputs.logits_per_image

<span class="hljs-comment"># we can take the softmax to get the label probabilities</span>
probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(probs)`,wrap:!1}}),ve=new Ke({props:{title:"参考資料",local:"参考資料",headingTag:"h2"}}),xe=new Ke({props:{title:"AlignConfig",local:"transformers.AlignConfig",headingTag:"h2"}}),je=new C({props:{name:"class transformers.AlignConfig",anchor:"transformers.AlignConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 640"},{name:"temperature_init_value",val:" = 1.0"},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignConfig.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/pr_31172/ja/model_doc/align#transformers.AlignTextConfig">AlignTextConfig</a>.`,name:"text_config"},{anchor:"transformers.AlignConfig.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/pr_31172/ja/model_doc/align#transformers.AlignVisionConfig">AlignVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.AlignConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 640) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.AlignConfig.temperature_init_value",description:`<strong>temperature_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The inital value of the <em>temperature</em> paramter. Default is used as per the original ALIGN implementation.`,name:"temperature_init_value"},{anchor:"transformers.AlignConfig.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.AlignConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/configuration_align.py#L294"}}),S=new Oe({props:{anchor:"transformers.AlignConfig.example",$$slots:{default:[jo]},$$scope:{ctx:w}}}),Ae=new C({props:{name:"from_text_vision_configs",anchor:"transformers.AlignConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": AlignTextConfig"},{name:"vision_config",val:": AlignVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/configuration_align.py#L370",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/pr_31172/ja/model_doc/align#transformers.AlignConfig"
>AlignConfig</a></p>
`}}),Ce=new Ke({props:{title:"AlignTextConfig",local:"transformers.AlignTextConfig",headingTag:"h2"}}),Je=new C({props:{name:"class transformers.AlignTextConfig",anchor:"transformers.AlignTextConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Align 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/pr_31172/ja/model_doc/align#transformers.AlignTextModel">AlignTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.AlignTextConfig.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.AlignTextConfig.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.AlignTextConfig.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.AlignTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.AlignTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.AlignTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.AlignTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.AlignTextConfig.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.AlignTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignTextModel">AlignTextModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.AlignTextConfig.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.AlignTextConfig.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.AlignTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.AlignTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.AlignTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/configuration_align.py#L31"}}),D=new Oe({props:{anchor:"transformers.AlignTextConfig.example",$$slots:{default:[Ao]},$$scope:{ctx:w}}}),ze=new Ke({props:{title:"AlignVisionConfig",local:"transformers.AlignVisionConfig",headingTag:"h2"}}),Ze=new C({props:{name:"class transformers.AlignVisionConfig",anchor:"transformers.AlignVisionConfig",parameters:[{name:"num_channels",val:": int = 3"},{name:"image_size",val:": int = 600"},{name:"width_coefficient",val:": float = 2.0"},{name:"depth_coefficient",val:": float = 3.1"},{name:"depth_divisor",val:": int = 8"},{name:"kernel_sizes",val:": List = [3, 3, 5, 3, 5, 5, 3]"},{name:"in_channels",val:": List = [32, 16, 24, 40, 80, 112, 192]"},{name:"out_channels",val:": List = [16, 24, 40, 80, 112, 192, 320]"},{name:"depthwise_padding",val:": List = []"},{name:"strides",val:": List = [1, 2, 2, 2, 1, 2, 1]"},{name:"num_block_repeats",val:": List = [1, 2, 2, 3, 3, 4, 1]"},{name:"expand_ratios",val:": List = [1, 6, 6, 6, 6, 6, 6]"},{name:"squeeze_expansion_ratio",val:": float = 0.25"},{name:"hidden_act",val:": str = 'swish'"},{name:"hidden_dim",val:": int = 2560"},{name:"pooling_type",val:": str = 'mean'"},{name:"initializer_range",val:": float = 0.02"},{name:"batch_norm_eps",val:": float = 0.001"},{name:"batch_norm_momentum",val:": float = 0.99"},{name:"drop_connect_rate",val:": float = 0.2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.AlignVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 600) &#x2014;
The input image size.`,name:"image_size"},{anchor:"transformers.AlignVisionConfig.width_coefficient",description:`<strong>width_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 2.0) &#x2014;
Scaling coefficient for network width at each stage.`,name:"width_coefficient"},{anchor:"transformers.AlignVisionConfig.depth_coefficient",description:`<strong>depth_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 3.1) &#x2014;
Scaling coefficient for network depth at each stage.`,name:"depth_coefficient"},{anchor:"transformers.AlignVisionConfig.depth_divisor",description:`<strong>depth_divisor</strong> <code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
A unit of network width.`,name:"depth_divisor"},{anchor:"transformers.AlignVisionConfig.kernel_sizes",description:`<strong>kernel_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 5, 3, 5, 5, 3]</code>) &#x2014;
List of kernel sizes to be used in each block.`,name:"kernel_sizes"},{anchor:"transformers.AlignVisionConfig.in_channels",description:`<strong>in_channels</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[32, 16, 24, 40, 80, 112, 192]</code>) &#x2014;
List of input channel sizes to be used in each block for convolutional layers.`,name:"in_channels"},{anchor:"transformers.AlignVisionConfig.out_channels",description:`<strong>out_channels</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[16, 24, 40, 80, 112, 192, 320]</code>) &#x2014;
List of output channel sizes to be used in each block for convolutional layers.`,name:"out_channels"},{anchor:"transformers.AlignVisionConfig.depthwise_padding",description:`<strong>depthwise_padding</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[]</code>) &#x2014;
List of block indices with square padding.`,name:"depthwise_padding"},{anchor:"transformers.AlignVisionConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 2, 2, 1, 2, 1]</code>) &#x2014;
List of stride sizes to be used in each block for convolutional layers.`,name:"strides"},{anchor:"transformers.AlignVisionConfig.num_block_repeats",description:`<strong>num_block_repeats</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 2, 3, 3, 4, 1]</code>) &#x2014;
List of the number of times each block is to repeated.`,name:"num_block_repeats"},{anchor:"transformers.AlignVisionConfig.expand_ratios",description:`<strong>expand_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 6, 6, 6, 6, 6, 6]</code>) &#x2014;
List of scaling coefficient of each block.`,name:"expand_ratios"},{anchor:"transformers.AlignVisionConfig.squeeze_expansion_ratio",description:`<strong>squeeze_expansion_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
Squeeze expansion ratio.`,name:"squeeze_expansion_ratio"},{anchor:"transformers.AlignVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in each block. If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>,
<code>&quot;selu&quot;, </code>&#x201C;gelu_new&#x201D;<code>, </code>&#x201C;silu&#x201D;<code>and</code>&#x201C;mish&#x201D;\` are supported.`,name:"hidden_act"},{anchor:"transformers.AlignVisionConfig.hiddem_dim",description:`<strong>hiddem_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1280) &#x2014;
The hidden dimension of the layer before the classification head.`,name:"hiddem_dim"},{anchor:"transformers.AlignVisionConfig.pooling_type",description:`<strong>pooling_type</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Type of final pooling to be applied before the dense classification head. Available options are [<code>&quot;mean&quot;</code>,
<code>&quot;max&quot;</code>]`,name:"pooling_type"},{anchor:"transformers.AlignVisionConfig.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.AlignVisionConfig.batch_norm_eps",description:`<strong>batch_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-3) &#x2014;
The epsilon used by the batch normalization layers.`,name:"batch_norm_eps"},{anchor:"transformers.AlignVisionConfig.batch_norm_momentum",description:`<strong>batch_norm_momentum</strong> (<code>float</code>, <em>optional</em>, defaults to 0.99) &#x2014;
The momentum used by the batch normalization layers.`,name:"batch_norm_momentum"},{anchor:"transformers.AlignVisionConfig.drop_connect_rate",description:`<strong>drop_connect_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.2) &#x2014;
The drop rate for skip connections.`,name:"drop_connect_rate"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/configuration_align.py#L155"}}),O=new Oe({props:{anchor:"transformers.AlignVisionConfig.example",$$slots:{default:[Co]},$$scope:{ctx:w}}}),Ue=new C({props:{name:"class transformers.AlignProcessor",anchor:"transformers.AlignProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.AlignProcessor.image_processor",description:`<strong>image_processor</strong> (<code>EfficientNetImageProcessor</code>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.AlignProcessor.tokenizer",description:`<strong>tokenizer</strong> ([<code>BertTokenizer</code>, <code>BertTokenizerFast</code>]) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/processing_align.py#L23"}}),Be=new C({props:{name:"batch_decode",anchor:"transformers.AlignProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/processing_align.py#L102"}}),Ie=new C({props:{name:"decode",anchor:"transformers.AlignProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/processing_align.py#L109"}}),Ge=new C({props:{name:"class transformers.AlignModel",anchor:"transformers.AlignModel",parameters:[{name:"config",val:": AlignConfig"}],parametersDescription:[{anchor:"transformers.AlignModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_31172/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1413"}}),Ne=new C({props:{name:"forward",anchor:"transformers.AlignModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"pixel_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"return_loss",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.AlignModel.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 should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31172/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31172/ja/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>
attention_mask (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
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>
position_ids (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
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>
token_type_ids (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>):
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>
head_mask (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>):
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>
<p>inputs_embeds (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>):
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.
pixel_values (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>):
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31172/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.
return_loss (<code>bool</code>, <em>optional</em>):
Whether or not to return the contrastive loss.
output_attentions (<code>bool</code>, <em>optional</em>):
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.
output_hidden_states (<code>bool</code>, <em>optional</em>):
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.
return_dict (<code>bool</code>, <em>optional</em>):
Whether or not to return a <a href="/docs/transformers/pr_31172/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1545"}}),te=new vt({props:{$$slots:{default:[Jo]},$$scope:{ctx:w}}}),Le=new C({props:{name:"get_text_features",anchor:"transformers.AlignModel.get_text_features",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.AlignModel.get_text_features.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 should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31172/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31172/ja/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.AlignModel.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.AlignModel.get_text_features.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.AlignModel.get_text_features.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.AlignModel.get_text_features.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.AlignModel.get_text_features.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.AlignModel.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.AlignModel.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.AlignModel.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/pr_31172/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1447",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/pr_31172/ja/model_doc/align#transformers.AlignTextModel"
>AlignTextModel</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>
`}}),ne=new vt({props:{$$slots:{default:[zo]},$$scope:{ctx:w}}}),oe=new Oe({props:{anchor:"transformers.AlignModel.get_text_features.example",$$slots:{default:[Zo]},$$scope:{ctx:w}}}),Pe=new C({props:{name:"get_image_features",anchor:"transformers.AlignModel.get_image_features",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.AlignModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</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/pr_31172/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31172/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AlignModel.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.AlignModel.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/pr_31172/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1500",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/pr_31172/ja/model_doc/align#transformers.AlignVisionModel"
>AlignVisionModel</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>
`}}),se=new vt({props:{$$slots:{default:[Wo]},$$scope:{ctx:w}}}),ae=new Oe({props:{anchor:"transformers.AlignModel.get_image_features.example",$$slots:{default:[Uo]},$$scope:{ctx:w}}}),He=new C({props:{name:"class transformers.AlignTextModel",anchor:"transformers.AlignTextModel",parameters:[{name:"config",val:": AlignTextConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.AlignTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_31172/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1197"}}),Ee=new C({props:{name:"forward",anchor:"transformers.AlignTextModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.AlignTextModel.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 should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31172/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31172/ja/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.AlignTextModel.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.AlignTextModel.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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.AlignTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.AlignTextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.AlignTextModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.AlignTextModel.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.AlignTextModel.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.AlignTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31172/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1223",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31172/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</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 (<code>&lt;class 'transformers.models.align.configuration_align.AlignTextConfig'&gt;</code>) 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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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 of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31172/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),re=new vt({props:{$$slots:{default:[Bo]},$$scope:{ctx:w}}}),ie=new Oe({props:{anchor:"transformers.AlignTextModel.forward.example",$$slots:{default:[Io]},$$scope:{ctx:w}}}),qe=new C({props:{name:"class transformers.AlignVisionModel",anchor:"transformers.AlignVisionModel",parameters:[{name:"config",val:": AlignVisionConfig"}],parametersDescription:[{anchor:"transformers.AlignVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31172/ja/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_31172/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1324"}}),Xe=new C({props:{name:"forward",anchor:"transformers.AlignVisionModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.AlignVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/pr_31172/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31172/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AlignVisionModel.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.AlignVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31172/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31172/src/transformers/models/align/modeling_align.py#L1353",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</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 (<code>&lt;class 'transformers.models.align.configuration_align.AlignVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</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 after a pooling operation on the spatial dimensions.</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, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new vt({props:{$$slots:{default:[Vo]},$$scope:{ctx:w}}}),de=new Oe({props:{anchor:"transformers.AlignVisionModel.forward.example",$$slots:{default:[Go]},$$scope:{ctx:w}}}),Ye=new xo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/model_doc/align.md"}}),{c(){n=m("meta"),T=a(),d=m("p"),c=a(),f(y.$$.fragment),t=a(),f(v.$$.fragment),wt=a(),fe=m("p"),fe.innerHTML=Ln,$t=a(),he=m("p"),he.textContent=Pn,kt=a(),ue=m("p"),ue.innerHTML=Fn,xt=a(),_e=m("p"),_e.innerHTML=Hn,jt=a(),f(be.$$.fragment),At=a(),Me=m("p"),Me.textContent=En,Ct=a(),ye=m("p"),ye.innerHTML=Rn,Jt=a(),f(Te.$$.fragment),zt=a(),f(ve.$$.fragment),Zt=a(),we=m("p"),we.textContent=qn,Wt=a(),$e=m("ul"),$e.innerHTML=Xn,Ut=a(),ke=m("p"),ke.textContent=Yn,Bt=a(),f(xe.$$.fragment),It=a(),j=m("div"),f(je.$$.fragment),Ot=a(),et=m("p"),et.innerHTML=Sn,Kt=a(),tt=m("p"),tt.innerHTML=Qn,en=a(),f(S.$$.fragment),tn=a(),Q=m("div"),f(Ae.$$.fragment),nn=a(),nt=m("p"),nt.innerHTML=Dn,Vt=a(),f(Ce.$$.fragment),Gt=a(),J=m("div"),f(Je.$$.fragment),on=a(),ot=m("p"),ot.innerHTML=On,sn=a(),st=m("p"),st.innerHTML=Kn,an=a(),f(D.$$.fragment),Nt=a(),f(ze.$$.fragment),Lt=a(),z=m("div"),f(Ze.$$.fragment),rn=a(),at=m("p"),at.innerHTML=eo,ln=a(),rt=m("p"),rt.innerHTML=to,dn=a(),f(O.$$.fragment),Pt=a(),We=m("p"),We.textContent=no,Ft=a(),Z=m("div"),f(Ue.$$.fragment),cn=a(),it=m("p"),it.innerHTML=oo,mn=a(),K=m("div"),f(Be.$$.fragment),pn=a(),lt=m("p"),lt.innerHTML=so,gn=a(),ee=m("div"),f(Ie.$$.fragment),fn=a(),dt=m("p"),dt.innerHTML=ao,Ht=a(),Ve=m("p"),Ve.textContent=ro,Et=a(),$=m("div"),f(Ge.$$.fragment),hn=a(),ct=m("p"),ct.innerHTML=io,un=a(),mt=m("p"),mt.innerHTML=lo,_n=a(),X=m("div"),f(Ne.$$.fragment),bn=a(),pt=m("p"),pt.innerHTML=co,Mn=a(),f(te.$$.fragment),yn=a(),I=m("div"),f(Le.$$.fragment),Tn=a(),gt=m("p"),gt.innerHTML=mo,vn=a(),f(ne.$$.fragment),wn=a(),f(oe.$$.fragment),$n=a(),V=m("div"),f(Pe.$$.fragment),kn=a(),ft=m("p"),ft.innerHTML=po,xn=a(),f(se.$$.fragment),jn=a(),f(ae.$$.fragment),Rt=a(),Fe=m("p"),Fe.textContent=go,qt=a(),W=m("div"),f(He.$$.fragment),An=a(),ht=m("p"),ht.innerHTML=fo,Cn=a(),ut=m("p"),ut.innerHTML=ho,Jn=a(),G=m("div"),f(Ee.$$.fragment),zn=a(),_t=m("p"),_t.innerHTML=uo,Zn=a(),f(re.$$.fragment),Wn=a(),f(ie.$$.fragment),Xt=a(),Re=m("p"),Re.textContent=_o,Yt=a(),U=m("div"),f(qe.$$.fragment),Un=a(),bt=m("p"),bt.innerHTML=bo,Bn=a(),Mt=m("p"),Mt.innerHTML=Mo,In=a(),N=m("div"),f(Xe.$$.fragment),Vn=a(),yt=m("p"),yt.innerHTML=yo,Gn=a(),f(le.$$.fragment),Nn=a(),f(de.$$.fragment),St=a(),f(Ye.$$.fragment),Qt=a(),Tt=m("p"),this.h()},l(e){const s=ko("svelte-u9bgzb",document.head);n=p(s,"META",{name:!0,content:!0}),s.forEach(o),T=r(e),d=p(e,"P",{}),k(d).forEach(o),c=r(e),h(y.$$.fragment,e),t=r(e),h(v.$$.fragment,e),wt=r(e),fe=p(e,"P",{"data-svelte-h":!0}),g(fe)!=="svelte-13yjjdl"&&(fe.innerHTML=Ln),$t=r(e),he=p(e,"P",{"data-svelte-h":!0}),g(he)!=="svelte-1pvwld5"&&(he.textContent=Pn),kt=r(e),ue=p(e,"P",{"data-svelte-h":!0}),g(ue)!=="svelte-xlfmk0"&&(ue.innerHTML=Fn),xt=r(e),_e=p(e,"P",{"data-svelte-h":!0}),g(_e)!=="svelte-196ockx"&&(_e.innerHTML=Hn),jt=r(e),h(be.$$.fragment,e),At=r(e),Me=p(e,"P",{"data-svelte-h":!0}),g(Me)!=="svelte-p64s9e"&&(Me.textContent=En),Ct=r(e),ye=p(e,"P",{"data-svelte-h":!0}),g(ye)!=="svelte-1z14nc"&&(ye.innerHTML=Rn),Jt=r(e),h(Te.$$.fragment,e),zt=r(e),h(ve.$$.fragment,e),Zt=r(e),we=p(e,"P",{"data-svelte-h":!0}),g(we)!=="svelte-yvd8pp"&&(we.textContent=qn),Wt=r(e),$e=p(e,"UL",{"data-svelte-h":!0}),g($e)!=="svelte-1rvc113"&&($e.innerHTML=Xn),Ut=r(e),ke=p(e,"P",{"data-svelte-h":!0}),g(ke)!=="svelte-1ca3035"&&(ke.textContent=Yn),Bt=r(e),h(xe.$$.fragment,e),It=r(e),j=p(e,"DIV",{class:!0});var B=k(j);h(je.$$.fragment,B),Ot=r(B),et=p(B,"P",{"data-svelte-h":!0}),g(et)!=="svelte-gb6pit"&&(et.innerHTML=Sn),Kt=r(B),tt=p(B,"P",{"data-svelte-h":!0}),g(tt)!=="svelte-9sd1sf"&&(tt.innerHTML=Qn),en=r(B),h(S.$$.fragment,B),tn=r(B),Q=p(B,"DIV",{class:!0});var Se=k(Q);h(Ae.$$.fragment,Se),nn=r(Se),nt=p(Se,"P",{"data-svelte-h":!0}),g(nt)!=="svelte-1tgweoj"&&(nt.innerHTML=Dn),Se.forEach(o),B.forEach(o),Vt=r(e),h(Ce.$$.fragment,e),Gt=r(e),J=p(e,"DIV",{class:!0});var P=k(J);h(Je.$$.fragment,P),on=r(P),ot=p(P,"P",{"data-svelte-h":!0}),g(ot)!=="svelte-1178dts"&&(ot.innerHTML=On),sn=r(P),st=p(P,"P",{"data-svelte-h":!0}),g(st)!=="svelte-9sd1sf"&&(st.innerHTML=Kn),an=r(P),h(D.$$.fragment,P),P.forEach(o),Nt=r(e),h(ze.$$.fragment,e),Lt=r(e),z=p(e,"DIV",{class:!0});var F=k(z);h(Ze.$$.fragment,F),rn=r(F),at=p(F,"P",{"data-svelte-h":!0}),g(at)!=="svelte-1pljlp2"&&(at.innerHTML=eo),ln=r(F),rt=p(F,"P",{"data-svelte-h":!0}),g(rt)!=="svelte-q1g7wv"&&(rt.innerHTML=to),dn=r(F),h(O.$$.fragment,F),F.forEach(o),Pt=r(e),We=p(e,"P",{"data-svelte-h":!0}),g(We)!=="svelte-jt17py"&&(We.textContent=no),Ft=r(e),Z=p(e,"DIV",{class:!0});var H=k(Z);h(Ue.$$.fragment,H),cn=r(H),it=p(H,"P",{"data-svelte-h":!0}),g(it)!=="svelte-19r0t8d"&&(it.innerHTML=oo),mn=r(H),K=p(H,"DIV",{class:!0});var Qe=k(K);h(Be.$$.fragment,Qe),pn=r(Qe),lt=p(Qe,"P",{"data-svelte-h":!0}),g(lt)!=="svelte-1ytfaho"&&(lt.innerHTML=so),Qe.forEach(o),gn=r(H),ee=p(H,"DIV",{class:!0});var De=k(ee);h(Ie.$$.fragment,De),fn=r(De),dt=p(De,"P",{"data-svelte-h":!0}),g(dt)!=="svelte-1b7dl0y"&&(dt.innerHTML=ao),De.forEach(o),H.forEach(o),Ht=r(e),Ve=p(e,"P",{"data-svelte-h":!0}),g(Ve)!=="svelte-3r1x88"&&(Ve.textContent=ro),Et=r(e),$=p(e,"DIV",{class:!0});var A=k($);h(Ge.$$.fragment,A),hn=r(A),ct=p(A,"P",{"data-svelte-h":!0}),g(ct)!=="svelte-br0doe"&&(ct.innerHTML=io),un=r(A),mt=p(A,"P",{"data-svelte-h":!0}),g(mt)!=="svelte-1ydu1el"&&(mt.innerHTML=lo),_n=r(A),X=p(A,"DIV",{class:!0});var Y=k(X);h(Ne.$$.fragment,Y),bn=r(Y),pt=p(Y,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-11n8kc"&&(pt.innerHTML=co),Mn=r(Y),h(te.$$.fragment,Y),Y.forEach(o),yn=r(A),I=p(A,"DIV",{class:!0});var E=k(I);h(Le.$$.fragment,E),Tn=r(E),gt=p(E,"P",{"data-svelte-h":!0}),g(gt)!=="svelte-11n8kc"&&(gt.innerHTML=mo),vn=r(E),h(ne.$$.fragment,E),wn=r(E),h(oe.$$.fragment,E),E.forEach(o),$n=r(A),V=p(A,"DIV",{class:!0});var R=k(V);h(Pe.$$.fragment,R),kn=r(R),ft=p(R,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-11n8kc"&&(ft.innerHTML=po),xn=r(R),h(se.$$.fragment,R),jn=r(R),h(ae.$$.fragment,R),R.forEach(o),A.forEach(o),Rt=r(e),Fe=p(e,"P",{"data-svelte-h":!0}),g(Fe)!=="svelte-1i6f9bu"&&(Fe.textContent=go),qt=r(e),W=p(e,"DIV",{class:!0});var q=k(W);h(He.$$.fragment,q),An=r(q),ht=p(q,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-15u5zfa"&&(ht.innerHTML=fo),Cn=r(q),ut=p(q,"P",{"data-svelte-h":!0}),g(ut)!=="svelte-1ydu1el"&&(ut.innerHTML=ho),Jn=r(q),G=p(q,"DIV",{class:!0});var ce=k(G);h(Ee.$$.fragment,ce),zn=r(ce),_t=p(ce,"P",{"data-svelte-h":!0}),g(_t)!=="svelte-16ng0b2"&&(_t.innerHTML=uo),Zn=r(ce),h(re.$$.fragment,ce),Wn=r(ce),h(ie.$$.fragment,ce),ce.forEach(o),q.forEach(o),Xt=r(e),Re=p(e,"P",{"data-svelte-h":!0}),g(Re)!=="svelte-1a9dem8"&&(Re.textContent=_o),Yt=r(e),U=p(e,"DIV",{class:!0});var me=k(U);h(qe.$$.fragment,me),Un=r(me),bt=p(me,"P",{"data-svelte-h":!0}),g(bt)!=="svelte-2oo173"&&(bt.innerHTML=bo),Bn=r(me),Mt=p(me,"P",{"data-svelte-h":!0}),g(Mt)!=="svelte-1ydu1el"&&(Mt.innerHTML=Mo),In=r(me),N=p(me,"DIV",{class:!0});var pe=k(N);h(Xe.$$.fragment,pe),Vn=r(pe),yt=p(pe,"P",{"data-svelte-h":!0}),g(yt)!=="svelte-18h8cwc"&&(yt.innerHTML=yo),Gn=r(pe),h(le.$$.fragment,pe),Nn=r(pe),h(de.$$.fragment,pe),pe.forEach(o),me.forEach(o),St=r(e),h(Ye.$$.fragment,e),Qt=r(e),Tt=p(e,"P",{}),k(Tt).forEach(o),this.h()},h(){x(n,"name","hf:doc:metadata"),x(n,"content",Lo),x(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){l(document.head,n),i(e,T,s),i(e,d,s),i(e,c,s),u(y,e,s),i(e,t,s),u(v,e,s),i(e,wt,s),i(e,fe,s),i(e,$t,s),i(e,he,s),i(e,kt,s),i(e,ue,s),i(e,xt,s),i(e,_e,s),i(e,jt,s),u(be,e,s),i(e,At,s),i(e,Me,s),i(e,Ct,s),i(e,ye,s),i(e,Jt,s),u(Te,e,s),i(e,zt,s),u(ve,e,s),i(e,Zt,s),i(e,we,s),i(e,Wt,s),i(e,$e,s),i(e,Ut,s),i(e,ke,s),i(e,Bt,s),u(xe,e,s),i(e,It,s),i(e,j,s),u(je,j,null),l(j,Ot),l(j,et),l(j,Kt),l(j,tt),l(j,en),u(S,j,null),l(j,tn),l(j,Q),u(Ae,Q,null),l(Q,nn),l(Q,nt),i(e,Vt,s),u(Ce,e,s),i(e,Gt,s),i(e,J,s),u(Je,J,null),l(J,on),l(J,ot),l(J,sn),l(J,st),l(J,an),u(D,J,null),i(e,Nt,s),u(ze,e,s),i(e,Lt,s),i(e,z,s),u(Ze,z,null),l(z,rn),l(z,at),l(z,ln),l(z,rt),l(z,dn),u(O,z,null),i(e,Pt,s),i(e,We,s),i(e,Ft,s),i(e,Z,s),u(Ue,Z,null),l(Z,cn),l(Z,it),l(Z,mn),l(Z,K),u(Be,K,null),l(K,pn),l(K,lt),l(Z,gn),l(Z,ee),u(Ie,ee,null),l(ee,fn),l(ee,dt),i(e,Ht,s),i(e,Ve,s),i(e,Et,s),i(e,$,s),u(Ge,$,null),l($,hn),l($,ct),l($,un),l($,mt),l($,_n),l($,X),u(Ne,X,null),l(X,bn),l(X,pt),l(X,Mn),u(te,X,null),l($,yn),l($,I),u(Le,I,null),l(I,Tn),l(I,gt),l(I,vn),u(ne,I,null),l(I,wn),u(oe,I,null),l($,$n),l($,V),u(Pe,V,null),l(V,kn),l(V,ft),l(V,xn),u(se,V,null),l(V,jn),u(ae,V,null),i(e,Rt,s),i(e,Fe,s),i(e,qt,s),i(e,W,s),u(He,W,null),l(W,An),l(W,ht),l(W,Cn),l(W,ut),l(W,Jn),l(W,G),u(Ee,G,null),l(G,zn),l(G,_t),l(G,Zn),u(re,G,null),l(G,Wn),u(ie,G,null),i(e,Xt,s),i(e,Re,s),i(e,Yt,s),i(e,U,s),u(qe,U,null),l(U,Un),l(U,bt),l(U,Bn),l(U,Mt),l(U,In),l(U,N),u(Xe,N,null),l(N,Vn),l(N,yt),l(N,Gn),u(le,N,null),l(N,Nn),u(de,N,null),i(e,St,s),u(Ye,e,s),i(e,Qt,s),i(e,Tt,s),Dt=!0},p(e,[s]){const B={};s&2&&(B.$$scope={dirty:s,ctx:e}),S.$set(B);const Se={};s&2&&(Se.$$scope={dirty:s,ctx:e}),D.$set(Se);const P={};s&2&&(P.$$scope={dirty:s,ctx:e}),O.$set(P);const F={};s&2&&(F.$$scope={dirty:s,ctx:e}),te.$set(F);const H={};s&2&&(H.$$scope={dirty:s,ctx:e}),ne.$set(H);const Qe={};s&2&&(Qe.$$scope={dirty:s,ctx:e}),oe.$set(Qe);const De={};s&2&&(De.$$scope={dirty:s,ctx:e}),se.$set(De);const A={};s&2&&(A.$$scope={dirty:s,ctx:e}),ae.$set(A);const Y={};s&2&&(Y.$$scope={dirty:s,ctx:e}),re.$set(Y);const E={};s&2&&(E.$$scope={dirty:s,ctx:e}),ie.$set(E);const R={};s&2&&(R.$$scope={dirty:s,ctx:e}),le.$set(R);const q={};s&2&&(q.$$scope={dirty:s,ctx:e}),de.$set(q)},i(e){Dt||(_(y.$$.fragment,e),_(v.$$.fragment,e),_(be.$$.fragment,e),_(Te.$$.fragment,e),_(ve.$$.fragment,e),_(xe.$$.fragment,e),_(je.$$.fragment,e),_(S.$$.fragment,e),_(Ae.$$.fragment,e),_(Ce.$$.fragment,e),_(Je.$$.fragment,e),_(D.$$.fragment,e),_(ze.$$.fragment,e),_(Ze.$$.fragment,e),_(O.$$.fragment,e),_(Ue.$$.fragment,e),_(Be.$$.fragment,e),_(Ie.$$.fragment,e),_(Ge.$$.fragment,e),_(Ne.$$.fragment,e),_(te.$$.fragment,e),_(Le.$$.fragment,e),_(ne.$$.fragment,e),_(oe.$$.fragment,e),_(Pe.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(He.$$.fragment,e),_(Ee.$$.fragment,e),_(re.$$.fragment,e),_(ie.$$.fragment,e),_(qe.$$.fragment,e),_(Xe.$$.fragment,e),_(le.$$.fragment,e),_(de.$$.fragment,e),_(Ye.$$.fragment,e),Dt=!0)},o(e){b(y.$$.fragment,e),b(v.$$.fragment,e),b(be.$$.fragment,e),b(Te.$$.fragment,e),b(ve.$$.fragment,e),b(xe.$$.fragment,e),b(je.$$.fragment,e),b(S.$$.fragment,e),b(Ae.$$.fragment,e),b(Ce.$$.fragment,e),b(Je.$$.fragment,e),b(D.$$.fragment,e),b(ze.$$.fragment,e),b(Ze.$$.fragment,e),b(O.$$.fragment,e),b(Ue.$$.fragment,e),b(Be.$$.fragment,e),b(Ie.$$.fragment,e),b(Ge.$$.fragment,e),b(Ne.$$.fragment,e),b(te.$$.fragment,e),b(Le.$$.fragment,e),b(ne.$$.fragment,e),b(oe.$$.fragment,e),b(Pe.$$.fragment,e),b(se.$$.fragment,e),b(ae.$$.fragment,e),b(He.$$.fragment,e),b(Ee.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(qe.$$.fragment,e),b(Xe.$$.fragment,e),b(le.$$.fragment,e),b(de.$$.fragment,e),b(Ye.$$.fragment,e),Dt=!1},d(e){e&&(o(T),o(d),o(c),o(t),o(wt),o(fe),o($t),o(he),o(kt),o(ue),o(xt),o(_e),o(jt),o(At),o(Me),o(Ct),o(ye),o(Jt),o(zt),o(Zt),o(we),o(Wt),o($e),o(Ut),o(ke),o(Bt),o(It),o(j),o(Vt),o(Gt),o(J),o(Nt),o(Lt),o(z),o(Pt),o(We),o(Ft),o(Z),o(Ht),o(Ve),o(Et),o($),o(Rt),o(Fe),o(qt),o(W),o(Xt),o(Re),o(Yt),o(U),o(St),o(Qt),o(Tt)),o(n),M(y,e),M(v,e),M(be,e),M(Te,e),M(ve,e),M(xe,e),M(je),M(S),M(Ae),M(Ce,e),M(Je),M(D),M(ze,e),M(Ze),M(O),M(Ue),M(Be),M(Ie),M(Ge),M(Ne),M(te),M(Le),M(ne),M(oe),M(Pe),M(se),M(ae),M(He),M(Ee),M(re),M(ie),M(qe),M(Xe),M(le),M(de),M(Ye,e)}}}const Lo='{"title":"ALIGN","local":"align","sections":[{"title":"概要","local":"概要","sections":[],"depth":2},{"title":"使用例","local":"使用例","sections":[],"depth":2},{"title":"参考資料","local":"参考資料","sections":[],"depth":2},{"title":"AlignConfig","local":"transformers.AlignConfig","sections":[],"depth":2},{"title":"AlignTextConfig","local":"transformers.AlignTextConfig","sections":[],"depth":2},{"title":"AlignVisionConfig","local":"transformers.AlignVisionConfig","sections":[],"depth":2}],"depth":1}';function Po(w){return vo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class So extends wo{constructor(n){super(),$o(this,n,Po,No,To,{})}}export{So as component};
