import{s as oa,o as na,n as F}from"../chunks/scheduler.bdbef820.js";import{S as sa,i as aa,g as c,s as r,r as g,A as ra,h as p,f as s,c as i,j as J,u as h,x as C,k as j,y as l,a as d,v as f,d as u,t as _,w as T}from"../chunks/index.33f81d56.js";import{T as Mt}from"../chunks/Tip.34194030.js";import{D as U}from"../chunks/Docstring.662771b3.js";import{C as fe}from"../chunks/CodeBlock.3bad7fc9.js";import{F as ia,M as zs}from"../chunks/Markdown.03194dea.js";import{E as Ze}from"../chunks/ExampleCodeBlock.32707fc1.js";import{P as la}from"../chunks/PipelineTag.d2f354cd.js";import{H,E as da}from"../chunks/index.e01163b6.js";function ca(v){let t,b='작은 배치 크기를 사용할 때, 플래시 어텐션을 사용하면 모델이 느려지는 것을 느낄 수 있습니다.아래의 <a href="#Expected-speedups-with-Flash-Attention-and-SDPA">플래시 어텐션과 SDPA를 사용한 예상 속도 향상</a> 섹션을 참조하여 적절한 어텐션 구현을 선택하세요.';return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1blgue7"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function pa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBDb25maWclMkMlMjBDTElQTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUENvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENMSVBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDTElQTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBDTElQQ29uZmlnJTIwZnJvbSUyMGElMjBDTElQVGV4dENvbmZpZyUyMGFuZCUyMGElMjBDTElQVmlzaW9uQ29uZmlnJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUZXh0Q29uZmlnJTJDJTIwQ0xJUFZpc2lvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dCUyMGFuZCUyMENMSVBWaXNpb24lMjBjb25maWd1cmF0aW9uJTBBY29uZmlnX3RleHQlMjAlM0QlMjBDTElQVGV4dENvbmZpZygpJTBBY29uZmlnX3Zpc2lvbiUyMCUzRCUyMENMSVBWaXNpb25Db25maWcoKSUwQSUwQWNvbmZpZyUyMCUzRCUyMENMSVBDb25maWcuZnJvbV90ZXh0X3Zpc2lvbl9jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX3Zpc2lvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPConfig, CLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPConfig with openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CLIPConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel(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 CLIPConfig from a CLIPTextConfig and a CLIPVisionConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextConfig, CLIPVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPText and CLIPVision configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = CLIPTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = CLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = CLIPConfig.from_text_vision_configs(config_text, config_vision)`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function ma(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUZXh0Q29uZmlnJTJDJTIwQ0xJUFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dENvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUFRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dE1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMENMSVBUZXh0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextConfig, CLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPTextConfig with openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CLIPTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPTextModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPTextModel(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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function ga(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Db25maWclMkMlMjBDTElQVmlzaW9uTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUFZpc2lvbkNvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENMSVBWaXNpb25Nb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDTElQVmlzaW9uTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionConfig, CLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPVisionConfig with openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPVisionModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPVisionModel(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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function ha(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function fa(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",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, CLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function _a(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",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, CLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ta(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function ba(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDTElQVGV4dE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBDTElQVGV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjAoRU9TJTIwdG9rZW4pJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPTextModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ma(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function ya(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDTElQVGV4dE1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFtb2RlbCUyMCUzRCUyMENMSVBUZXh0TW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEF0ZXh0X2VtYmVkcyUyMCUzRCUyMG91dHB1dHMudGV4dF9lbWJlZHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CLIPTextModelWithProjection

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPTextModelWithProjection.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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>text_embeds = outputs.text_embeds`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ca(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Ia(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBDTElQVmlzaW9uTW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBaW1hZ2VfZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy5pbWFnZV9lbWJlZHM=",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, CLIPVisionModelWithProjection

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPVisionModelWithProjection.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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>image_embeds = outputs.image_embeds`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function $a(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function wa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBWaXNpb25Nb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUFZpc2lvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwQ0xTJTIwc3RhdGVz",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, CLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function va(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function xa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENMSVBGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBbW9kZWwlMjAlM0QlMjBDTElQRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, CLIPForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPForImageClassification.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
...`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function ka(v){let t,b,n,a,y,o,I="The bare Clip Model outputting raw hidden-states without any specific head on top.",Oe,E,Ke=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,et,B,qe=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ee,L,re,tt,S,gt='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPModel">CLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Be,ie,He,Me,te,ue,oe,ht,_e,xe,ye,Te,Ce,Ie,Q,le,je,N,ke,Se,ne,ot="The text model from CLIP without any head or projection on top.",$e,O,pe=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Jt,se,Ue=`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.`,yt,z,ze,Ne,me,ct='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextModel">CLIPTextModel</a> forward method, overrides the <code>__call__</code> special method.',Qe,X,Pe,we,de,q,Ct,W,ge,It,Z,ft="The Clip Model with a projection layer on top (a linear layer on top of the pooled output).",Ge,he,pt=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Ye,ae,nt=`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.`,ve,G,w,P,Y,be='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextModelWithProjection">CLIPTextModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',Fe,D,ce,A,K,$,k,V,Ee,$t,Ve,st="The Clip Model with a projection layer on top (a linear layer on top of the pooled output).",at,Re,jt=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Le,Bt,io=`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.`,pn,ut,Ut,mn,Kt,lo='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionModelWithProjection">CLIPVisionModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',Io,wt,gn,qt,Yt,co,Mo,Je,po,$o,Nt,Zn="The vision model from CLIP without any head or projection on top.",wo,Gt,Bn=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,vo,Et,Nn=`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.`,xo,De,Dt,rt,Rt,hn='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionModel">CLIPVisionModel</a> forward method, overrides the <code>__call__</code> special method.',mo,eo,Bo,zt,No,to,Ht,it,vt,oo,go,yo=`CLIP vision encoder with an image classification head on top (a linear layer on top of the pooled final hidden states of
the patch tokens) e.g. for ImageNet.`,fn,no,ho=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ko,Ae,fo=`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.`,Go,lt,uo,Eo,St,Gn='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPForImageClassification">CLIPForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ro,_t,Po,xt,Co;return t=new H({props:{title:"CLIPModel",local:"transformers.CLIPModel ][ transformers.CLIPModel",headingTag:"h2"}}),a=new U({props:{name:"class transformers.CLIPModel",anchor:"transformers.CLIPModel",parameters:[{name:"config",val:": CLIPConfig"}],parametersDescription:[{anchor:"transformers.CLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L860"}}),re=new U({props:{name:"forward",anchor:"transformers.CLIPModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CLIPModel.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.CLIPModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CLIPModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.CLIPModel.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.CLIPModel.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.CLIPModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L992",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>transformers.models.clip.modeling_clip.CLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new Mt({props:{$$slots:{default:[ha]},$$scope:{ctx:v}}}),Me=new Ze({props:{anchor:"transformers.CLIPModel.forward.example",$$slots:{default:[fa]},$$scope:{ctx:v}}}),oe=new U({props:{name:"get_text_features",anchor:"transformers.CLIPModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPModel.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.CLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CLIPModel.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.CLIPModel.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L900",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextModel"
>CLIPTextModel</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>
`}}),_e=new Ze({props:{anchor:"transformers.CLIPModel.get_text_features.example",$$slots:{default:[ua]},$$scope:{ctx:v}}}),Te=new U({props:{name:"get_image_features",anchor:"transformers.CLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CLIPModel.get_image_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPModel.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.CLIPModel.get_image_features.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L944",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionModel"
>CLIPVisionModel</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>
`}}),Ie=new Ze({props:{anchor:"transformers.CLIPModel.get_image_features.example",$$slots:{default:[_a]},$$scope:{ctx:v}}}),le=new H({props:{title:"CLIPTextModel",local:"transformers.CLIPTextModel ][ transformers.CLIPTextModel",headingTag:"h2"}}),ke=new U({props:{name:"class transformers.CLIPTextModel",anchor:"transformers.CLIPTextModel",parameters:[{name:"config",val:": CLIPTextConfig"}],parametersDescription:[{anchor:"transformers.CLIPTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextConfig">CLIPTextConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L697"}}),ze=new U({props:{name:"forward",anchor:"transformers.CLIPTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPTextModel.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.CLIPTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CLIPTextModel.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.CLIPTextModel.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L719",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),X=new Mt({props:{$$slots:{default:[Ta]},$$scope:{ctx:v}}}),we=new Ze({props:{anchor:"transformers.CLIPTextModel.forward.example",$$slots:{default:[ba]},$$scope:{ctx:v}}}),q=new H({props:{title:"CLIPTextModelWithProjection",local:"transformers.CLIPTextModelWithProjection ][ transformers.CLIPTextModelWithProjection",headingTag:"h2"}}),ge=new U({props:{name:"class transformers.CLIPTextModelWithProjection",anchor:"transformers.CLIPTextModelWithProjection",parameters:[{name:"config",val:": CLIPTextConfig"}],parametersDescription:[{anchor:"transformers.CLIPTextModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextConfig">CLIPTextConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1082"}}),w=new U({props:{name:"forward",anchor:"transformers.CLIPTextModelWithProjection.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPTextModelWithProjection.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPTextModelWithProjection.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.CLIPTextModelWithProjection.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CLIPTextModelWithProjection.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.CLIPTextModelWithProjection.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1105",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clip.modeling_clip.CLIPTextModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The text embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clip.modeling_clip.CLIPTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),D=new Mt({props:{$$slots:{default:[Ma]},$$scope:{ctx:v}}}),A=new Ze({props:{anchor:"transformers.CLIPTextModelWithProjection.forward.example",$$slots:{default:[ya]},$$scope:{ctx:v}}}),$=new H({props:{title:"CLIPVisionModelWithProjection",local:"transformers.CLIPVisionModelWithProjection ][ transformers.CLIPVisionModelWithProjection",headingTag:"h2"}}),Ee=new U({props:{name:"class transformers.CLIPVisionModelWithProjection",anchor:"transformers.CLIPVisionModelWithProjection",parameters:[{name:"config",val:": CLIPVisionConfig"}],parametersDescription:[{anchor:"transformers.CLIPVisionModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionConfig">CLIPVisionConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1148"}}),Ut=new U({props:{name:"forward",anchor:"transformers.CLIPVisionModelWithProjection.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPVisionModelWithProjection.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CLIPVisionModelWithProjection.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.CLIPVisionModelWithProjection.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.CLIPVisionModelWithProjection.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1167",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clip.modeling_clip.CLIPVisionModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clip.modeling_clip.CLIPVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wt=new Mt({props:{$$slots:{default:[Ca]},$$scope:{ctx:v}}}),qt=new Ze({props:{anchor:"transformers.CLIPVisionModelWithProjection.forward.example",$$slots:{default:[Ia]},$$scope:{ctx:v}}}),co=new H({props:{title:"CLIPVisionModel",local:"transformers.CLIPVisionModel ][ transformers.CLIPVisionModel",headingTag:"h2"}}),po=new U({props:{name:"class transformers.CLIPVisionModel",anchor:"transformers.CLIPVisionModel",parameters:[{name:"config",val:": CLIPVisionConfig"}],parametersDescription:[{anchor:"transformers.CLIPVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionConfig">CLIPVisionConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L803"}}),Dt=new U({props:{name:"forward",anchor:"transformers.CLIPVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CLIPVisionModel.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.CLIPVisionModel.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.CLIPVisionModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L822",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),eo=new Mt({props:{$$slots:{default:[$a]},$$scope:{ctx:v}}}),zt=new Ze({props:{anchor:"transformers.CLIPVisionModel.forward.example",$$slots:{default:[wa]},$$scope:{ctx:v}}}),to=new H({props:{title:"CLIPForImageClassification",local:"transformers.CLIPForImageClassification ][ transformers.CLIPForImageClassification",headingTag:"h2"}}),vt=new U({props:{name:"class transformers.CLIPForImageClassification",anchor:"transformers.CLIPForImageClassification",parameters:[{name:"config",val:": CLIPConfig"}],parametersDescription:[{anchor:"transformers.CLIPForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1213"}}),uo=new U({props:{name:"forward",anchor:"transformers.CLIPForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CLIPForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"},{anchor:"transformers.CLIPForImageClassification.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.CLIPForImageClassification.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1237",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_t=new Mt({props:{$$slots:{default:[va]},$$scope:{ctx:v}}}),xt=new Ze({props:{anchor:"transformers.CLIPForImageClassification.forward.example",$$slots:{default:[xa]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment),b=r(),n=c("div"),g(a.$$.fragment),y=r(),o=c("p"),o.textContent=I,Oe=r(),E=c("p"),E.innerHTML=Ke,et=r(),B=c("p"),B.innerHTML=qe,ee=r(),L=c("div"),g(re.$$.fragment),tt=r(),S=c("p"),S.innerHTML=gt,Be=r(),g(ie.$$.fragment),He=r(),g(Me.$$.fragment),te=r(),ue=c("div"),g(oe.$$.fragment),ht=r(),g(_e.$$.fragment),xe=r(),ye=c("div"),g(Te.$$.fragment),Ce=r(),g(Ie.$$.fragment),Q=r(),g(le.$$.fragment),je=r(),N=c("div"),g(ke.$$.fragment),Se=r(),ne=c("p"),ne.textContent=ot,$e=r(),O=c("p"),O.innerHTML=pe,Jt=r(),se=c("p"),se.innerHTML=Ue,yt=r(),z=c("div"),g(ze.$$.fragment),Ne=r(),me=c("p"),me.innerHTML=ct,Qe=r(),g(X.$$.fragment),Pe=r(),g(we.$$.fragment),de=r(),g(q.$$.fragment),Ct=r(),W=c("div"),g(ge.$$.fragment),It=r(),Z=c("p"),Z.textContent=ft,Ge=r(),he=c("p"),he.innerHTML=pt,Ye=r(),ae=c("p"),ae.innerHTML=nt,ve=r(),G=c("div"),g(w.$$.fragment),P=r(),Y=c("p"),Y.innerHTML=be,Fe=r(),g(D.$$.fragment),ce=r(),g(A.$$.fragment),K=r(),g($.$$.fragment),k=r(),V=c("div"),g(Ee.$$.fragment),$t=r(),Ve=c("p"),Ve.textContent=st,at=r(),Re=c("p"),Re.innerHTML=jt,Le=r(),Bt=c("p"),Bt.innerHTML=io,pn=r(),ut=c("div"),g(Ut.$$.fragment),mn=r(),Kt=c("p"),Kt.innerHTML=lo,Io=r(),g(wt.$$.fragment),gn=r(),g(qt.$$.fragment),Yt=r(),g(co.$$.fragment),Mo=r(),Je=c("div"),g(po.$$.fragment),$o=r(),Nt=c("p"),Nt.textContent=Zn,wo=r(),Gt=c("p"),Gt.innerHTML=Bn,vo=r(),Et=c("p"),Et.innerHTML=Nn,xo=r(),De=c("div"),g(Dt.$$.fragment),rt=r(),Rt=c("p"),Rt.innerHTML=hn,mo=r(),g(eo.$$.fragment),Bo=r(),g(zt.$$.fragment),No=r(),g(to.$$.fragment),Ht=r(),it=c("div"),g(vt.$$.fragment),oo=r(),go=c("p"),go.textContent=yo,fn=r(),no=c("p"),no.innerHTML=ho,ko=r(),Ae=c("p"),Ae.innerHTML=fo,Go=r(),lt=c("div"),g(uo.$$.fragment),Eo=r(),St=c("p"),St.innerHTML=Gn,Ro=r(),g(_t.$$.fragment),Po=r(),g(xt.$$.fragment),this.h()},l(m){h(t.$$.fragment,m),b=i(m),n=p(m,"DIV",{class:!0});var x=J(n);h(a.$$.fragment,x),y=i(x),o=p(x,"P",{"data-svelte-h":!0}),C(o)!=="svelte-1c4hqtm"&&(o.textContent=I),Oe=i(x),E=p(x,"P",{"data-svelte-h":!0}),C(E)!=="svelte-u3dlub"&&(E.innerHTML=Ke),et=i(x),B=p(x,"P",{"data-svelte-h":!0}),C(B)!=="svelte-hswkmf"&&(B.innerHTML=qe),ee=i(x),L=p(x,"DIV",{class:!0});var Ft=J(L);h(re.$$.fragment,Ft),tt=i(Ft),S=p(Ft,"P",{"data-svelte-h":!0}),C(S)!=="svelte-fgx200"&&(S.innerHTML=gt),Be=i(Ft),h(ie.$$.fragment,Ft),He=i(Ft),h(Me.$$.fragment,Ft),Ft.forEach(s),te=i(x),ue=p(x,"DIV",{class:!0});var Xt=J(ue);h(oe.$$.fragment,Xt),ht=i(Xt),h(_e.$$.fragment,Xt),Xt.forEach(s),xe=i(x),ye=p(x,"DIV",{class:!0});var _o=J(ye);h(Te.$$.fragment,_o),Ce=i(_o),h(Ie.$$.fragment,_o),_o.forEach(s),x.forEach(s),Q=i(m),h(le.$$.fragment,m),je=i(m),N=p(m,"DIV",{class:!0});var Tt=J(N);h(ke.$$.fragment,Tt),Se=i(Tt),ne=p(Tt,"P",{"data-svelte-h":!0}),C(ne)!=="svelte-xyko69"&&(ne.textContent=ot),$e=i(Tt),O=p(Tt,"P",{"data-svelte-h":!0}),C(O)!=="svelte-u3dlub"&&(O.innerHTML=pe),Jt=i(Tt),se=p(Tt,"P",{"data-svelte-h":!0}),C(se)!=="svelte-hswkmf"&&(se.innerHTML=Ue),yt=i(Tt),z=p(Tt,"DIV",{class:!0});var mt=J(z);h(ze.$$.fragment,mt),Ne=i(mt),me=p(mt,"P",{"data-svelte-h":!0}),C(me)!=="svelte-drtvo4"&&(me.innerHTML=ct),Qe=i(mt),h(X.$$.fragment,mt),Pe=i(mt),h(we.$$.fragment,mt),mt.forEach(s),Tt.forEach(s),de=i(m),h(q.$$.fragment,m),Ct=i(m),W=p(m,"DIV",{class:!0});var kt=J(W);h(ge.$$.fragment,kt),It=i(kt),Z=p(kt,"P",{"data-svelte-h":!0}),C(Z)!=="svelte-y0dqrx"&&(Z.textContent=ft),Ge=i(kt),he=p(kt,"P",{"data-svelte-h":!0}),C(he)!=="svelte-u3dlub"&&(he.innerHTML=pt),Ye=i(kt),ae=p(kt,"P",{"data-svelte-h":!0}),C(ae)!=="svelte-hswkmf"&&(ae.innerHTML=nt),ve=i(kt),G=p(kt,"DIV",{class:!0});var Vt=J(G);h(w.$$.fragment,Vt),P=i(Vt),Y=p(Vt,"P",{"data-svelte-h":!0}),C(Y)!=="svelte-1bq9vak"&&(Y.innerHTML=be),Fe=i(Vt),h(D.$$.fragment,Vt),ce=i(Vt),h(A.$$.fragment,Vt),Vt.forEach(s),kt.forEach(s),K=i(m),h($.$$.fragment,m),k=i(m),V=p(m,"DIV",{class:!0});var We=J(V);h(Ee.$$.fragment,We),$t=i(We),Ve=p(We,"P",{"data-svelte-h":!0}),C(Ve)!=="svelte-y0dqrx"&&(Ve.textContent=st),at=i(We),Re=p(We,"P",{"data-svelte-h":!0}),C(Re)!=="svelte-u3dlub"&&(Re.innerHTML=jt),Le=i(We),Bt=p(We,"P",{"data-svelte-h":!0}),C(Bt)!=="svelte-hswkmf"&&(Bt.innerHTML=io),pn=i(We),ut=p(We,"DIV",{class:!0});var Pt=J(ut);h(Ut.$$.fragment,Pt),mn=i(Pt),Kt=p(Pt,"P",{"data-svelte-h":!0}),C(Kt)!=="svelte-jtbu7o"&&(Kt.innerHTML=lo),Io=i(Pt),h(wt.$$.fragment,Pt),gn=i(Pt),h(qt.$$.fragment,Pt),Pt.forEach(s),We.forEach(s),Yt=i(m),h(co.$$.fragment,m),Mo=i(m),Je=p(m,"DIV",{class:!0});var Xe=J(Je);h(po.$$.fragment,Xe),$o=i(Xe),Nt=p(Xe,"P",{"data-svelte-h":!0}),C(Nt)!=="svelte-w8p7b8"&&(Nt.textContent=Zn),wo=i(Xe),Gt=p(Xe,"P",{"data-svelte-h":!0}),C(Gt)!=="svelte-u3dlub"&&(Gt.innerHTML=Bn),vo=i(Xe),Et=p(Xe,"P",{"data-svelte-h":!0}),C(Et)!=="svelte-hswkmf"&&(Et.innerHTML=Nn),xo=i(Xe),De=p(Xe,"DIV",{class:!0});var Lt=J(De);h(Dt.$$.fragment,Lt),rt=i(Lt),Rt=p(Lt,"P",{"data-svelte-h":!0}),C(Rt)!=="svelte-mlitxw"&&(Rt.innerHTML=hn),mo=i(Lt),h(eo.$$.fragment,Lt),Bo=i(Lt),h(zt.$$.fragment,Lt),Lt.forEach(s),Xe.forEach(s),No=i(m),h(to.$$.fragment,m),Ht=i(m),it=p(m,"DIV",{class:!0});var R=J(it);h(vt.$$.fragment,R),oo=i(R),go=p(R,"P",{"data-svelte-h":!0}),C(go)!=="svelte-fhevdc"&&(go.textContent=yo),fn=i(R),no=p(R,"P",{"data-svelte-h":!0}),C(no)!=="svelte-u3dlub"&&(no.innerHTML=ho),ko=i(R),Ae=p(R,"P",{"data-svelte-h":!0}),C(Ae)!=="svelte-hswkmf"&&(Ae.innerHTML=fo),Go=i(R),lt=p(R,"DIV",{class:!0});var dt=J(lt);h(uo.$$.fragment,dt),Eo=i(dt),St=p(dt,"P",{"data-svelte-h":!0}),C(St)!=="svelte-1urmkqo"&&(St.innerHTML=Gn),Ro=i(dt),h(_t.$$.fragment,dt),Po=i(dt),h(xt.$$.fragment,dt),dt.forEach(s),R.forEach(s),this.h()},h(){j(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(m,x){f(t,m,x),d(m,b,x),d(m,n,x),f(a,n,null),l(n,y),l(n,o),l(n,Oe),l(n,E),l(n,et),l(n,B),l(n,ee),l(n,L),f(re,L,null),l(L,tt),l(L,S),l(L,Be),f(ie,L,null),l(L,He),f(Me,L,null),l(n,te),l(n,ue),f(oe,ue,null),l(ue,ht),f(_e,ue,null),l(n,xe),l(n,ye),f(Te,ye,null),l(ye,Ce),f(Ie,ye,null),d(m,Q,x),f(le,m,x),d(m,je,x),d(m,N,x),f(ke,N,null),l(N,Se),l(N,ne),l(N,$e),l(N,O),l(N,Jt),l(N,se),l(N,yt),l(N,z),f(ze,z,null),l(z,Ne),l(z,me),l(z,Qe),f(X,z,null),l(z,Pe),f(we,z,null),d(m,de,x),f(q,m,x),d(m,Ct,x),d(m,W,x),f(ge,W,null),l(W,It),l(W,Z),l(W,Ge),l(W,he),l(W,Ye),l(W,ae),l(W,ve),l(W,G),f(w,G,null),l(G,P),l(G,Y),l(G,Fe),f(D,G,null),l(G,ce),f(A,G,null),d(m,K,x),f($,m,x),d(m,k,x),d(m,V,x),f(Ee,V,null),l(V,$t),l(V,Ve),l(V,at),l(V,Re),l(V,Le),l(V,Bt),l(V,pn),l(V,ut),f(Ut,ut,null),l(ut,mn),l(ut,Kt),l(ut,Io),f(wt,ut,null),l(ut,gn),f(qt,ut,null),d(m,Yt,x),f(co,m,x),d(m,Mo,x),d(m,Je,x),f(po,Je,null),l(Je,$o),l(Je,Nt),l(Je,wo),l(Je,Gt),l(Je,vo),l(Je,Et),l(Je,xo),l(Je,De),f(Dt,De,null),l(De,rt),l(De,Rt),l(De,mo),f(eo,De,null),l(De,Bo),f(zt,De,null),d(m,No,x),f(to,m,x),d(m,Ht,x),d(m,it,x),f(vt,it,null),l(it,oo),l(it,go),l(it,fn),l(it,no),l(it,ko),l(it,Ae),l(it,Go),l(it,lt),f(uo,lt,null),l(lt,Eo),l(lt,St),l(lt,Ro),f(_t,lt,null),l(lt,Po),f(xt,lt,null),Co=!0},p(m,x){const Ft={};x&2&&(Ft.$$scope={dirty:x,ctx:m}),ie.$set(Ft);const Xt={};x&2&&(Xt.$$scope={dirty:x,ctx:m}),Me.$set(Xt);const _o={};x&2&&(_o.$$scope={dirty:x,ctx:m}),_e.$set(_o);const Tt={};x&2&&(Tt.$$scope={dirty:x,ctx:m}),Ie.$set(Tt);const mt={};x&2&&(mt.$$scope={dirty:x,ctx:m}),X.$set(mt);const kt={};x&2&&(kt.$$scope={dirty:x,ctx:m}),we.$set(kt);const Vt={};x&2&&(Vt.$$scope={dirty:x,ctx:m}),D.$set(Vt);const We={};x&2&&(We.$$scope={dirty:x,ctx:m}),A.$set(We);const Pt={};x&2&&(Pt.$$scope={dirty:x,ctx:m}),wt.$set(Pt);const Xe={};x&2&&(Xe.$$scope={dirty:x,ctx:m}),qt.$set(Xe);const Lt={};x&2&&(Lt.$$scope={dirty:x,ctx:m}),eo.$set(Lt);const R={};x&2&&(R.$$scope={dirty:x,ctx:m}),zt.$set(R);const dt={};x&2&&(dt.$$scope={dirty:x,ctx:m}),_t.$set(dt);const un={};x&2&&(un.$$scope={dirty:x,ctx:m}),xt.$set(un)},i(m){Co||(u(t.$$.fragment,m),u(a.$$.fragment,m),u(re.$$.fragment,m),u(ie.$$.fragment,m),u(Me.$$.fragment,m),u(oe.$$.fragment,m),u(_e.$$.fragment,m),u(Te.$$.fragment,m),u(Ie.$$.fragment,m),u(le.$$.fragment,m),u(ke.$$.fragment,m),u(ze.$$.fragment,m),u(X.$$.fragment,m),u(we.$$.fragment,m),u(q.$$.fragment,m),u(ge.$$.fragment,m),u(w.$$.fragment,m),u(D.$$.fragment,m),u(A.$$.fragment,m),u($.$$.fragment,m),u(Ee.$$.fragment,m),u(Ut.$$.fragment,m),u(wt.$$.fragment,m),u(qt.$$.fragment,m),u(co.$$.fragment,m),u(po.$$.fragment,m),u(Dt.$$.fragment,m),u(eo.$$.fragment,m),u(zt.$$.fragment,m),u(to.$$.fragment,m),u(vt.$$.fragment,m),u(uo.$$.fragment,m),u(_t.$$.fragment,m),u(xt.$$.fragment,m),Co=!0)},o(m){_(t.$$.fragment,m),_(a.$$.fragment,m),_(re.$$.fragment,m),_(ie.$$.fragment,m),_(Me.$$.fragment,m),_(oe.$$.fragment,m),_(_e.$$.fragment,m),_(Te.$$.fragment,m),_(Ie.$$.fragment,m),_(le.$$.fragment,m),_(ke.$$.fragment,m),_(ze.$$.fragment,m),_(X.$$.fragment,m),_(we.$$.fragment,m),_(q.$$.fragment,m),_(ge.$$.fragment,m),_(w.$$.fragment,m),_(D.$$.fragment,m),_(A.$$.fragment,m),_($.$$.fragment,m),_(Ee.$$.fragment,m),_(Ut.$$.fragment,m),_(wt.$$.fragment,m),_(qt.$$.fragment,m),_(co.$$.fragment,m),_(po.$$.fragment,m),_(Dt.$$.fragment,m),_(eo.$$.fragment,m),_(zt.$$.fragment,m),_(to.$$.fragment,m),_(vt.$$.fragment,m),_(uo.$$.fragment,m),_(_t.$$.fragment,m),_(xt.$$.fragment,m),Co=!1},d(m){m&&(s(b),s(n),s(Q),s(je),s(N),s(de),s(Ct),s(W),s(K),s(k),s(V),s(Yt),s(Mo),s(Je),s(No),s(Ht),s(it)),T(t,m),T(a),T(re),T(ie),T(Me),T(oe),T(_e),T(Te),T(Ie),T(le,m),T(ke),T(ze),T(X),T(we),T(q,m),T(ge),T(w),T(D),T(A),T($,m),T(Ee),T(Ut),T(wt),T(qt),T(co,m),T(po),T(Dt),T(eo),T(zt),T(to,m),T(vt),T(uo),T(_t),T(xt)}}}function Pa(v){let t,b;return t=new zs({props:{$$slots:{default:[ka]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment)},l(n){h(t.$$.fragment,n)},m(n,a){f(t,n,a),b=!0},p(n,a){const y={};a&2&&(y.$$scope={dirty:a,ctx:n}),t.$set(y)},i(n){b||(u(t.$$.fragment,n),b=!0)},o(n){_(t.$$.fragment,n),b=!1},d(n){T(t,n)}}}function La(v){let t,b="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,a,y="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,I,Oe=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,E,Ke,et=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,B,qe,ee=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=c("p"),t.innerHTML=b,n=r(),a=c("ul"),a.innerHTML=y,o=r(),I=c("p"),I.innerHTML=Oe,E=r(),Ke=c("ul"),Ke.innerHTML=et,B=r(),qe=c("p"),qe.innerHTML=ee},l(L){t=p(L,"P",{"data-svelte-h":!0}),C(t)!=="svelte-1ajbfxg"&&(t.innerHTML=b),n=i(L),a=p(L,"UL",{"data-svelte-h":!0}),C(a)!=="svelte-qm1t26"&&(a.innerHTML=y),o=i(L),I=p(L,"P",{"data-svelte-h":!0}),C(I)!=="svelte-1v9qsc5"&&(I.innerHTML=Oe),E=i(L),Ke=p(L,"UL",{"data-svelte-h":!0}),C(Ke)!=="svelte-15scerc"&&(Ke.innerHTML=et),B=i(L),qe=p(L,"P",{"data-svelte-h":!0}),C(qe)!=="svelte-1an3odd"&&(qe.innerHTML=ee)},m(L,re){d(L,t,re),d(L,n,re),d(L,a,re),d(L,o,re),d(L,I,re),d(L,E,re),d(L,Ke,re),d(L,B,re),d(L,qe,re)},p:F,d(L){L&&(s(t),s(n),s(a),s(o),s(I),s(E),s(Ke),s(B),s(qe))}}}function Ja(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function ja(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvUHJvY2Vzc29yJTJDJTIwVEZDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFRGQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwdGYubm4uc29mdG1heChsb2dpdHNfcGVyX2ltYWdlJTJDJTIwYXhpcyUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><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, TFCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = tf.nn.softmax(logits_per_image, axis=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ua(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function za(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEF0ZXh0X2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X3RleHRfZmVhdHVyZXMoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Fa(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Va(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQ0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkNMSVBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",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, TFCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Wa(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Za(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNMSVBUZXh0TW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFRGQ0xJUFRleHRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwKEVPUyUyMHRva2VuKSUyMHN0YXRlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCLIPTextModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;tf&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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ba(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Na(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQ0xJUFZpc2lvbk1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkNMSVBWaXNpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVkX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMENMUyUyMHN0YXRlcw==",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, TFCLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>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(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ga(v){let t,b,n,a,y,o,I=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Oe,E,Ke=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,et,B,qe,ee,L,re,tt,S='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.TFCLIPModel">TFCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',gt,Be,ie,He,Me,te,ue,oe,ht,_e='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.TFCLIPModel">TFCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',xe,ye,Te,Ce,Ie,Q,le,je,N,ke='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.TFCLIPModel">TFCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Se,ne,ot,$e,O,pe,Jt,se,Ue,yt,z,ze,Ne,me,ct='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.TFCLIPTextModel">TFCLIPTextModel</a> forward method, overrides the <code>__call__</code> special method.',Qe,X,Pe,we,de,q,Ct,W,ge,It,Z,ft,Ge,he,pt='The <a href="/docs/transformers/main/ko/model_doc/clip#transformers.TFCLIPVisionModel">TFCLIPVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Ye,ae,nt,ve,G;return t=new H({props:{title:"TFCLIPModel",local:"transformers.TFCLIPModel ][ transformers.TFCLIPModel",headingTag:"h2"}}),a=new U({props:{name:"class transformers.TFCLIPModel",anchor:"transformers.TFCLIPModel",parameters:[{name:"config",val:": CLIPConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/ko/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1300"}}),B=new Mt({props:{$$slots:{default:[La]},$$scope:{ctx:v}}}),L=new U({props:{name:"call",anchor:"transformers.TFCLIPModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"return_loss",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> <code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFCLIPModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPModel.call.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.TFCLIPModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1391",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>transformers.models.clip.modeling_tf_clip.TFCLIPOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Be=new Mt({props:{$$slots:{default:[Ja]},$$scope:{ctx:v}}}),He=new Ze({props:{anchor:"transformers.TFCLIPModel.call.example",$$slots:{default:[ja]},$$scope:{ctx:v}}}),ue=new U({props:{name:"get_text_features",anchor:"transformers.TFCLIPModel.get_text_features",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPModel.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPModel.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.get_text_features.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1309",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p>text_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ye=new Mt({props:{$$slots:{default:[Ua]},$$scope:{ctx:v}}}),Ce=new Ze({props:{anchor:"transformers.TFCLIPModel.get_text_features.example",$$slots:{default:[za]},$$scope:{ctx:v}}}),le=new U({props:{name:"get_image_features",anchor:"transformers.TFCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details. 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. This argument can be used only in eager mode, in graph mode the value in the config will be used
instead.`,name:"pixel_values"},{anchor:"transformers.TFCLIPModel.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.get_image_features.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1349",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p>image_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ne=new Mt({props:{$$slots:{default:[Fa]},$$scope:{ctx:v}}}),$e=new Ze({props:{anchor:"transformers.TFCLIPModel.get_image_features.example",$$slots:{default:[Va]},$$scope:{ctx:v}}}),pe=new H({props:{title:"TFCLIPTextModel",local:"transformers.TFCLIPTextModel ][ transformers.TFCLIPTextModel",headingTag:"h2"}}),Ue=new U({props:{name:"class transformers.TFCLIPTextModel",anchor:"transformers.TFCLIPTextModel",parameters:[{name:"config",val:": CLIPTextConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1178"}}),ze=new U({props:{name:"call",anchor:"transformers.TFCLIPTextModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCLIPTextModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPTextModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPTextModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPTextModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPTextModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPTextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPTextModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1186",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),X=new Mt({props:{$$slots:{default:[Wa]},$$scope:{ctx:v}}}),we=new Ze({props:{anchor:"transformers.TFCLIPTextModel.call.example",$$slots:{default:[Za]},$$scope:{ctx:v}}}),q=new H({props:{title:"TFCLIPVisionModel",local:"transformers.TFCLIPVisionModel ][ transformers.TFCLIPVisionModel",headingTag:"h2"}}),ge=new U({props:{name:"class transformers.TFCLIPVisionModel",anchor:"transformers.TFCLIPVisionModel",parameters:[{name:"config",val:": CLIPVisionConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1238"}}),ft=new U({props:{name:"call",anchor:"transformers.TFCLIPVisionModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCLIPVisionModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details. 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. This argument can be used only in eager mode, in graph mode the value in the config will be used
instead.`,name:"pixel_values"},{anchor:"transformers.TFCLIPVisionModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPVisionModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPVisionModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1247",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ae=new Mt({props:{$$slots:{default:[Ba]},$$scope:{ctx:v}}}),ve=new Ze({props:{anchor:"transformers.TFCLIPVisionModel.call.example",$$slots:{default:[Na]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment),b=r(),n=c("div"),g(a.$$.fragment),y=r(),o=c("p"),o.innerHTML=I,Oe=r(),E=c("p"),E.innerHTML=Ke,et=r(),g(B.$$.fragment),qe=r(),ee=c("div"),g(L.$$.fragment),re=r(),tt=c("p"),tt.innerHTML=S,gt=r(),g(Be.$$.fragment),ie=r(),g(He.$$.fragment),Me=r(),te=c("div"),g(ue.$$.fragment),oe=r(),ht=c("p"),ht.innerHTML=_e,xe=r(),g(ye.$$.fragment),Te=r(),g(Ce.$$.fragment),Ie=r(),Q=c("div"),g(le.$$.fragment),je=r(),N=c("p"),N.innerHTML=ke,Se=r(),g(ne.$$.fragment),ot=r(),g($e.$$.fragment),O=r(),g(pe.$$.fragment),Jt=r(),se=c("div"),g(Ue.$$.fragment),yt=r(),z=c("div"),g(ze.$$.fragment),Ne=r(),me=c("p"),me.innerHTML=ct,Qe=r(),g(X.$$.fragment),Pe=r(),g(we.$$.fragment),de=r(),g(q.$$.fragment),Ct=r(),W=c("div"),g(ge.$$.fragment),It=r(),Z=c("div"),g(ft.$$.fragment),Ge=r(),he=c("p"),he.innerHTML=pt,Ye=r(),g(ae.$$.fragment),nt=r(),g(ve.$$.fragment),this.h()},l(w){h(t.$$.fragment,w),b=i(w),n=p(w,"DIV",{class:!0});var P=J(n);h(a.$$.fragment,P),y=i(P),o=p(P,"P",{"data-svelte-h":!0}),C(o)!=="svelte-3ge3jn"&&(o.innerHTML=I),Oe=i(P),E=p(P,"P",{"data-svelte-h":!0}),C(E)!=="svelte-1be7e3c"&&(E.innerHTML=Ke),et=i(P),h(B.$$.fragment,P),qe=i(P),ee=p(P,"DIV",{class:!0});var Y=J(ee);h(L.$$.fragment,Y),re=i(Y),tt=p(Y,"P",{"data-svelte-h":!0}),C(tt)!=="svelte-ujyrd0"&&(tt.innerHTML=S),gt=i(Y),h(Be.$$.fragment,Y),ie=i(Y),h(He.$$.fragment,Y),Y.forEach(s),Me=i(P),te=p(P,"DIV",{class:!0});var be=J(te);h(ue.$$.fragment,be),oe=i(be),ht=p(be,"P",{"data-svelte-h":!0}),C(ht)!=="svelte-ujyrd0"&&(ht.innerHTML=_e),xe=i(be),h(ye.$$.fragment,be),Te=i(be),h(Ce.$$.fragment,be),be.forEach(s),Ie=i(P),Q=p(P,"DIV",{class:!0});var Fe=J(Q);h(le.$$.fragment,Fe),je=i(Fe),N=p(Fe,"P",{"data-svelte-h":!0}),C(N)!=="svelte-ujyrd0"&&(N.innerHTML=ke),Se=i(Fe),h(ne.$$.fragment,Fe),ot=i(Fe),h($e.$$.fragment,Fe),Fe.forEach(s),P.forEach(s),O=i(w),h(pe.$$.fragment,w),Jt=i(w),se=p(w,"DIV",{class:!0});var D=J(se);h(Ue.$$.fragment,D),yt=i(D),z=p(D,"DIV",{class:!0});var ce=J(z);h(ze.$$.fragment,ce),Ne=i(ce),me=p(ce,"P",{"data-svelte-h":!0}),C(me)!=="svelte-165duvk"&&(me.innerHTML=ct),Qe=i(ce),h(X.$$.fragment,ce),Pe=i(ce),h(we.$$.fragment,ce),ce.forEach(s),D.forEach(s),de=i(w),h(q.$$.fragment,w),Ct=i(w),W=p(w,"DIV",{class:!0});var A=J(W);h(ge.$$.fragment,A),It=i(A),Z=p(A,"DIV",{class:!0});var K=J(Z);h(ft.$$.fragment,K),Ge=i(K),he=p(K,"P",{"data-svelte-h":!0}),C(he)!=="svelte-1z0db48"&&(he.innerHTML=pt),Ye=i(K),h(ae.$$.fragment,K),nt=i(K),h(ve.$$.fragment,K),K.forEach(s),A.forEach(s),this.h()},h(){j(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(w,P){f(t,w,P),d(w,b,P),d(w,n,P),f(a,n,null),l(n,y),l(n,o),l(n,Oe),l(n,E),l(n,et),f(B,n,null),l(n,qe),l(n,ee),f(L,ee,null),l(ee,re),l(ee,tt),l(ee,gt),f(Be,ee,null),l(ee,ie),f(He,ee,null),l(n,Me),l(n,te),f(ue,te,null),l(te,oe),l(te,ht),l(te,xe),f(ye,te,null),l(te,Te),f(Ce,te,null),l(n,Ie),l(n,Q),f(le,Q,null),l(Q,je),l(Q,N),l(Q,Se),f(ne,Q,null),l(Q,ot),f($e,Q,null),d(w,O,P),f(pe,w,P),d(w,Jt,P),d(w,se,P),f(Ue,se,null),l(se,yt),l(se,z),f(ze,z,null),l(z,Ne),l(z,me),l(z,Qe),f(X,z,null),l(z,Pe),f(we,z,null),d(w,de,P),f(q,w,P),d(w,Ct,P),d(w,W,P),f(ge,W,null),l(W,It),l(W,Z),f(ft,Z,null),l(Z,Ge),l(Z,he),l(Z,Ye),f(ae,Z,null),l(Z,nt),f(ve,Z,null),G=!0},p(w,P){const Y={};P&2&&(Y.$$scope={dirty:P,ctx:w}),B.$set(Y);const be={};P&2&&(be.$$scope={dirty:P,ctx:w}),Be.$set(be);const Fe={};P&2&&(Fe.$$scope={dirty:P,ctx:w}),He.$set(Fe);const D={};P&2&&(D.$$scope={dirty:P,ctx:w}),ye.$set(D);const ce={};P&2&&(ce.$$scope={dirty:P,ctx:w}),Ce.$set(ce);const A={};P&2&&(A.$$scope={dirty:P,ctx:w}),ne.$set(A);const K={};P&2&&(K.$$scope={dirty:P,ctx:w}),$e.$set(K);const $={};P&2&&($.$$scope={dirty:P,ctx:w}),X.$set($);const k={};P&2&&(k.$$scope={dirty:P,ctx:w}),we.$set(k);const V={};P&2&&(V.$$scope={dirty:P,ctx:w}),ae.$set(V);const Ee={};P&2&&(Ee.$$scope={dirty:P,ctx:w}),ve.$set(Ee)},i(w){G||(u(t.$$.fragment,w),u(a.$$.fragment,w),u(B.$$.fragment,w),u(L.$$.fragment,w),u(Be.$$.fragment,w),u(He.$$.fragment,w),u(ue.$$.fragment,w),u(ye.$$.fragment,w),u(Ce.$$.fragment,w),u(le.$$.fragment,w),u(ne.$$.fragment,w),u($e.$$.fragment,w),u(pe.$$.fragment,w),u(Ue.$$.fragment,w),u(ze.$$.fragment,w),u(X.$$.fragment,w),u(we.$$.fragment,w),u(q.$$.fragment,w),u(ge.$$.fragment,w),u(ft.$$.fragment,w),u(ae.$$.fragment,w),u(ve.$$.fragment,w),G=!0)},o(w){_(t.$$.fragment,w),_(a.$$.fragment,w),_(B.$$.fragment,w),_(L.$$.fragment,w),_(Be.$$.fragment,w),_(He.$$.fragment,w),_(ue.$$.fragment,w),_(ye.$$.fragment,w),_(Ce.$$.fragment,w),_(le.$$.fragment,w),_(ne.$$.fragment,w),_($e.$$.fragment,w),_(pe.$$.fragment,w),_(Ue.$$.fragment,w),_(ze.$$.fragment,w),_(X.$$.fragment,w),_(we.$$.fragment,w),_(q.$$.fragment,w),_(ge.$$.fragment,w),_(ft.$$.fragment,w),_(ae.$$.fragment,w),_(ve.$$.fragment,w),G=!1},d(w){w&&(s(b),s(n),s(O),s(Jt),s(se),s(de),s(Ct),s(W)),T(t,w),T(a),T(B),T(L),T(Be),T(He),T(ue),T(ye),T(Ce),T(le),T(ne),T($e),T(pe,w),T(Ue),T(ze),T(X),T(we),T(q,w),T(ge),T(ft),T(ae),T(ve)}}}function Ea(v){let t,b;return t=new zs({props:{$$slots:{default:[Ga]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment)},l(n){h(t.$$.fragment,n)},m(n,a){f(t,n,a),b=!0},p(n,a){const y={};a&2&&(y.$$scope={dirty:a,ctx:n}),t.$set(y)},i(n){b||(u(t.$$.fragment,n),b=!0)},o(n){_(t.$$.fragment,n),b=!1},d(n){T(t,n)}}}function Ra(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Xa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"aW1wb3J0JTIwamF4JTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMEElMjAlMjAlMjAlMjB0ZXh0JTNEJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyJTJDJTIwcGFkZGluZyUzRFRydWUlMEEpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMjAlMjAlMjMlMjB0aGlzJTIwaXMlMjB0aGUlMjBpbWFnZS10ZXh0JTIwc2ltaWxhcml0eSUyMHNjb3JlJTBBcHJvYnMlMjAlM0QlMjBqYXgubm4uc29mdG1heChsb2dpdHNfcGVyX2ltYWdlJTJDJTIwYXhpcyUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax
<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, FlaxCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = jax.nn.softmax(logits_per_image, axis=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function qa(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4Q0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ha(v){let t,b="Examples:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBaW1hZ2VfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfaW1hZ2VfZmVhdHVyZXMoKippbnB1dHMp",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, FlaxCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-kvfsh7"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Sa(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Qa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUFRleHRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheENMSVBUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVyX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMChFT1MlMjB0b2tlbiklMjBzdGF0ZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPTextModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;np&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>pooler_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ya(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Da(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUFRleHRNb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4Q0xJUFRleHRNb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXRleHRfZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy50ZXh0X2VtYmVkcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPTextModelWithProjection

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPTextModelWithProjection.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeds = outputs.text_embeds`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Aa(v){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=c("p"),t.innerHTML=b},l(n){t=p(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(n,a){d(n,t,a)},p:F,d(n){n&&s(t)}}}function Oa(v){let t,b="Example:",n,a,y;return a=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQVmlzaW9uTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlcl9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjBDTFMlMjBzdGF0ZXM=",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, FlaxCLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxCLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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;np&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>pooler_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,n=r(),g(a.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=b),n=i(o),h(a.$$.fragment,o)},m(o,I){d(o,t,I),d(o,n,I),f(a,o,I),y=!0},p:F,i(o){y||(u(a.$$.fragment,o),y=!0)},o(o){_(a.$$.fragment,o),y=!1},d(o){o&&(s(t),s(n)),T(a,o)}}}function Ka(v){let t,b,n,a,y,o,I=`This model inherits from <a href="/docs/transformers/main/ko/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Oe,E,Ke=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,et,B,qe="Finally, this model supports inherent JAX features such as:",ee,L,re='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',tt,S,gt,Be,ie,He="The <code>FlaxCLIPPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Me,te,ue,oe,ht,_e,xe,ye,Te,Ce,Ie,Q,le,je,N,ke,Se,ne,ot,$e,O,pe,Jt,se,Ue="The <code>FlaxCLIPTextPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",yt,z,ze,Ne,me,ct,Qe,X,Pe,we,de,q,Ct,W,ge="The <code>FlaxCLIPTextPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",It,Z,ft,Ge,he,pt,Ye,ae,nt,ve,G,w,P,Y,be="The <code>FlaxCLIPVisionPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Fe,D,ce,A,K;return t=new H({props:{title:"FlaxCLIPModel",local:"transformers.FlaxCLIPModel ][ transformers.FlaxCLIPModel",headingTag:"h2"}}),a=new U({props:{name:"class transformers.FlaxCLIPModel",anchor:"transformers.FlaxCLIPModel",parameters:[{name:"config",val:": CLIPConfig"},{name:"input_shape",val:": typing.Optional[typing.Tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/ko/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxCLIPModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1262"}}),gt=new U({props:{name:"__call__",anchor:"transformers.FlaxCLIPModel.__call__",parameters:[{name:"input_ids",val:""},{name:"pixel_values",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxCLIPModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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.FlaxCLIPModel.__call__.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlaxCLIPModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clip.modeling_flax_clip.FlaxCLIPOutput</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.clip.configuration_clip.CLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>logits_per_image:(<code>jnp.ndarray</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>jnp.ndarray</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>jnp.ndarray</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>jnp.ndarray</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.FlaxCLIPVisionModel"
>FlaxCLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>FlaxBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>FlaxBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.FlaxCLIPVisionModel"
>FlaxCLIPVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clip.modeling_flax_clip.FlaxCLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new Mt({props:{$$slots:{default:[Ra]},$$scope:{ctx:v}}}),oe=new Ze({props:{anchor:"transformers.FlaxCLIPModel.__call__.example",$$slots:{default:[Xa]},$$scope:{ctx:v}}}),xe=new U({props:{name:"get_text_features",anchor:"transformers.FlaxCLIPModel.get_text_features",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:" = False"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L865",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p>text_features (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Te=new Ze({props:{anchor:"transformers.FlaxCLIPModel.get_text_features.example",$$slots:{default:[qa]},$$scope:{ctx:v}}}),Q=new U({props:{name:"get_image_features",anchor:"transformers.FlaxCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:""},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:" = False"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained
using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L932",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p>image_features (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),je=new Ze({props:{anchor:"transformers.FlaxCLIPModel.get_image_features.example",$$slots:{default:[Ha]},$$scope:{ctx:v}}}),ke=new H({props:{title:"FlaxCLIPTextModel",local:"transformers.FlaxCLIPTextModel ][ transformers.FlaxCLIPTextModel",headingTag:"h2"}}),ot=new U({props:{name:"class transformers.FlaxCLIPTextModel",anchor:"transformers.FlaxCLIPTextModel",parameters:[{name:"config",val:": CLIPTextConfig"},{name:"input_shape",val:" = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1012"}}),pe=new U({props:{name:"__call__",anchor:"transformers.FlaxCLIPTextModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPTextModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPTextModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxCLIPTextModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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.FlaxCLIPTextModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPTextModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPTextModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L665",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),z=new Mt({props:{$$slots:{default:[Sa]},$$scope:{ctx:v}}}),Ne=new Ze({props:{anchor:"transformers.FlaxCLIPTextModel.__call__.example",$$slots:{default:[Qa]},$$scope:{ctx:v}}}),ct=new H({props:{title:"FlaxCLIPTextModelWithProjection",local:"transformers.FlaxCLIPTextModelWithProjection ][ transformers.FlaxCLIPTextModelWithProjection",headingTag:"h2"}}),Pe=new U({props:{name:"class transformers.FlaxCLIPTextModelWithProjection",anchor:"transformers.FlaxCLIPTextModelWithProjection",parameters:[{name:"config",val:": CLIPTextConfig"},{name:"input_shape",val:" = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1083"}}),q=new U({props:{name:"__call__",anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxCLIPTextModelWithProjection.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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.FlaxCLIPTextModelWithProjection.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L665",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clip.modeling_flax_clip.FlaxCLIPTextModelOutput</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.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clip.modeling_flax_clip.FlaxCLIPTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Z=new Mt({props:{$$slots:{default:[Ya]},$$scope:{ctx:v}}}),Ge=new Ze({props:{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.example",$$slots:{default:[Da]},$$scope:{ctx:v}}}),pt=new H({props:{title:"FlaxCLIPVisionModel",local:"transformers.FlaxCLIPVisionModel ][ transformers.FlaxCLIPVisionModel",headingTag:"h2"}}),nt=new U({props:{name:"class transformers.FlaxCLIPVisionModel",anchor:"transformers.FlaxCLIPVisionModel",parameters:[{name:"config",val:": CLIPVisionConfig"},{name:"input_shape",val:": typing.Optional[typing.Tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1137"}}),w=new U({props:{name:"__call__",anchor:"transformers.FlaxCLIPVisionModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": typing.Optional[dict] = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8f44315bd0> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPVisionModel.__call__.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ko/model_doc/vit#transformers.ViTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L745",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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.clip.configuration_clip.CLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),D=new Mt({props:{$$slots:{default:[Aa]},$$scope:{ctx:v}}}),A=new Ze({props:{anchor:"transformers.FlaxCLIPVisionModel.__call__.example",$$slots:{default:[Oa]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment),b=r(),n=c("div"),g(a.$$.fragment),y=r(),o=c("p"),o.innerHTML=I,Oe=r(),E=c("p"),E.innerHTML=Ke,et=r(),B=c("p"),B.textContent=qe,ee=r(),L=c("ul"),L.innerHTML=re,tt=r(),S=c("div"),g(gt.$$.fragment),Be=r(),ie=c("p"),ie.innerHTML=He,Me=r(),g(te.$$.fragment),ue=r(),g(oe.$$.fragment),ht=r(),_e=c("div"),g(xe.$$.fragment),ye=r(),g(Te.$$.fragment),Ce=r(),Ie=c("div"),g(Q.$$.fragment),le=r(),g(je.$$.fragment),N=r(),g(ke.$$.fragment),Se=r(),ne=c("div"),g(ot.$$.fragment),$e=r(),O=c("div"),g(pe.$$.fragment),Jt=r(),se=c("p"),se.innerHTML=Ue,yt=r(),g(z.$$.fragment),ze=r(),g(Ne.$$.fragment),me=r(),g(ct.$$.fragment),Qe=r(),X=c("div"),g(Pe.$$.fragment),we=r(),de=c("div"),g(q.$$.fragment),Ct=r(),W=c("p"),W.innerHTML=ge,It=r(),g(Z.$$.fragment),ft=r(),g(Ge.$$.fragment),he=r(),g(pt.$$.fragment),Ye=r(),ae=c("div"),g(nt.$$.fragment),ve=r(),G=c("div"),g(w.$$.fragment),P=r(),Y=c("p"),Y.innerHTML=be,Fe=r(),g(D.$$.fragment),ce=r(),g(A.$$.fragment),this.h()},l($){h(t.$$.fragment,$),b=i($),n=p($,"DIV",{class:!0});var k=J(n);h(a.$$.fragment,k),y=i(k),o=p(k,"P",{"data-svelte-h":!0}),C(o)!=="svelte-qqhrqm"&&(o.innerHTML=I),Oe=i(k),E=p(k,"P",{"data-svelte-h":!0}),C(E)!=="svelte-10nfsf3"&&(E.innerHTML=Ke),et=i(k),B=p(k,"P",{"data-svelte-h":!0}),C(B)!=="svelte-1pplc4a"&&(B.textContent=qe),ee=i(k),L=p(k,"UL",{"data-svelte-h":!0}),C(L)!=="svelte-1w7z84m"&&(L.innerHTML=re),tt=i(k),S=p(k,"DIV",{class:!0});var V=J(S);h(gt.$$.fragment,V),Be=i(V),ie=p(V,"P",{"data-svelte-h":!0}),C(ie)!=="svelte-qhvesh"&&(ie.innerHTML=He),Me=i(V),h(te.$$.fragment,V),ue=i(V),h(oe.$$.fragment,V),V.forEach(s),ht=i(k),_e=p(k,"DIV",{class:!0});var Ee=J(_e);h(xe.$$.fragment,Ee),ye=i(Ee),h(Te.$$.fragment,Ee),Ee.forEach(s),Ce=i(k),Ie=p(k,"DIV",{class:!0});var $t=J(Ie);h(Q.$$.fragment,$t),le=i($t),h(je.$$.fragment,$t),$t.forEach(s),k.forEach(s),N=i($),h(ke.$$.fragment,$),Se=i($),ne=p($,"DIV",{class:!0});var Ve=J(ne);h(ot.$$.fragment,Ve),$e=i(Ve),O=p(Ve,"DIV",{class:!0});var st=J(O);h(pe.$$.fragment,st),Jt=i(st),se=p(st,"P",{"data-svelte-h":!0}),C(se)!=="svelte-1v5d1sw"&&(se.innerHTML=Ue),yt=i(st),h(z.$$.fragment,st),ze=i(st),h(Ne.$$.fragment,st),st.forEach(s),Ve.forEach(s),me=i($),h(ct.$$.fragment,$),Qe=i($),X=p($,"DIV",{class:!0});var at=J(X);h(Pe.$$.fragment,at),we=i(at),de=p(at,"DIV",{class:!0});var Re=J(de);h(q.$$.fragment,Re),Ct=i(Re),W=p(Re,"P",{"data-svelte-h":!0}),C(W)!=="svelte-1v5d1sw"&&(W.innerHTML=ge),It=i(Re),h(Z.$$.fragment,Re),ft=i(Re),h(Ge.$$.fragment,Re),Re.forEach(s),at.forEach(s),he=i($),h(pt.$$.fragment,$),Ye=i($),ae=p($,"DIV",{class:!0});var jt=J(ae);h(nt.$$.fragment,jt),ve=i(jt),G=p(jt,"DIV",{class:!0});var Le=J(G);h(w.$$.fragment,Le),P=i(Le),Y=p(Le,"P",{"data-svelte-h":!0}),C(Y)!=="svelte-tkfbrd"&&(Y.innerHTML=be),Fe=i(Le),h(D.$$.fragment,Le),ce=i(Le),h(A.$$.fragment,Le),Le.forEach(s),jt.forEach(s),this.h()},h(){j(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m($,k){f(t,$,k),d($,b,k),d($,n,k),f(a,n,null),l(n,y),l(n,o),l(n,Oe),l(n,E),l(n,et),l(n,B),l(n,ee),l(n,L),l(n,tt),l(n,S),f(gt,S,null),l(S,Be),l(S,ie),l(S,Me),f(te,S,null),l(S,ue),f(oe,S,null),l(n,ht),l(n,_e),f(xe,_e,null),l(_e,ye),f(Te,_e,null),l(n,Ce),l(n,Ie),f(Q,Ie,null),l(Ie,le),f(je,Ie,null),d($,N,k),f(ke,$,k),d($,Se,k),d($,ne,k),f(ot,ne,null),l(ne,$e),l(ne,O),f(pe,O,null),l(O,Jt),l(O,se),l(O,yt),f(z,O,null),l(O,ze),f(Ne,O,null),d($,me,k),f(ct,$,k),d($,Qe,k),d($,X,k),f(Pe,X,null),l(X,we),l(X,de),f(q,de,null),l(de,Ct),l(de,W),l(de,It),f(Z,de,null),l(de,ft),f(Ge,de,null),d($,he,k),f(pt,$,k),d($,Ye,k),d($,ae,k),f(nt,ae,null),l(ae,ve),l(ae,G),f(w,G,null),l(G,P),l(G,Y),l(G,Fe),f(D,G,null),l(G,ce),f(A,G,null),K=!0},p($,k){const V={};k&2&&(V.$$scope={dirty:k,ctx:$}),te.$set(V);const Ee={};k&2&&(Ee.$$scope={dirty:k,ctx:$}),oe.$set(Ee);const $t={};k&2&&($t.$$scope={dirty:k,ctx:$}),Te.$set($t);const Ve={};k&2&&(Ve.$$scope={dirty:k,ctx:$}),je.$set(Ve);const st={};k&2&&(st.$$scope={dirty:k,ctx:$}),z.$set(st);const at={};k&2&&(at.$$scope={dirty:k,ctx:$}),Ne.$set(at);const Re={};k&2&&(Re.$$scope={dirty:k,ctx:$}),Z.$set(Re);const jt={};k&2&&(jt.$$scope={dirty:k,ctx:$}),Ge.$set(jt);const Le={};k&2&&(Le.$$scope={dirty:k,ctx:$}),D.$set(Le);const Bt={};k&2&&(Bt.$$scope={dirty:k,ctx:$}),A.$set(Bt)},i($){K||(u(t.$$.fragment,$),u(a.$$.fragment,$),u(gt.$$.fragment,$),u(te.$$.fragment,$),u(oe.$$.fragment,$),u(xe.$$.fragment,$),u(Te.$$.fragment,$),u(Q.$$.fragment,$),u(je.$$.fragment,$),u(ke.$$.fragment,$),u(ot.$$.fragment,$),u(pe.$$.fragment,$),u(z.$$.fragment,$),u(Ne.$$.fragment,$),u(ct.$$.fragment,$),u(Pe.$$.fragment,$),u(q.$$.fragment,$),u(Z.$$.fragment,$),u(Ge.$$.fragment,$),u(pt.$$.fragment,$),u(nt.$$.fragment,$),u(w.$$.fragment,$),u(D.$$.fragment,$),u(A.$$.fragment,$),K=!0)},o($){_(t.$$.fragment,$),_(a.$$.fragment,$),_(gt.$$.fragment,$),_(te.$$.fragment,$),_(oe.$$.fragment,$),_(xe.$$.fragment,$),_(Te.$$.fragment,$),_(Q.$$.fragment,$),_(je.$$.fragment,$),_(ke.$$.fragment,$),_(ot.$$.fragment,$),_(pe.$$.fragment,$),_(z.$$.fragment,$),_(Ne.$$.fragment,$),_(ct.$$.fragment,$),_(Pe.$$.fragment,$),_(q.$$.fragment,$),_(Z.$$.fragment,$),_(Ge.$$.fragment,$),_(pt.$$.fragment,$),_(nt.$$.fragment,$),_(w.$$.fragment,$),_(D.$$.fragment,$),_(A.$$.fragment,$),K=!1},d($){$&&(s(b),s(n),s(N),s(Se),s(ne),s(me),s(Qe),s(X),s(he),s(Ye),s(ae)),T(t,$),T(a),T(gt),T(te),T(oe),T(xe),T(Te),T(Q),T(je),T(ke,$),T(ot),T(pe),T(z),T(Ne),T(ct,$),T(Pe),T(q),T(Z),T(Ge),T(pt,$),T(nt),T(w),T(D),T(A)}}}function er(v){let t,b;return t=new zs({props:{$$slots:{default:[Ka]},$$scope:{ctx:v}}}),{c(){g(t.$$.fragment)},l(n){h(t.$$.fragment,n)},m(n,a){f(t,n,a),b=!0},p(n,a){const y={};a&2&&(y.$$scope={dirty:a,ctx:n}),t.$set(y)},i(n){b||(u(t.$$.fragment,n),b=!0)},o(n){_(t.$$.fragment,n),b=!1},d(n){T(t,n)}}}function tr(v){let t,b,n,a,y,o,I,Oe,E,Ke=`CLIP 모델은 Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh,
Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever가 제안한 <a href="https://arxiv.org/abs/2103.00020" rel="nofollow">자연어 지도(supervision)를 통한 전이 가능한 시각 모델 학습</a>라는 논문에서 소개되었습니다. CLIP(Contrastive Language-Image Pre-Training)은 다양한 이미지와 텍스트 쌍으로 훈련된 신경망 입니다. GPT-2와 3의 제로샷 능력과 유사하게, 해당 작업에 직접적으로 최적화하지 않고도 주어진 이미지에 대해 가장 관련성 있는 텍스트 스니펫을 예측하도록 자연어로 지시할 수 있습니다.`,et,B,qe="해당 논문의 초록입니다.",ee,L,re="<em>최신 컴퓨터 비전 시스템은 미리 정해진 고정된 객체 카테고리 집합을 예측하도록 훈련됩니다. 이러한 제한된 형태의 지도는 다른 시각적 개념을 지정하기 위해 추가적인 라벨링된 데이터가 필요하므로 그 일반성과 사용성을 제한합니다. 이미지 원시 텍스트에서 직접 학습하는 것은 훨씬 더 광범위한 지도 소스를 활용하는 아주 좋은 대안입니다. 이미지와 캡션을 맞추는 간단한 사전 학습 작업이, 인터넷에서 수집한 4억 쌍의 이미지-텍스트 데이터셋에서 SOTA 수준의 이미지 표현을 처음부터 효율적이고 확장 가능하게 학습하는 방법임을 확인할 수 있습니다. 사전 훈련 후, 자연어는 학습된 시각적 개념을 참조하거나 새로운 개념을 설명하는 데 사용되어 모델의 하위 작업으로의 제로샷 전이를 가능하게 합니다. 해당 논문에서는 OCR, 비디오 내 행동 인식, 지리적 위치 파악, 그리고 많은 종류의 세밀한 객체 분류 등 30개 이상의 다양한 기존 컴퓨터 비전 데이터셋에 대한 벤치마킹을 통해 이 접근 방식의 성능을 연구합니다. 이 모델은 대부분의 작업에 대해 의미 있게 전이되며, 종종 데이터셋별 훈련 없이도 완전 지도 학습 기준선과 경쟁력 있는 성능을 보입니다. 예를 들어, ImageNet에서 원래 ResNet-50의 정확도를 제로샷으로 일치시키는데, 이는 ResNet-50이 훈련된 128만 개의 훈련 예제를 전혀 사용할 필요가 없었습니다. 코드 및 사전 훈련된 모델 가중치는 이 https URL에서 공개합니다.</em>",tt,S,gt=`이 모델은 <a href="https://huggingface.co/valhalla" rel="nofollow">valhalla</a>에 의해 기여되었습니다.
원본 코드는 <a href="https://github.com/openai/CLIP" rel="nofollow">이곳</a>에서 확인할 수 있습니다.`,Be,ie,He,Me,te="CLIP은 멀티모달 비전 밒 언어 모델입니다. 이미지-텍스트 유사도 계산과 제로샷 이미지 분류에 사용될 수 있습니다. CLIP은 ViT와 유사한 트랜스포머를 사용하여 시각적 특징을 추출하고, 인과적 언어 모델을 사용하여 텍스트 특징을 추출합니다. 그 후 텍스트와 시각적 특징 모두 동일한 차원의 잠재(latent) 공간으로 투영됩니다. 투영된 이미지와 텍스트 특징 사이의 내적이 유사도 점수로 사용됩니다.",ue,oe,ht='트랜스포머 인코더에 이미지를 입력하기 위해, 각 이미지는 고정 크기의 겹치지 않는 패치들의 시퀀스로 분할되고, 이후 선형 임베딩됩니다. [CLS]토큰이 전체 이미지의 표현으로 추가됩니다. 저자들은 또한 절대 위치 임베딩을 추가하고, 결과로 나온 벡터 시퀀스를 표준 트랜스포머 인토더에 입력합니다. <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>는 모델을 위해 이미지를 리사이즈(또는 재스캐일링)하고 정규화하는데 사용될 수 있습니다.',_e,xe,ye='<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>는 텍스트를 인코딩하는데 사용됩니다. <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPProcessor">CLIPProcessor</a>는 <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>와 <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>를 하나의 인스턴스로 감싸서 텍스트를 인코딩하고 이미지를 준비하는데 모두 사용됩니다.',Te,Ce,Ie='다음 예시는 <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPProcessor">CLIPProcessor</a>와 <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPModel">CLIPModel</a>을 사용하여 이미지-텍스트 유사도 점수를 얻는 방법을 보여줍니다.',Q,le,je,N,ke,Se,ne="먼저 최신버전의 플래시 어텐션2를 설치합니다.",ot,$e,O,pe,Jt="플래시 어텐션2와 호환되는 하드웨어를 가지고 있는지 확인하세요. 이에 대한 자세한 내용은 flash-attn 리포지토리의 공식문서에서 확인할 수 있습니다. 또한 모델을 반정밀도(<code>torch.float16</code>)로 로드하는 것을 잊지 마세요.",se,Ue,yt,z,ze="플래시 어텐션2를 사용해서 모델을 로드하고 구동하기 위해서 다음 스니펫을 참고하세요:",Ne,me,ct,Qe,X,Pe,we='파이토치는 <code>torch.nn.functional</code>의 일부로 네이티브 스케일된 내적 어텐션(SPDA) 연산자를 포함하고 있습니다. 이 함수는 입력과 사용 중인 하드웨어에 따라 적용될 수 있는 여러 구현을 포함합니다. 자세한 정보는 <a href="https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow">공식문서</a>나 <a href="https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention" rel="nofollow">GPU 추론</a> 페이지를 참조하세요.',de,q,Ct="<code>torch&gt;=2.1.1</code>에서는 구현이 가능할 때 SDPA가 기본적으로 사용되지만, <code>from_pretrained()</code> 함수에서 <code>attn_implementation=&quot;sdpa&quot;</code>를 설정하여 SDPA를 명시적으로 사용하도록 요청할 수도 있습니다.",W,ge,It,Z,ft="최고의 속도향상을 위해서, 반정밀도로 모델을 로드하는 것을 추천합니다. (예를들면 <code>torch.float16</code> 또는 <code>torch.bfloat16</code>).",Ge,he,pt,Ye,ae=`로컬 벤치마크(NVIDIA A10G, PyTorch 2.3.1+cu121)에서 <code>float16</code>을 사용하여 <code>&quot;openai/clip-vit-large-patch14&quot;</code> 체크포인트로 추론을 수행했을 때, 다음과 같은 속도 향상을 확인 했습니다.
<a href="https://gist.github.com/qubvel/ac691a54e54f9fae8144275f866a7ff8" rel="nofollow">코드</a>:`,nt,ve,G,w,P='<thead><tr><th align="right">Num text labels</th> <th align="right">Eager (s/iter)</th> <th align="right">FA2 (s/iter)</th> <th align="right">FA2 speedup</th> <th align="right">SDPA (s/iter)</th> <th align="right">SDPA speedup</th></tr></thead> <tbody><tr><td align="right">4</td> <td align="right">0.009</td> <td align="right">0.012</td> <td align="right">0.737</td> <td align="right">0.007</td> <td align="right">1.269</td></tr> <tr><td align="right">16</td> <td align="right">0.009</td> <td align="right">0.014</td> <td align="right">0.659</td> <td align="right">0.008</td> <td align="right">1.187</td></tr> <tr><td align="right">32</td> <td align="right">0.018</td> <td align="right">0.021</td> <td align="right">0.862</td> <td align="right">0.016</td> <td align="right">1.142</td></tr> <tr><td align="right">64</td> <td align="right">0.034</td> <td align="right">0.034</td> <td align="right">1.001</td> <td align="right">0.03</td> <td align="right">1.163</td></tr> <tr><td align="right">128</td> <td align="right">0.063</td> <td align="right">0.058</td> <td align="right">1.09</td> <td align="right">0.054</td> <td align="right">1.174</td></tr></tbody>',Y,be,Fe='<img src="https://github.com/user-attachments/assets/e9826b43-4e66-4f4c-952b-af4d90bd38eb" alt="clip_text_model_viz_3"/>',D,ce,A,K,$='<thead><tr><th align="right">Image batch size</th> <th align="right">Eager (s/iter)</th> <th align="right">FA2 (s/iter)</th> <th align="right">FA2 speedup</th> <th align="right">SDPA (s/iter)</th> <th align="right">SDPA speedup</th></tr></thead> <tbody><tr><td align="right">1</td> <td align="right">0.016</td> <td align="right">0.013</td> <td align="right">1.247</td> <td align="right">0.012</td> <td align="right">1.318</td></tr> <tr><td align="right">4</td> <td align="right">0.025</td> <td align="right">0.021</td> <td align="right">1.198</td> <td align="right">0.021</td> <td align="right">1.202</td></tr> <tr><td align="right">16</td> <td align="right">0.093</td> <td align="right">0.075</td> <td align="right">1.234</td> <td align="right">0.075</td> <td align="right">1.24</td></tr> <tr><td align="right">32</td> <td align="right">0.181</td> <td align="right">0.147</td> <td align="right">1.237</td> <td align="right">0.146</td> <td align="right">1.241</td></tr></tbody>',k,V,Ee='<img src="https://github.com/user-attachments/assets/50a36206-e3b9-4adc-ac8e-926b8b071d63" alt="clip_image_model_viz_3"/>',$t,Ve,st,at,Re='<thead><tr><th align="right">Image batch size</th> <th align="right">Num text labels</th> <th align="right">Eager (s/iter)</th> <th align="right">FA2 (s/iter)</th> <th align="right">FA2 speedup</th> <th align="right">SDPA (s/iter)</th> <th align="right">SDPA speedup</th></tr></thead> <tbody><tr><td align="right">1</td> <td align="right">4</td> <td align="right">0.025</td> <td align="right">0.026</td> <td align="right">0.954</td> <td align="right">0.02</td> <td align="right">1.217</td></tr> <tr><td align="right">1</td> <td align="right">16</td> <td align="right">0.026</td> <td align="right">0.028</td> <td align="right">0.918</td> <td align="right">0.02</td> <td align="right">1.287</td></tr> <tr><td align="right">1</td> <td align="right">64</td> <td align="right">0.042</td> <td align="right">0.046</td> <td align="right">0.906</td> <td align="right">0.036</td> <td align="right">1.167</td></tr> <tr><td align="right">4</td> <td align="right">4</td> <td align="right">0.028</td> <td align="right">0.033</td> <td align="right">0.849</td> <td align="right">0.024</td> <td align="right">1.189</td></tr> <tr><td align="right">4</td> <td align="right">16</td> <td align="right">0.034</td> <td align="right">0.035</td> <td align="right">0.955</td> <td align="right">0.029</td> <td align="right">1.169</td></tr> <tr><td align="right">4</td> <td align="right">64</td> <td align="right">0.059</td> <td align="right">0.055</td> <td align="right">1.072</td> <td align="right">0.05</td> <td align="right">1.179</td></tr> <tr><td align="right">16</td> <td align="right">4</td> <td align="right">0.096</td> <td align="right">0.088</td> <td align="right">1.091</td> <td align="right">0.078</td> <td align="right">1.234</td></tr> <tr><td align="right">16</td> <td align="right">16</td> <td align="right">0.102</td> <td align="right">0.09</td> <td align="right">1.129</td> <td align="right">0.083</td> <td align="right">1.224</td></tr> <tr><td align="right">16</td> <td align="right">64</td> <td align="right">0.127</td> <td align="right">0.11</td> <td align="right">1.157</td> <td align="right">0.105</td> <td align="right">1.218</td></tr> <tr><td align="right">32</td> <td align="right">4</td> <td align="right">0.185</td> <td align="right">0.159</td> <td align="right">1.157</td> <td align="right">0.149</td> <td align="right">1.238</td></tr> <tr><td align="right">32</td> <td align="right">16</td> <td align="right">0.19</td> <td align="right">0.162</td> <td align="right">1.177</td> <td align="right">0.154</td> <td align="right">1.233</td></tr> <tr><td align="right">32</td> <td align="right">64</td> <td align="right">0.216</td> <td align="right">0.181</td> <td align="right">1.19</td> <td align="right">0.176</td> <td align="right">1.228</td></tr></tbody>',jt,Le,Bt,io,pn="CLIP을 시작하는 데 도움이 되는 Hugging Face와 community 자료 목록(🌎로 표시됨) 입니다.",ut,Ut,mn=`<li><a href="https://huggingface.co/blog/fine-tune-clip-rsicd" rel="nofollow">원격 센싱 (인공위성) 이미지와 캡션을 가지고 CLIP 미세조정하기</a>:
<a href="https://github.com/201528014227051/RSICD_optimal" rel="nofollow">RSICD dataset</a>을 가지고 CLIP을 미세조정 하는 방법과 데이터 증강에 대한 성능 비교에 대한 블로그 포스트</li> <li>이 <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/contrastive-image-text" rel="nofollow">예시 스크립트</a>는 <a href="https://cocodataset.org/#home" rel="nofollow">COCO dataset</a>를 이용한 사전학습된 비전과 텍스트와 인코더를 사용해서 CLIP같은 비전-텍스트 듀얼 모델을 어떻게 학습시키는지 보여줍니다.</li>`,Kt,lo,Io,wt,gn='<li>사전학습된 CLIP모델을 이미지 캡셔닝을 위한 빔서치 추론에 어떻게 활용하는지에 관한 <a href="https://colab.research.google.com/drive/1tuoAC5F4sC7qid56Z0ap-stR3rwdk0ZV?usp=sharing" rel="nofollow">노트북</a></li>',qt,Yt,co="<strong>이미지 검색</strong>",Mo,Je,po='<li>사전학습된 CLIP모델과 MRR(Mean Reciprocal Rank) 점수 연산을 사용한 이미지 검색에 대한 <a href="https://colab.research.google.com/drive/1bLVwVKpAndpEDHqjzxVPr_9nGrSbuOQd?usp=sharing" rel="nofollow">노트북</a>. 🌎</li> <li>이미지 검색과 유사성 점수에 대해 보여주는 <a href="https://colab.research.google.com/github/deep-diver/image_search_with_natural_language/blob/main/notebooks/Image_Search_CLIP.ipynb" rel="nofollow">노트북</a>. 🌎</li> <li>Multilingual CLIP를 사용해서 이미지와 텍스트를 어떻게 같은 벡터 공간에 매핑 시키는지에 대한 <a href="https://colab.research.google.com/drive/1xO-wC_m_GNzgjIBQ4a4znvQkvDoZJvH4?usp=sharing" rel="nofollow">노트북</a>. 🌎</li> <li><a href="https://unsplash.com" rel="nofollow">Unsplash</a>와 <a href="https://www.themoviedb.org/" rel="nofollow">TMDB</a> 데이터셋을 활용한 의미론적(semantic) 이미지 검색에서 CLIP을 구동하는 방법에 대한 <a href="https://colab.research.google.com/github/vivien000/clip-demo/blob/master/clip.ipynb#scrollTo=uzdFhRGqiWkR" rel="nofollow">노트북</a>. 🌎</li>',$o,Nt,Zn="<strong>설명 가능성</strong>",wo,Gt,Bn='<li>입력 토큰과 이미지 조각(segment) 사이의 유사성을 시각화 시키는 방법에 대한 <a href="https://colab.research.google.com/github/hila-chefer/Transformer-MM-Explainability/blob/main/CLIP_explainability.ipynb" rel="nofollow">노트북</a>. 🌎</li>',vo,Et,Nn="여기에 포함될 자료를 제출하고 싶으시다면 PR(Pull Request)를 열어주세요. 리뷰 해드리겠습니다! 자료는 기존 자료를 복제하는 대신 새로운 내용을 담고 있어야 합니다.",xo,De,Dt,rt,Rt,hn,mo,eo=`<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPModel">CLIPModel</a>. It is used to instantiate
a CLIP 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 CLIP
<a href="https://huggingface.co/openai/clip-vit-base-patch32" rel="nofollow">openai/clip-vit-base-patch32</a> architecture.`,Bo,zt,No=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,to,Ht,it,vt,oo,go,yo,fn=`Instantiate a <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a> (or a derived class) from clip text model configuration and clip vision model
configuration.`,no,ho,ko,Ae,fo,Go,lt,uo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextModel">CLIPTextModel</a>. It is used to instantiate a CLIP
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 CLIP
<a href="https://huggingface.co/openai/clip-vit-base-patch32" rel="nofollow">openai/clip-vit-base-patch32</a> architecture.`,Eo,St,Gn=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ro,_t,Po,xt,Co,m,x,Ft,Xt,_o=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionModel">CLIPVisionModel</a>. It is used to instantiate a
CLIP 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 CLIP
<a href="https://huggingface.co/openai/clip-vit-base-patch32" rel="nofollow">openai/clip-vit-base-patch32</a> architecture.`,Tt,mt,kt=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Vt,We,Pt,Xe,Lt,R,dt,un,_n,Fs="Construct a CLIP tokenizer. Based on byte-level Byte-Pair-Encoding.",is,Tn,Vs=`This tokenizer inherits from <code>PreTrainedTokenizer</code> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,ls,At,Xo,ds,bn,Ws=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`,cs,Mn,Zs="<li>single sequence: <code>&lt;|startoftext|&gt; X &lt;|endoftext|&gt;</code></li>",ps,yn,Bs="Pairs of sequences are not the expected use case, but they will be handled without a separator.",ms,Lo,qo,gs,Cn,Ns=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,hs,Jo,Ho,fs,In,Gs=`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`,us,$n,So,Rn,Qo,Xn,Wt,Yo,_s,wn,Es=`Construct a “fast” CLIP tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on byte-level
Byte-Pair-Encoding.`,Ts,vn,Rs=`This tokenizer inherits from <code>PreTrainedTokenizerFast</code> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,bs,Ot,Do,Ms,xn,Xs=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`,ys,kn,qs="<li>single sequence: <code>&lt;|startoftext|&gt; X &lt;|endoftext|&gt;</code></li>",Cs,Pn,Hs="Pairs of sequences are not the expected use case, but they will be handled without a separator.",Is,jo,Ao,$s,Ln,Ss=`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`,qn,Oo,Hn,so,Ko,ws,Jn,Qs="Constructs a CLIP image processor.",vs,Uo,en,xs,jn,Ys="Preprocess an image or batch of images.",Sn,tn,Qn,on,nn,Yn,sn,Dn,Zt,an,ks,Un,Ds="Constructs a CLIP processor which wraps a CLIP image processor and a CLIP tokenizer into a single processor.",Ps,zn,As=`<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPProcessor">CLIPProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a> and <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTokenizerFast">CLIPTokenizerFast</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPProcessor.decode">decode()</a> for more information.`,Ls,zo,rn,Js,Fn,Os=`This method forwards all its arguments to CLIPTokenizerFast’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,js,Fo,ln,Us,Vn,Ks=`This method forwards all its arguments to CLIPTokenizerFast’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,An,Vo,On,dn,Kn,En,es;return y=new H({props:{title:"CLIP",local:"clip",headingTag:"h1"}}),I=new H({props:{title:"개요",local:"overview",headingTag:"h2"}}),ie=new H({props:{title:"사용 팁과 예시",local:"usage-tips-and-example",headingTag:"h2"}}),le=new fe({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFByb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ0xJUFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwJUVDJTlEJUI0JUVCJUFGJUI4JUVDJUE3JTgwLSVFRCU4NSU4RCVFQyU4QSVBNCVFRCU4QSVCOCUyMCVFQyU5QyVBMCVFQyU4MiVBQyVFQyU4NCVCMSUyMCVFQyVBMCU5MCVFQyU4OCU5OCUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwJUVEJTk5JTk1JUVCJUE1JUEwJUVDJTlEJTg0JTIwJUVCJUEwJTg4JUVDJTlEJUI0JUVCJUI4JTk0JUVCJUE3JTgxJTIwJUVEJTk1JTk4JUVBJUI4JUIwJUVDJTlDJTg0JUVEJTk1JUI0JUVDJTg0JTlDJTIwJUVDJTg2JThDJUVEJTk0JTg0JUVEJThBJUI4JUVCJUE3JUE1JUVDJThBJUE0JUVCJUE1JUJDJTIwJUVDJUI3JUE4JUVEJTk1JUE5JUVCJThCJTg4JUVCJThCJUE0Lg==",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> CLIPProcessor, CLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = CLIPProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># 이미지-텍스트 유사성 점수</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># 확률을 레이블링 하기위해서 소프트맥스를 취합니다.</span>`,wrap:!1}}),N=new H({props:{title:"CLIP과 플래시 어텐션2 결합",local:"combining-clip-and-flash-attention-2",headingTag:"h3"}}),$e=new fe({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),Ue=new Mt({props:{warning:!0,$$slots:{default:[ca]},$$scope:{ctx:v}}}),me=new fe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBDTElQUHJvY2Vzc29yJTJDJTIwQ0xJUE1vZGVsJTBBJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUwQXRvcmNoX2R0eXBlJTIwJTNEJTIwdG9yY2guZmxvYXQxNiUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIlMkMlMEElMjAlMjAlMjAlMjBhdHRuX2ltcGxlbWVudGF0aW9uJTNEJTIyZmxhc2hfYXR0ZW50aW9uXzIlMjIlMkMlMEElMjAlMjAlMjAlMjBkZXZpY2VfbWFwJTNEZGV2aWNlJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaF9kdHlwZSUyQyUwQSklMEFwcm9jZXNzb3IlMjAlM0QlMjBDTElQUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzLnRvKGRldmljZSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwd2l0aCUyMHRvcmNoLmF1dG9jYXN0KGRldmljZSklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUyMCUyMCUyMyUyMCVFQyU5RCVCNCVFQiVBRiVCOCVFQyVBNyU4MC0lRUQlODUlOEQlRUMlOEElQTQlRUQlOEElQjglMjAlRUMlOUMlQTAlRUMlODIlQUMlRUMlODQlQjElMjAlRUMlQTAlOTAlRUMlODglOTglMEFwcm9icyUyMCUzRCUyMGxvZ2l0c19wZXJfaW1hZ2Uuc29mdG1heChkaW0lM0QxKSUyMCUyMCUyMyUyMCVFRCU5OSU5NSVFQiVBNSVBMCVFQyU5RCU4NCUyMCVFQiVBMCU4OCVFQyU5RCVCNCVFQiVCOCU5NCVFQiVBNyU4MSUyMCVFRCU5NSU5OCVFQSVCOCVCMCVFQyU5QyU4NCVFRCU5NSVCNCVFQyU4NCU5QyUyMCVFQyU4NiU4QyVFRCU5NCU4NCVFRCU4QSVCOCVFQiVBNyVBNSVFQyU4QSVBNCVFQiVBNSVCQyUyMCVFQyVCNyVBOCVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNC4lMEFwcmludChwcm9icyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPProcessor, CLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>device = <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>torch_dtype = torch.float16

<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>,
<span class="hljs-meta">... </span>    attn_implementation=<span class="hljs-string">&quot;flash_attention_2&quot;</span>,
<span class="hljs-meta">... </span>    device_map=device,
<span class="hljs-meta">... </span>    torch_dtype=torch_dtype,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = CLIPProcessor.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&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(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> torch.autocast(device):
<span class="hljs-meta">... </span>        outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># 이미지-텍스트 유사성 점수</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># 확률을 레이블링 하기위해서 소프트맥스를 취합니다.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(probs)
tensor([[<span class="hljs-number">0.9946</span>, <span class="hljs-number">0.0052</span>]], device=<span class="hljs-string">&#x27;cuda:0&#x27;</span>, dtype=torch.float16)`,wrap:!1}}),Qe=new H({props:{title:"스케일된 내적 어텐션 (Scaled dot-product Attention(SDPA)) 사용하기",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h3"}}),ge=new fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjBhdHRuX2ltcGxlbWVudGF0aW9uJTNEJTIyc2RwYSUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPModel

model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>, torch_dtype=torch.float16, attn_implementation=<span class="hljs-string">&quot;sdpa&quot;</span>)`,wrap:!1}}),he=new H({props:{title:"플래시 어텐션과 스케일된 내적 어텐션(SDPA)으로 인해 예상되는 속도향상",local:"expected-speedups-with-flash-attention-and-sdpa",headingTag:"h3"}}),ve=new H({props:{title:"CLIPTextModel",local:"cliptextmodel",headingTag:"h4"}}),ce=new H({props:{title:"CLIPVisionModel",local:"clipvisionmodel",headingTag:"h4"}}),Ve=new H({props:{title:"CLIPModel",local:"clipmodel",headingTag:"h4"}}),Le=new H({props:{title:"자료",local:"resources",headingTag:"h2"}}),lo=new la({props:{pipeline:"image-to-text"}}),De=new H({props:{title:"CLIPConfig",local:"transformers.CLIPConfig ][ transformers.CLIPConfig",headingTag:"h2"}}),Rt=new U({props:{name:"class transformers.CLIPConfig",anchor:"transformers.CLIPConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTextConfig">CLIPTextConfig</a>.`,name:"text_config"},{anchor:"transformers.CLIPConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPVisionConfig">CLIPVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.CLIPConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.CLIPConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The initial value of the <em>logit_scale</em> parameter. Default is used as per the original CLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.CLIPConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L226"}}),Ht=new Ze({props:{anchor:"transformers.CLIPConfig.example",$$slots:{default:[pa]},$$scope:{ctx:v}}}),oo=new U({props:{name:"from_text_vision_configs",anchor:"transformers.CLIPConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": CLIPTextConfig"},{name:"vision_config",val:": CLIPVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L363",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a></p>
`}}),ho=new H({props:{title:"CLIPTextConfig",local:"transformers.CLIPTextConfig ][ transformers.CLIPTextConfig",headingTag:"h2"}}),fo=new U({props:{name:"class transformers.CLIPTextConfig",anchor:"transformers.CLIPTextConfig",parameters:[{name:"vocab_size",val:" = 49408"},{name:"hidden_size",val:" = 512"},{name:"intermediate_size",val:" = 2048"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 77"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 49406"},{name:"eos_token_id",val:" = 49407"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 49408) &#x2014;
Vocabulary size of the CLIP text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPModel">CLIPModel</a>.`,name:"vocab_size"},{anchor:"transformers.CLIPTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.CLIPTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CLIPTextConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.CLIPTextConfig.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.CLIPTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CLIPTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 77) &#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.CLIPTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CLIPTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.CLIPTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.CLIPTextConfig.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.CLIPTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.CLIPTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.CLIPTextConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 49406) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.CLIPTextConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 49407) &#x2014;
End of stream token id.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L33"}}),_t=new Ze({props:{anchor:"transformers.CLIPTextConfig.example",$$slots:{default:[ma]},$$scope:{ctx:v}}}),xt=new H({props:{title:"CLIPVisionConfig",local:"transformers.CLIPVisionConfig ][ transformers.CLIPVisionConfig",headingTag:"h2"}}),x=new U({props:{name:"class transformers.CLIPVisionConfig",anchor:"transformers.CLIPVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 32"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPVisionConfig.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.CLIPVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CLIPVisionConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.CLIPVisionConfig.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.CLIPVisionConfig.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.CLIPVisionConfig.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.CLIPVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.CLIPVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.CLIPVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CLIPVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.CLIPVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.CLIPVisionConfig.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.CLIPVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L134"}}),We=new Ze({props:{anchor:"transformers.CLIPVisionConfig.example",$$slots:{default:[ga]},$$scope:{ctx:v}}}),Xe=new H({props:{title:"CLIPTokenizer",local:"transformers.CLIPTokenizer ][ transformers.CLIPTokenizer",headingTag:"h2"}}),dt=new U({props:{name:"class transformers.CLIPTokenizer",anchor:"transformers.CLIPTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|startoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = '<|endoftext|>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CLIPTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CLIPTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.CLIPTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.CLIPTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|startoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CLIPTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.CLIPTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L254"}}),Xo=new U({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L339",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),qo=new U({props:{name:"get_special_tokens_mask",anchor:"transformers.CLIPTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L366",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Ho=new U({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L394",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),So=new U({props:{name:"save_vocabulary",anchor:"transformers.CLIPTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L489"}}),Qo=new H({props:{title:"CLIPTokenizerFast",local:"transformers.CLIPTokenizerFast ][ transformers.CLIPTokenizerFast",headingTag:"h2"}}),Yo=new U({props:{name:"class transformers.CLIPTokenizerFast",anchor:"transformers.CLIPTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|startoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = '<|endoftext|>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CLIPTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CLIPTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.CLIPTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.CLIPTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|startoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CLIPTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.CLIPTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L31"}}),Do=new U({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L109",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Ao=new U({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L136",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Oo=new H({props:{title:"CLIPImageProcessor",local:"transformers.CLIPImageProcessor ][ transformers.CLIPImageProcessor",headingTag:"h2"}}),Ko=new U({props:{name:"class transformers.CLIPImageProcessor",anchor:"transformers.CLIPImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.CLIPImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the image after resizing. The shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio. Can be overridden by <code>size</code> in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.CLIPImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.CLIPImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by <code>do_center_crop</code> in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.CLIPImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to 224) &#x2014;
Size of the output image after applying <code>center_crop</code>. Can be overridden by <code>crop_size</code> in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.CLIPImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.CLIPImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by <code>rescale_factor</code> in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.CLIPImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by <code>do_normalize</code> in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.CLIPImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.48145466, 0.4578275, 0.40821073]</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.CLIPImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.26862954, 0.26130258, 0.27577711]</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.CLIPImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/image_processing_clip.py#L53"}}),en=new U({props:{name:"preprocess",anchor:"transformers.CLIPImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor']]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Optional[int] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": typing.Optional[bool] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.CLIPImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.CLIPImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.CLIPImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.CLIPImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.CLIPImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.CLIPImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.CLIPImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.CLIPImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.CLIPImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/image_processing_clip.py#L202"}}),tn=new H({props:{title:"CLIPFeatureExtractor",local:"transformers.CLIPFeatureExtractor ][ transformers.CLIPFeatureExtractor",headingTag:"h2"}}),nn=new U({props:{name:"class transformers.CLIPFeatureExtractor",anchor:"transformers.CLIPFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/feature_extraction_clip.py#L27"}}),sn=new H({props:{title:"CLIPProcessor",local:"transformers.CLIPProcessor ][ transformers.CLIPProcessor",headingTag:"h2"}}),an=new U({props:{name:"class transformers.CLIPProcessor",anchor:"transformers.CLIPProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>, <em>optional</em>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.CLIPProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ko/model_doc/clip#transformers.CLIPTokenizerFast">CLIPTokenizerFast</a>, <em>optional</em>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L25"}}),rn=new U({props:{name:"batch_decode",anchor:"transformers.CLIPProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L119"}}),ln=new U({props:{name:"decode",anchor:"transformers.CLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L126"}}),Vo=new ia({props:{pytorch:!0,tensorflow:!0,jax:!0,$$slots:{jax:[er],tensorflow:[Ea],pytorch:[Pa]},$$scope:{ctx:v}}}),dn=new da({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/clip.md"}}),{c(){t=c("meta"),b=r(),n=c("p"),a=r(),g(y.$$.fragment),o=r(),g(I.$$.fragment),Oe=r(),E=c("p"),E.innerHTML=Ke,et=r(),B=c("p"),B.textContent=qe,ee=r(),L=c("p"),L.innerHTML=re,tt=r(),S=c("p"),S.innerHTML=gt,Be=r(),g(ie.$$.fragment),He=r(),Me=c("p"),Me.textContent=te,ue=r(),oe=c("p"),oe.innerHTML=ht,_e=r(),xe=c("p"),xe.innerHTML=ye,Te=r(),Ce=c("p"),Ce.innerHTML=Ie,Q=r(),g(le.$$.fragment),je=r(),g(N.$$.fragment),ke=r(),Se=c("p"),Se.textContent=ne,ot=r(),g($e.$$.fragment),O=r(),pe=c("p"),pe.innerHTML=Jt,se=r(),g(Ue.$$.fragment),yt=r(),z=c("p"),z.textContent=ze,Ne=r(),g(me.$$.fragment),ct=r(),g(Qe.$$.fragment),X=r(),Pe=c("p"),Pe.innerHTML=we,de=r(),q=c("p"),q.innerHTML=Ct,W=r(),g(ge.$$.fragment),It=r(),Z=c("p"),Z.innerHTML=ft,Ge=r(),g(he.$$.fragment),pt=r(),Ye=c("p"),Ye.innerHTML=ae,nt=r(),g(ve.$$.fragment),G=r(),w=c("table"),w.innerHTML=P,Y=r(),be=c("p"),be.innerHTML=Fe,D=r(),g(ce.$$.fragment),A=r(),K=c("table"),K.innerHTML=$,k=r(),V=c("p"),V.innerHTML=Ee,$t=r(),g(Ve.$$.fragment),st=r(),at=c("table"),at.innerHTML=Re,jt=r(),g(Le.$$.fragment),Bt=r(),io=c("p"),io.textContent=pn,ut=r(),Ut=c("ul"),Ut.innerHTML=mn,Kt=r(),g(lo.$$.fragment),Io=r(),wt=c("ul"),wt.innerHTML=gn,qt=r(),Yt=c("p"),Yt.innerHTML=co,Mo=r(),Je=c("ul"),Je.innerHTML=po,$o=r(),Nt=c("p"),Nt.innerHTML=Zn,wo=r(),Gt=c("ul"),Gt.innerHTML=Bn,vo=r(),Et=c("p"),Et.textContent=Nn,xo=r(),g(De.$$.fragment),Dt=r(),rt=c("div"),g(Rt.$$.fragment),hn=r(),mo=c("p"),mo.innerHTML=eo,Bo=r(),zt=c("p"),zt.innerHTML=No,to=r(),g(Ht.$$.fragment),it=r(),vt=c("div"),g(oo.$$.fragment),go=r(),yo=c("p"),yo.innerHTML=fn,no=r(),g(ho.$$.fragment),ko=r(),Ae=c("div"),g(fo.$$.fragment),Go=r(),lt=c("p"),lt.innerHTML=uo,Eo=r(),St=c("p"),St.innerHTML=Gn,Ro=r(),g(_t.$$.fragment),Po=r(),g(xt.$$.fragment),Co=r(),m=c("div"),g(x.$$.fragment),Ft=r(),Xt=c("p"),Xt.innerHTML=_o,Tt=r(),mt=c("p"),mt.innerHTML=kt,Vt=r(),g(We.$$.fragment),Pt=r(),g(Xe.$$.fragment),Lt=r(),R=c("div"),g(dt.$$.fragment),un=r(),_n=c("p"),_n.textContent=Fs,is=r(),Tn=c("p"),Tn.innerHTML=Vs,ls=r(),At=c("div"),g(Xo.$$.fragment),ds=r(),bn=c("p"),bn.textContent=Ws,cs=r(),Mn=c("ul"),Mn.innerHTML=Zs,ps=r(),yn=c("p"),yn.textContent=Bs,ms=r(),Lo=c("div"),g(qo.$$.fragment),gs=r(),Cn=c("p"),Cn.innerHTML=Ns,hs=r(),Jo=c("div"),g(Ho.$$.fragment),fs=r(),In=c("p"),In.textContent=Gs,us=r(),$n=c("div"),g(So.$$.fragment),Rn=r(),g(Qo.$$.fragment),Xn=r(),Wt=c("div"),g(Yo.$$.fragment),_s=r(),wn=c("p"),wn.innerHTML=Es,Ts=r(),vn=c("p"),vn.innerHTML=Rs,bs=r(),Ot=c("div"),g(Do.$$.fragment),Ms=r(),xn=c("p"),xn.textContent=Xs,ys=r(),kn=c("ul"),kn.innerHTML=qs,Cs=r(),Pn=c("p"),Pn.textContent=Hs,Is=r(),jo=c("div"),g(Ao.$$.fragment),$s=r(),Ln=c("p"),Ln.textContent=Ss,qn=r(),g(Oo.$$.fragment),Hn=r(),so=c("div"),g(Ko.$$.fragment),ws=r(),Jn=c("p"),Jn.textContent=Qs,vs=r(),Uo=c("div"),g(en.$$.fragment),xs=r(),jn=c("p"),jn.textContent=Ys,Sn=r(),g(tn.$$.fragment),Qn=r(),on=c("div"),g(nn.$$.fragment),Yn=r(),g(sn.$$.fragment),Dn=r(),Zt=c("div"),g(an.$$.fragment),ks=r(),Un=c("p"),Un.textContent=Ds,Ps=r(),zn=c("p"),zn.innerHTML=As,Ls=r(),zo=c("div"),g(rn.$$.fragment),Js=r(),Fn=c("p"),Fn.innerHTML=Os,js=r(),Fo=c("div"),g(ln.$$.fragment),Us=r(),Vn=c("p"),Vn.innerHTML=Ks,An=r(),g(Vo.$$.fragment),On=r(),g(dn.$$.fragment),Kn=r(),En=c("p"),this.h()},l(e){const M=ra("svelte-u9bgzb",document.head);t=p(M,"META",{name:!0,content:!0}),M.forEach(s),b=i(e),n=p(e,"P",{}),J(n).forEach(s),a=i(e),h(y.$$.fragment,e),o=i(e),h(I.$$.fragment,e),Oe=i(e),E=p(e,"P",{"data-svelte-h":!0}),C(E)!=="svelte-1nhfa6u"&&(E.innerHTML=Ke),et=i(e),B=p(e,"P",{"data-svelte-h":!0}),C(B)!=="svelte-1ilphph"&&(B.textContent=qe),ee=i(e),L=p(e,"P",{"data-svelte-h":!0}),C(L)!=="svelte-riaxzj"&&(L.innerHTML=re),tt=i(e),S=p(e,"P",{"data-svelte-h":!0}),C(S)!=="svelte-15c9bqx"&&(S.innerHTML=gt),Be=i(e),h(ie.$$.fragment,e),He=i(e),Me=p(e,"P",{"data-svelte-h":!0}),C(Me)!=="svelte-1c0rwzh"&&(Me.textContent=te),ue=i(e),oe=p(e,"P",{"data-svelte-h":!0}),C(oe)!=="svelte-2fuk51"&&(oe.innerHTML=ht),_e=i(e),xe=p(e,"P",{"data-svelte-h":!0}),C(xe)!=="svelte-mhr9ni"&&(xe.innerHTML=ye),Te=i(e),Ce=p(e,"P",{"data-svelte-h":!0}),C(Ce)!=="svelte-12hwlf1"&&(Ce.innerHTML=Ie),Q=i(e),h(le.$$.fragment,e),je=i(e),h(N.$$.fragment,e),ke=i(e),Se=p(e,"P",{"data-svelte-h":!0}),C(Se)!=="svelte-159ns35"&&(Se.textContent=ne),ot=i(e),h($e.$$.fragment,e),O=i(e),pe=p(e,"P",{"data-svelte-h":!0}),C(pe)!=="svelte-dgxslf"&&(pe.innerHTML=Jt),se=i(e),h(Ue.$$.fragment,e),yt=i(e),z=p(e,"P",{"data-svelte-h":!0}),C(z)!=="svelte-rtf285"&&(z.textContent=ze),Ne=i(e),h(me.$$.fragment,e),ct=i(e),h(Qe.$$.fragment,e),X=i(e),Pe=p(e,"P",{"data-svelte-h":!0}),C(Pe)!=="svelte-w4p0rk"&&(Pe.innerHTML=we),de=i(e),q=p(e,"P",{"data-svelte-h":!0}),C(q)!=="svelte-8fx6p"&&(q.innerHTML=Ct),W=i(e),h(ge.$$.fragment,e),It=i(e),Z=p(e,"P",{"data-svelte-h":!0}),C(Z)!=="svelte-d9envf"&&(Z.innerHTML=ft),Ge=i(e),h(he.$$.fragment,e),pt=i(e),Ye=p(e,"P",{"data-svelte-h":!0}),C(Ye)!=="svelte-w0mzzz"&&(Ye.innerHTML=ae),nt=i(e),h(ve.$$.fragment,e),G=i(e),w=p(e,"TABLE",{"data-svelte-h":!0}),C(w)!=="svelte-fn6zsc"&&(w.innerHTML=P),Y=i(e),be=p(e,"P",{"data-svelte-h":!0}),C(be)!=="svelte-9q1rgw"&&(be.innerHTML=Fe),D=i(e),h(ce.$$.fragment,e),A=i(e),K=p(e,"TABLE",{"data-svelte-h":!0}),C(K)!=="svelte-1kumo4w"&&(K.innerHTML=$),k=i(e),V=p(e,"P",{"data-svelte-h":!0}),C(V)!=="svelte-t11hog"&&(V.innerHTML=Ee),$t=i(e),h(Ve.$$.fragment,e),st=i(e),at=p(e,"TABLE",{"data-svelte-h":!0}),C(at)!=="svelte-1klvovi"&&(at.innerHTML=Re),jt=i(e),h(Le.$$.fragment,e),Bt=i(e),io=p(e,"P",{"data-svelte-h":!0}),C(io)!=="svelte-10whmzw"&&(io.textContent=pn),ut=i(e),Ut=p(e,"UL",{"data-svelte-h":!0}),C(Ut)!=="svelte-1to0ssr"&&(Ut.innerHTML=mn),Kt=i(e),h(lo.$$.fragment,e),Io=i(e),wt=p(e,"UL",{"data-svelte-h":!0}),C(wt)!=="svelte-aicmme"&&(wt.innerHTML=gn),qt=i(e),Yt=p(e,"P",{"data-svelte-h":!0}),C(Yt)!=="svelte-wrabm0"&&(Yt.innerHTML=co),Mo=i(e),Je=p(e,"UL",{"data-svelte-h":!0}),C(Je)!=="svelte-19zxd8g"&&(Je.innerHTML=po),$o=i(e),Nt=p(e,"P",{"data-svelte-h":!0}),C(Nt)!=="svelte-lw59iu"&&(Nt.innerHTML=Zn),wo=i(e),Gt=p(e,"UL",{"data-svelte-h":!0}),C(Gt)!=="svelte-1ncc62k"&&(Gt.innerHTML=Bn),vo=i(e),Et=p(e,"P",{"data-svelte-h":!0}),C(Et)!=="svelte-1l5ktc2"&&(Et.textContent=Nn),xo=i(e),h(De.$$.fragment,e),Dt=i(e),rt=p(e,"DIV",{class:!0});var Qt=J(rt);h(Rt.$$.fragment,Qt),hn=i(Qt),mo=p(Qt,"P",{"data-svelte-h":!0}),C(mo)!=="svelte-1c6w38p"&&(mo.innerHTML=eo),Bo=i(Qt),zt=p(Qt,"P",{"data-svelte-h":!0}),C(zt)!=="svelte-qr3t5r"&&(zt.innerHTML=No),to=i(Qt),h(Ht.$$.fragment,Qt),it=i(Qt),vt=p(Qt,"DIV",{class:!0});var cn=J(vt);h(oo.$$.fragment,cn),go=i(cn),yo=p(cn,"P",{"data-svelte-h":!0}),C(yo)!=="svelte-3p5unf"&&(yo.innerHTML=fn),cn.forEach(s),Qt.forEach(s),no=i(e),h(ho.$$.fragment,e),ko=i(e),Ae=p(e,"DIV",{class:!0});var ao=J(Ae);h(fo.$$.fragment,ao),Go=i(ao),lt=p(ao,"P",{"data-svelte-h":!0}),C(lt)!=="svelte-xt94zb"&&(lt.innerHTML=uo),Eo=i(ao),St=p(ao,"P",{"data-svelte-h":!0}),C(St)!=="svelte-qr3t5r"&&(St.innerHTML=Gn),Ro=i(ao),h(_t.$$.fragment,ao),ao.forEach(s),Po=i(e),h(xt.$$.fragment,e),Co=i(e),m=p(e,"DIV",{class:!0});var ro=J(m);h(x.$$.fragment,ro),Ft=i(ro),Xt=p(ro,"P",{"data-svelte-h":!0}),C(Xt)!=="svelte-17nmerz"&&(Xt.innerHTML=_o),Tt=i(ro),mt=p(ro,"P",{"data-svelte-h":!0}),C(mt)!=="svelte-qr3t5r"&&(mt.innerHTML=kt),Vt=i(ro),h(We.$$.fragment,ro),ro.forEach(s),Pt=i(e),h(Xe.$$.fragment,e),Lt=i(e),R=p(e,"DIV",{class:!0});var bt=J(R);h(dt.$$.fragment,bt),un=i(bt),_n=p(bt,"P",{"data-svelte-h":!0}),C(_n)!=="svelte-vz3r3l"&&(_n.textContent=Fs),is=i(bt),Tn=p(bt,"P",{"data-svelte-h":!0}),C(Tn)!=="svelte-1urdkfw"&&(Tn.innerHTML=Vs),ls=i(bt),At=p(bt,"DIV",{class:!0});var Wo=J(At);h(Xo.$$.fragment,Wo),ds=i(Wo),bn=p(Wo,"P",{"data-svelte-h":!0}),C(bn)!=="svelte-js0y4v"&&(bn.textContent=Ws),cs=i(Wo),Mn=p(Wo,"UL",{"data-svelte-h":!0}),C(Mn)!=="svelte-uzwo54"&&(Mn.innerHTML=Zs),ps=i(Wo),yn=p(Wo,"P",{"data-svelte-h":!0}),C(yn)!=="svelte-1bzh7dh"&&(yn.textContent=Bs),Wo.forEach(s),ms=i(bt),Lo=p(bt,"DIV",{class:!0});var ts=J(Lo);h(qo.$$.fragment,ts),gs=i(ts),Cn=p(ts,"P",{"data-svelte-h":!0}),C(Cn)!=="svelte-1f4f5kp"&&(Cn.innerHTML=Ns),ts.forEach(s),hs=i(bt),Jo=p(bt,"DIV",{class:!0});var os=J(Jo);h(Ho.$$.fragment,os),fs=i(os),In=p(os,"P",{"data-svelte-h":!0}),C(In)!=="svelte-1ctpnmt"&&(In.textContent=Gs),os.forEach(s),us=i(bt),$n=p(bt,"DIV",{class:!0});var ea=J($n);h(So.$$.fragment,ea),ea.forEach(s),bt.forEach(s),Rn=i(e),h(Qo.$$.fragment,e),Xn=i(e),Wt=p(e,"DIV",{class:!0});var To=J(Wt);h(Yo.$$.fragment,To),_s=i(To),wn=p(To,"P",{"data-svelte-h":!0}),C(wn)!=="svelte-g8hwlw"&&(wn.innerHTML=Es),Ts=i(To),vn=p(To,"P",{"data-svelte-h":!0}),C(vn)!=="svelte-1ndfe3e"&&(vn.innerHTML=Rs),bs=i(To),Ot=p(To,"DIV",{class:!0});var Zo=J(Ot);h(Do.$$.fragment,Zo),Ms=i(Zo),xn=p(Zo,"P",{"data-svelte-h":!0}),C(xn)!=="svelte-js0y4v"&&(xn.textContent=Xs),ys=i(Zo),kn=p(Zo,"UL",{"data-svelte-h":!0}),C(kn)!=="svelte-uzwo54"&&(kn.innerHTML=qs),Cs=i(Zo),Pn=p(Zo,"P",{"data-svelte-h":!0}),C(Pn)!=="svelte-1bzh7dh"&&(Pn.textContent=Hs),Zo.forEach(s),Is=i(To),jo=p(To,"DIV",{class:!0});var ns=J(jo);h(Ao.$$.fragment,ns),$s=i(ns),Ln=p(ns,"P",{"data-svelte-h":!0}),C(Ln)!=="svelte-1ctpnmt"&&(Ln.textContent=Ss),ns.forEach(s),To.forEach(s),qn=i(e),h(Oo.$$.fragment,e),Hn=i(e),so=p(e,"DIV",{class:!0});var Wn=J(so);h(Ko.$$.fragment,Wn),ws=i(Wn),Jn=p(Wn,"P",{"data-svelte-h":!0}),C(Jn)!=="svelte-x48p92"&&(Jn.textContent=Qs),vs=i(Wn),Uo=p(Wn,"DIV",{class:!0});var ss=J(Uo);h(en.$$.fragment,ss),xs=i(ss),jn=p(ss,"P",{"data-svelte-h":!0}),C(jn)!=="svelte-1x3yxsa"&&(jn.textContent=Ys),ss.forEach(s),Wn.forEach(s),Sn=i(e),h(tn.$$.fragment,e),Qn=i(e),on=p(e,"DIV",{class:!0});var ta=J(on);h(nn.$$.fragment,ta),ta.forEach(s),Yn=i(e),h(sn.$$.fragment,e),Dn=i(e),Zt=p(e,"DIV",{class:!0});var bo=J(Zt);h(an.$$.fragment,bo),ks=i(bo),Un=p(bo,"P",{"data-svelte-h":!0}),C(Un)!=="svelte-ofpncz"&&(Un.textContent=Ds),Ps=i(bo),zn=p(bo,"P",{"data-svelte-h":!0}),C(zn)!=="svelte-154rbaw"&&(zn.innerHTML=As),Ls=i(bo),zo=p(bo,"DIV",{class:!0});var as=J(zo);h(rn.$$.fragment,as),Js=i(as),Fn=p(as,"P",{"data-svelte-h":!0}),C(Fn)!=="svelte-1ohneyw"&&(Fn.innerHTML=Os),as.forEach(s),js=i(bo),Fo=p(bo,"DIV",{class:!0});var rs=J(Fo);h(ln.$$.fragment,rs),Us=i(rs),Vn=p(rs,"P",{"data-svelte-h":!0}),C(Vn)!=="svelte-1pm6uli"&&(Vn.innerHTML=Ks),rs.forEach(s),bo.forEach(s),An=i(e),h(Vo.$$.fragment,e),On=i(e),h(dn.$$.fragment,e),Kn=i(e),En=p(e,"P",{}),J(En).forEach(s),this.h()},h(){j(t,"name","hf:doc:metadata"),j(t,"content",or),j(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,M){l(document.head,t),d(e,b,M),d(e,n,M),d(e,a,M),f(y,e,M),d(e,o,M),f(I,e,M),d(e,Oe,M),d(e,E,M),d(e,et,M),d(e,B,M),d(e,ee,M),d(e,L,M),d(e,tt,M),d(e,S,M),d(e,Be,M),f(ie,e,M),d(e,He,M),d(e,Me,M),d(e,ue,M),d(e,oe,M),d(e,_e,M),d(e,xe,M),d(e,Te,M),d(e,Ce,M),d(e,Q,M),f(le,e,M),d(e,je,M),f(N,e,M),d(e,ke,M),d(e,Se,M),d(e,ot,M),f($e,e,M),d(e,O,M),d(e,pe,M),d(e,se,M),f(Ue,e,M),d(e,yt,M),d(e,z,M),d(e,Ne,M),f(me,e,M),d(e,ct,M),f(Qe,e,M),d(e,X,M),d(e,Pe,M),d(e,de,M),d(e,q,M),d(e,W,M),f(ge,e,M),d(e,It,M),d(e,Z,M),d(e,Ge,M),f(he,e,M),d(e,pt,M),d(e,Ye,M),d(e,nt,M),f(ve,e,M),d(e,G,M),d(e,w,M),d(e,Y,M),d(e,be,M),d(e,D,M),f(ce,e,M),d(e,A,M),d(e,K,M),d(e,k,M),d(e,V,M),d(e,$t,M),f(Ve,e,M),d(e,st,M),d(e,at,M),d(e,jt,M),f(Le,e,M),d(e,Bt,M),d(e,io,M),d(e,ut,M),d(e,Ut,M),d(e,Kt,M),f(lo,e,M),d(e,Io,M),d(e,wt,M),d(e,qt,M),d(e,Yt,M),d(e,Mo,M),d(e,Je,M),d(e,$o,M),d(e,Nt,M),d(e,wo,M),d(e,Gt,M),d(e,vo,M),d(e,Et,M),d(e,xo,M),f(De,e,M),d(e,Dt,M),d(e,rt,M),f(Rt,rt,null),l(rt,hn),l(rt,mo),l(rt,Bo),l(rt,zt),l(rt,to),f(Ht,rt,null),l(rt,it),l(rt,vt),f(oo,vt,null),l(vt,go),l(vt,yo),d(e,no,M),f(ho,e,M),d(e,ko,M),d(e,Ae,M),f(fo,Ae,null),l(Ae,Go),l(Ae,lt),l(Ae,Eo),l(Ae,St),l(Ae,Ro),f(_t,Ae,null),d(e,Po,M),f(xt,e,M),d(e,Co,M),d(e,m,M),f(x,m,null),l(m,Ft),l(m,Xt),l(m,Tt),l(m,mt),l(m,Vt),f(We,m,null),d(e,Pt,M),f(Xe,e,M),d(e,Lt,M),d(e,R,M),f(dt,R,null),l(R,un),l(R,_n),l(R,is),l(R,Tn),l(R,ls),l(R,At),f(Xo,At,null),l(At,ds),l(At,bn),l(At,cs),l(At,Mn),l(At,ps),l(At,yn),l(R,ms),l(R,Lo),f(qo,Lo,null),l(Lo,gs),l(Lo,Cn),l(R,hs),l(R,Jo),f(Ho,Jo,null),l(Jo,fs),l(Jo,In),l(R,us),l(R,$n),f(So,$n,null),d(e,Rn,M),f(Qo,e,M),d(e,Xn,M),d(e,Wt,M),f(Yo,Wt,null),l(Wt,_s),l(Wt,wn),l(Wt,Ts),l(Wt,vn),l(Wt,bs),l(Wt,Ot),f(Do,Ot,null),l(Ot,Ms),l(Ot,xn),l(Ot,ys),l(Ot,kn),l(Ot,Cs),l(Ot,Pn),l(Wt,Is),l(Wt,jo),f(Ao,jo,null),l(jo,$s),l(jo,Ln),d(e,qn,M),f(Oo,e,M),d(e,Hn,M),d(e,so,M),f(Ko,so,null),l(so,ws),l(so,Jn),l(so,vs),l(so,Uo),f(en,Uo,null),l(Uo,xs),l(Uo,jn),d(e,Sn,M),f(tn,e,M),d(e,Qn,M),d(e,on,M),f(nn,on,null),d(e,Yn,M),f(sn,e,M),d(e,Dn,M),d(e,Zt,M),f(an,Zt,null),l(Zt,ks),l(Zt,Un),l(Zt,Ps),l(Zt,zn),l(Zt,Ls),l(Zt,zo),f(rn,zo,null),l(zo,Js),l(zo,Fn),l(Zt,js),l(Zt,Fo),f(ln,Fo,null),l(Fo,Us),l(Fo,Vn),d(e,An,M),f(Vo,e,M),d(e,On,M),f(dn,e,M),d(e,Kn,M),d(e,En,M),es=!0},p(e,[M]){const Qt={};M&2&&(Qt.$$scope={dirty:M,ctx:e}),Ue.$set(Qt);const cn={};M&2&&(cn.$$scope={dirty:M,ctx:e}),Ht.$set(cn);const ao={};M&2&&(ao.$$scope={dirty:M,ctx:e}),_t.$set(ao);const ro={};M&2&&(ro.$$scope={dirty:M,ctx:e}),We.$set(ro);const bt={};M&2&&(bt.$$scope={dirty:M,ctx:e}),Vo.$set(bt)},i(e){es||(u(y.$$.fragment,e),u(I.$$.fragment,e),u(ie.$$.fragment,e),u(le.$$.fragment,e),u(N.$$.fragment,e),u($e.$$.fragment,e),u(Ue.$$.fragment,e),u(me.$$.fragment,e),u(Qe.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(ve.$$.fragment,e),u(ce.$$.fragment,e),u(Ve.$$.fragment,e),u(Le.$$.fragment,e),u(lo.$$.fragment,e),u(De.$$.fragment,e),u(Rt.$$.fragment,e),u(Ht.$$.fragment,e),u(oo.$$.fragment,e),u(ho.$$.fragment,e),u(fo.$$.fragment,e),u(_t.$$.fragment,e),u(xt.$$.fragment,e),u(x.$$.fragment,e),u(We.$$.fragment,e),u(Xe.$$.fragment,e),u(dt.$$.fragment,e),u(Xo.$$.fragment,e),u(qo.$$.fragment,e),u(Ho.$$.fragment,e),u(So.$$.fragment,e),u(Qo.$$.fragment,e),u(Yo.$$.fragment,e),u(Do.$$.fragment,e),u(Ao.$$.fragment,e),u(Oo.$$.fragment,e),u(Ko.$$.fragment,e),u(en.$$.fragment,e),u(tn.$$.fragment,e),u(nn.$$.fragment,e),u(sn.$$.fragment,e),u(an.$$.fragment,e),u(rn.$$.fragment,e),u(ln.$$.fragment,e),u(Vo.$$.fragment,e),u(dn.$$.fragment,e),es=!0)},o(e){_(y.$$.fragment,e),_(I.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(N.$$.fragment,e),_($e.$$.fragment,e),_(Ue.$$.fragment,e),_(me.$$.fragment,e),_(Qe.$$.fragment,e),_(ge.$$.fragment,e),_(he.$$.fragment,e),_(ve.$$.fragment,e),_(ce.$$.fragment,e),_(Ve.$$.fragment,e),_(Le.$$.fragment,e),_(lo.$$.fragment,e),_(De.$$.fragment,e),_(Rt.$$.fragment,e),_(Ht.$$.fragment,e),_(oo.$$.fragment,e),_(ho.$$.fragment,e),_(fo.$$.fragment,e),_(_t.$$.fragment,e),_(xt.$$.fragment,e),_(x.$$.fragment,e),_(We.$$.fragment,e),_(Xe.$$.fragment,e),_(dt.$$.fragment,e),_(Xo.$$.fragment,e),_(qo.$$.fragment,e),_(Ho.$$.fragment,e),_(So.$$.fragment,e),_(Qo.$$.fragment,e),_(Yo.$$.fragment,e),_(Do.$$.fragment,e),_(Ao.$$.fragment,e),_(Oo.$$.fragment,e),_(Ko.$$.fragment,e),_(en.$$.fragment,e),_(tn.$$.fragment,e),_(nn.$$.fragment,e),_(sn.$$.fragment,e),_(an.$$.fragment,e),_(rn.$$.fragment,e),_(ln.$$.fragment,e),_(Vo.$$.fragment,e),_(dn.$$.fragment,e),es=!1},d(e){e&&(s(b),s(n),s(a),s(o),s(Oe),s(E),s(et),s(B),s(ee),s(L),s(tt),s(S),s(Be),s(He),s(Me),s(ue),s(oe),s(_e),s(xe),s(Te),s(Ce),s(Q),s(je),s(ke),s(Se),s(ot),s(O),s(pe),s(se),s(yt),s(z),s(Ne),s(ct),s(X),s(Pe),s(de),s(q),s(W),s(It),s(Z),s(Ge),s(pt),s(Ye),s(nt),s(G),s(w),s(Y),s(be),s(D),s(A),s(K),s(k),s(V),s($t),s(st),s(at),s(jt),s(Bt),s(io),s(ut),s(Ut),s(Kt),s(Io),s(wt),s(qt),s(Yt),s(Mo),s(Je),s($o),s(Nt),s(wo),s(Gt),s(vo),s(Et),s(xo),s(Dt),s(rt),s(no),s(ko),s(Ae),s(Po),s(Co),s(m),s(Pt),s(Lt),s(R),s(Rn),s(Xn),s(Wt),s(qn),s(Hn),s(so),s(Sn),s(Qn),s(on),s(Yn),s(Dn),s(Zt),s(An),s(On),s(Kn),s(En)),s(t),T(y,e),T(I,e),T(ie,e),T(le,e),T(N,e),T($e,e),T(Ue,e),T(me,e),T(Qe,e),T(ge,e),T(he,e),T(ve,e),T(ce,e),T(Ve,e),T(Le,e),T(lo,e),T(De,e),T(Rt),T(Ht),T(oo),T(ho,e),T(fo),T(_t),T(xt,e),T(x),T(We),T(Xe,e),T(dt),T(Xo),T(qo),T(Ho),T(So),T(Qo,e),T(Yo),T(Do),T(Ao),T(Oo,e),T(Ko),T(en),T(tn,e),T(nn),T(sn,e),T(an),T(rn),T(ln),T(Vo,e),T(dn,e)}}}const or='{"title":"CLIP","local":"clip","sections":[{"title":"개요","local":"overview","sections":[],"depth":2},{"title":"사용 팁과 예시","local":"usage-tips-and-example","sections":[{"title":"CLIP과 플래시 어텐션2 결합","local":"combining-clip-and-flash-attention-2","sections":[],"depth":3},{"title":"스케일된 내적 어텐션 (Scaled dot-product Attention(SDPA)) 사용하기","local":"using-scaled-dot-product-attention-sdpa","sections":[],"depth":3},{"title":"플래시 어텐션과 스케일된 내적 어텐션(SDPA)으로 인해 예상되는 속도향상","local":"expected-speedups-with-flash-attention-and-sdpa","sections":[{"title":"CLIPTextModel","local":"cliptextmodel","sections":[],"depth":4},{"title":"CLIPVisionModel","local":"clipvisionmodel","sections":[],"depth":4},{"title":"CLIPModel","local":"clipmodel","sections":[],"depth":4}],"depth":3}],"depth":2},{"title":"자료","local":"resources","sections":[],"depth":2},{"title":"CLIPConfig","local":"transformers.CLIPConfig ][ transformers.CLIPConfig","sections":[],"depth":2},{"title":"CLIPTextConfig","local":"transformers.CLIPTextConfig ][ transformers.CLIPTextConfig","sections":[],"depth":2},{"title":"CLIPVisionConfig","local":"transformers.CLIPVisionConfig ][ transformers.CLIPVisionConfig","sections":[],"depth":2},{"title":"CLIPTokenizer","local":"transformers.CLIPTokenizer ][ transformers.CLIPTokenizer","sections":[],"depth":2},{"title":"CLIPTokenizerFast","local":"transformers.CLIPTokenizerFast ][ transformers.CLIPTokenizerFast","sections":[],"depth":2},{"title":"CLIPImageProcessor","local":"transformers.CLIPImageProcessor ][ transformers.CLIPImageProcessor","sections":[],"depth":2},{"title":"CLIPFeatureExtractor","local":"transformers.CLIPFeatureExtractor ][ transformers.CLIPFeatureExtractor","sections":[],"depth":2},{"title":"CLIPProcessor","local":"transformers.CLIPProcessor ][ transformers.CLIPProcessor","sections":[],"depth":2},{"title":"CLIPModel","local":"transformers.CLIPModel ][ transformers.CLIPModel","sections":[],"depth":2},{"title":"CLIPTextModel","local":"transformers.CLIPTextModel ][ transformers.CLIPTextModel","sections":[],"depth":2},{"title":"CLIPTextModelWithProjection","local":"transformers.CLIPTextModelWithProjection ][ transformers.CLIPTextModelWithProjection","sections":[],"depth":2},{"title":"CLIPVisionModelWithProjection","local":"transformers.CLIPVisionModelWithProjection ][ transformers.CLIPVisionModelWithProjection","sections":[],"depth":2},{"title":"CLIPVisionModel","local":"transformers.CLIPVisionModel ][ transformers.CLIPVisionModel","sections":[],"depth":2},{"title":"CLIPForImageClassification","local":"transformers.CLIPForImageClassification ][ transformers.CLIPForImageClassification","sections":[],"depth":2},{"title":"TFCLIPModel","local":"transformers.TFCLIPModel ][ transformers.TFCLIPModel","sections":[],"depth":2},{"title":"TFCLIPTextModel","local":"transformers.TFCLIPTextModel ][ transformers.TFCLIPTextModel","sections":[],"depth":2},{"title":"TFCLIPVisionModel","local":"transformers.TFCLIPVisionModel ][ transformers.TFCLIPVisionModel","sections":[],"depth":2},{"title":"FlaxCLIPModel","local":"transformers.FlaxCLIPModel ][ transformers.FlaxCLIPModel","sections":[],"depth":2},{"title":"FlaxCLIPTextModel","local":"transformers.FlaxCLIPTextModel ][ transformers.FlaxCLIPTextModel","sections":[],"depth":2},{"title":"FlaxCLIPTextModelWithProjection","local":"transformers.FlaxCLIPTextModelWithProjection ][ transformers.FlaxCLIPTextModelWithProjection","sections":[],"depth":2},{"title":"FlaxCLIPVisionModel","local":"transformers.FlaxCLIPVisionModel ][ transformers.FlaxCLIPVisionModel","sections":[],"depth":2}],"depth":1}';function nr(v){return na(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gr extends sa{constructor(t){super(),aa(this,t,nr,tr,oa,{})}}export{gr as component};
