import{s as Jo,o as ko,n as W}from"../chunks/scheduler.9bc65507.js";import{S as zo,i as Uo,g as m,s as a,r as h,A as Zo,h as p,f as s,c as r,j as v,u as g,x as T,k as j,y as l,a as d,v as f,d as u,t as _,w as C}from"../chunks/index.707bf1b6.js";import{T as kt}from"../chunks/Tip.c2ecdbf4.js";import{D as w}from"../chunks/Docstring.17db21ae.js";import{C as O}from"../chunks/CodeBlock.54a9f38d.js";import{E as Ce}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as G}from"../chunks/Heading.342b1fa6.js";function Wo(I){let n,b="Example:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENoaW5lc2VDTElQQ29uZmlnJTJDJTIwQ2hpbmVzZUNMSVBNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDaGluZXNlQ0xJUENvbmZpZyUyMHdpdGglMjBPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2hpbmVzZUNMSVBDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDaGluZXNlQ0xJUE1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMENoaW5lc2VDTElQTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBDaGluZXNlQ0xJUENvbmZpZyUyMGZyb20lMjBhJTIwQ2hpbmVzZUNMSVBUZXh0Q29uZmlnJTIwYW5kJTIwYSUyMENoaW5lc2VDTElQVmlzaW9uQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENoaW5lc2VDTElQVGV4dENvbmZpZyUyMGFuZCUyMENoaW5lc2VDTElQVmlzaW9uQ29uZmlnJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ190ZXh0JTIwJTNEJTIwQ2hpbmVzZUNMSVBUZXh0Q29uZmlnKCklMEFjb25maWdfdmlzaW9uJTIwJTNEJTIwQ2hpbmVzZUNMSVBWaXNpb25Db25maWcoKSUwQSUwQWNvbmZpZyUyMCUzRCUyMENoaW5lc2VDTElQQ29uZmlnLmZyb21fdGV4dF92aXNpb25fY29uZmlncyhjb25maWdfdGV4dCUyQyUyMGNvbmZpZ192aXNpb24p",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ChineseCLIPConfig, ChineseCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPConfig with OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ChineseCLIPConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPModel (with random weights) from the OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPModel(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 ChineseCLIPConfig from a ChineseCLIPTextConfig and a ChineseCLIPVisionConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPTextConfig and ChineseCLIPVisionConfig configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = ChineseCLIPTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = ChineseCLIPVisionConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPTextConfig with OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ChineseCLIPTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPTextModel (with random weights) from the OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPTextModel(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPVisionConfig with OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ChineseCLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ChineseCLIPVisionModel (with random weights) from the OFA-Sys/chinese-clip-vit-base-patch16 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPVisionModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-11lpom8"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function Eo(I){let n,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(){n=m("p"),n.innerHTML=b},l(c){n=p(c,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(c,i){d(c,n,i)},p:W,d(c){c&&s(n)}}}function Bo(I){let n,b="Examples:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENoaW5lc2VDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENoaW5lc2VDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMk9GQS1TeXMlMkZjaGluZXNlLWNsaXAtdml0LWJhc2UtcGF0Y2gxNiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZjbGlwLWNuLWJlaWppbmcub3NzLWNuLWJlaWppbmcuYWxpeXVuY3MuY29tJTJGcG9rZW1vbi5qcGVnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0QlNUIlMjIlRTYlOUQlQjAlRTUlQjAlQkMlRTklQkUlOUYlMjIlMkMlMjAlMjIlRTUlQTYlOTklRTglOUIlOTklRTclQTclOEQlRTUlQUQlOTAlMjIlMkMlMjAlMjIlRTUlQjAlOEYlRTclODElQUIlRTklQkUlOTklMjIlMkMlMjAlMjIlRTclOUElQUUlRTUlOEQlQTElRTQlQjglOTglMjIlNUQlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUyMCUyMCUyMyUyMHRoaXMlMjBpcyUyMHRoZSUyMGltYWdlLXRleHQlMjBzaW1pbGFyaXR5JTIwc2NvcmUlMEFwcm9icyUyMCUzRCUyMGxvZ2l0c19wZXJfaW1hZ2Uuc29mdG1heChkaW0lM0QxKSUyMCUyMCUyMyUyMHdlJTIwY2FuJTIwdGFrZSUyMHRoZSUyMHNvZnRtYXglMjB0byUyMGdldCUyMHRoZSUyMGxhYmVsJTIwcHJvYmFiaWxpdGllcw==",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, ChineseCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://clip-cn-beijing.oss-cn-beijing.aliyuncs.com/pokemon.jpeg&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;杰尼龟&quot;</span>, <span class="hljs-string">&quot;妙蛙种子&quot;</span>, <span class="hljs-string">&quot;小火龙&quot;</span>, <span class="hljs-string">&quot;皮卡丘&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"># 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(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function Ro(I){let n,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(){n=m("p"),n.innerHTML=b},l(c){n=p(c,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(c,i){d(c,n,i)},p:W,d(c){c&&s(n)}}}function Go(I){let n,b="Examples:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDaGluZXNlQ0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBDaGluZXNlQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyT0ZBLVN5cyUyRmNoaW5lc2UtY2xpcC12aXQtYmFzZS1wYXRjaDE2JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjIlRTYlOUQlQjAlRTUlQjAlQkMlRTklQkUlOUYlMjIlMkMlMjAlMjIlRTUlQTYlOTklRTglOUIlOTklRTclQTclOEQlRTUlQUQlOTAlMjIlMkMlMjAlMjIlRTUlQjAlOEYlRTclODElQUIlRTklQkUlOTklMjIlMkMlMjAlMjIlRTclOUElQUUlRTUlOEQlQTElRTQlQjglOTglMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjB0ZXh0X2ZlYXR1cmVzJTIwJTJGJTIwdGV4dF9mZWF0dXJlcy5ub3JtKHAlM0QyJTJDJTIwZGltJTNELTElMkMlMjBrZWVwZGltJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ChineseCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;杰尼龟&quot;</span>, <span class="hljs-string">&quot;妙蛙种子&quot;</span>, <span class="hljs-string">&quot;小火龙&quot;</span>, <span class="hljs-string">&quot;皮卡丘&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)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = text_features / text_features.norm(p=<span class="hljs-number">2</span>, dim=-<span class="hljs-number">1</span>, keepdim=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function Xo(I){let n,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(){n=m("p"),n.innerHTML=b},l(c){n=p(c,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(c,i){d(c,n,i)},p:W,d(c){c&&s(n)}}}function Fo(I){let n,b="Examples:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENoaW5lc2VDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENoaW5lc2VDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMk9GQS1TeXMlMkZjaGluZXNlLWNsaXAtdml0LWJhc2UtcGF0Y2gxNiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZjbGlwLWNuLWJlaWppbmcub3NzLWNuLWJlaWppbmcuYWxpeXVuY3MuY29tJTJGcG9rZW1vbi5qcGVnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyklMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMGltYWdlX2ZlYXR1cmVzJTIwJTJGJTIwaW1hZ2VfZmVhdHVyZXMubm9ybShwJTNEMiUyQyUyMGRpbSUzRC0xJTJDJTIwa2VlcGRpbSUzRFRydWUp",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, ChineseCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://clip-cn-beijing.oss-cn-beijing.aliyuncs.com/pokemon.jpeg&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)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = image_features / image_features.norm(p=<span class="hljs-number">2</span>, dim=-<span class="hljs-number">1</span>, keepdim=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function So(I){let n,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(){n=m("p"),n.innerHTML=b},l(c){n=p(c,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(c,i){d(c,n,i)},p:W,d(c){c&&s(n)}}}function Ho(I){let n,b="Example:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDaGluZXNlQ0xJUFRleHRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyT0ZBLVN5cyUyRmNoaW5lc2UtY2xpcC12aXQtYmFzZS1wYXRjaDE2JTIyKSUwQW1vZGVsJTIwJTNEJTIwQ2hpbmVzZUNMSVBUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMk9GQS1TeXMlMkZjaGluZXNlLWNsaXAtdml0LWJhc2UtcGF0Y2gxNiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ChineseCLIPTextModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPTextModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</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_states = outputs.last_hidden_state`,wrap:!1}}),{c(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-11lpom8"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function Qo(I){let n,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(){n=m("p"),n.innerHTML=b},l(c){n=p(c,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(c,i){d(c,n,i)},p:W,d(c){c&&s(n)}}}function qo(I){let n,b="Examples:",c,i,M;return i=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFByb2Nlc3NvciUyQyUyMENoaW5lc2VDTElQVmlzaW9uTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENoaW5lc2VDTElQVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMk9GQS1TeXMlMkZjaGluZXNlLWNsaXAtdml0LWJhc2UtcGF0Y2gxNiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBDTElQUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZjbGlwLWNuLWJlaWppbmcub3NzLWNuLWJlaWppbmcuYWxpeXVuY3MuY29tJTJGcG9rZW1vbi5qcGVnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVkX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMENMUyUyMHN0YXRlcw==",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, ChineseCLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = CLIPProcessor.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://clip-cn-beijing.oss-cn-beijing.aliyuncs.com/pokemon.jpeg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`,wrap:!1}}),{c(){n=m("p"),n.textContent=b,c=a(),h(i.$$.fragment)},l(t){n=p(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=b),c=r(t),g(i.$$.fragment,t)},m(t,y){d(t,n,y),d(t,c,y),f(i,t,y),M=!0},p:W,i(t){M||(u(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(n),s(c)),C(i,t)}}}function Yo(I){let n,b,c,i,M,t,y,zt,Me,eo=`Chinese-CLIP An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou <a href="https://arxiv.org/abs/2211.01335" rel="nofollow">Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese</a> で提案されました。周、張周。
Chinese-CLIP は、中国語の画像とテキストのペアの大規模なデータセットに対する CLIP (Radford et al., 2021) の実装です。クロスモーダル検索を実行できるほか、ゼロショット画像分類、オープンドメインオブジェクト検出などのビジョンタスクのビジョンバックボーンとしても機能します。オリジナルの中国語-CLIPコードは<a href="https://github.com/OFA-Sys/Chinese-CLIP" rel="nofollow">このリンクで</a>。`,Ut,be,to="論文の要約は次のとおりです。",Zt,Te,no="<em>CLIP の大成功 (Radford et al., 2021) により、視覚言語の事前訓練のための対照学習の研究と応用が促進されました。この研究では、ほとんどのデータが公開されているデータセットから取得された中国語の画像とテキストのペアの大規模なデータセットを構築し、新しいデータセットで中国語の CLIP モデルを事前トレーニングします。当社では、7,700 万から 9 億 5,800 万のパラメータにわたる、複数のサイズの 5 つの中国 CLIP モデルを開発しています。さらに、モデルのパフォーマンスを向上させるために、最初に画像エンコーダーをフリーズさせてモデルをトレーニングし、次にすべてのパラメーターを最適化してトレーニングする 2 段階の事前トレーニング方法を提案します。私たちの包括的な実験では、中国の CLIP がゼロショット学習と微調整のセットアップで MUGE、Flickr30K-CN、および COCO-CN 上で最先端のパフォーマンスを達成でき、ゼロで競争力のあるパフォーマンスを達成できることを実証しています。 - ELEVATER ベンチマークでの評価に基づくショット画像の分類 (Li et al., 2022)。コード、事前トレーニング済みモデル、デモがリリースされました。</em>",Wt,ye,oo='Chinese-CLIP モデルは、<a href="https://huggingface.co/OFA-Sys" rel="nofollow">OFA-Sys</a> によって提供されました。',Vt,Ie,Nt,ve,so="以下のコード スニペットは、画像とテキストの特徴と類似性を計算する方法を示しています。",Et,je,Bt,we,ao="現在、次のスケールの事前トレーニング済み Chinese-CLIP モデルが 🤗 Hub で利用可能です。",Rt,Pe,ro='<li><a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-base-patch16" rel="nofollow">OFA-Sys/chinese-clip-vit-base-patch16</a></li> <li><a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-large-patch14" rel="nofollow">OFA-Sys/chinese-clip-vit-large-patch14</a></li> <li><a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-large-patch14-336px" rel="nofollow">OFA-Sys/chinese-clip-vit-large-patch14-336px</a></li> <li><a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-huge-patch14" rel="nofollow">OFA-Sys/chinese-clip-vit-huge-patch14</a></li>',Gt,$e,Xt,P,xe,cn,rt,io=`<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a>. It is used
to instantiate Chinese-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
Chinese-CLIP <a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-base-patch16" rel="nofollow">OFA-Sys/chinese-clip-vit-base-patch16</a>
architecture.`,dn,it,lo=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,mn,D,pn,K,Le,hn,lt,co=`Instantiate a <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a> (or a derived class) from Chinese-CLIP text model configuration and
Chinese-CLIP vision model configuration. Returns:
<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a>: An instance of a configuration object`,Ft,Je,St,J,ke,gn,ct,mo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a>. It is used to instantiate a
Chinese CLIP model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Chinese CLIP
[OFA-Sys/chinese-clip-vit-base-patch16](https:
//huggingface.co/OFA-Sys/chinese-clip-vit-base-patch16) architecture.`,fn,dt,po=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,un,ee,Ht,ze,Qt,k,Ue,_n,mt,ho=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a>. It is used to instantiate an
ChineseCLIP model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the ChineseCLIP
<a href="https://huggingface.co/OFA-Sys/chinese-clip-vit-base-patch16" rel="nofollow">OFA-Sys/chinese-clip-vit-base-patch16</a> architecture.`,Cn,pt,go=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Mn,te,qt,Ze,Yt,X,We,bn,ht,fo="Constructs a Chinese-CLIP image processor.",Tn,ne,Ve,yn,gt,uo="Preprocess an image or batch of images.",At,Ne,Ot,Ee,Be,Dt,Re,Kt,$,Ge,In,ft,_o=`Constructs a Chinese-CLIP processor which wraps a Chinese-CLIP image processor and a Chinese-CLIP tokenizer into a
single processor.`,vn,ut,Co=`<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPProcessor">ChineseCLIPProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPImageProcessor">ChineseCLIPImageProcessor</a> and <a href="/docs/transformers/main/ja/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>.
See the <code>__call__()</code> and <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPProcessor.decode">decode()</a> for more information.`,jn,oe,Xe,wn,_t,Mo=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Pn,se,Fe,$n,Ct,bo=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,en,Se,tn,x,He,xn,Mt,To=`This model is 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.`,Ln,V,Qe,Jn,bt,yo='The <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',kn,ae,zn,re,Un,N,qe,Zn,Tt,Io='The <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Wn,ie,Vn,le,Nn,E,Ye,En,yt,vo='The <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Bn,ce,Rn,de,nn,Ae,on,L,Oe,Gn,It,jo=`The text model from CHINESE_CLIP without any head or projection on top.
This model is 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.`,Xn,vt,wo=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention is
all you need</a> by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`,Fn,jt,Po=`To behave as an decoder the model needs to be initialized with the <code>is_decoder</code> argument of the configuration set
to <code>True</code>. To be used in a Seq2Seq model, the model needs to initialized with both <code>is_decoder</code> argument and
<code>add_cross_attention</code> set to <code>True</code>; an <code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,Sn,B,De,Hn,wt,$o='The <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPTextModel">ChineseCLIPTextModel</a> forward method, overrides the <code>__call__</code> special method.',Qn,me,qn,pe,sn,Ke,an,F,et,Yn,Pt,xo=`The vision model from CHINESE_CLIP without any head or projection on top.
This model is 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.`,An,R,tt,On,$t,Lo='The <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPVisionModel">ChineseCLIPVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Dn,he,Kn,ge,rn,Lt,ln;return M=new G({props:{title:"Chinese-CLIP",local:"chinese-clip",headingTag:"h1"}}),y=new G({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ie=new G({props:{title:"Usage example",local:"usage-example",headingTag:"h2"}}),je=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ2hpbmVzZUNMSVBQcm9jZXNzb3IlMkMlMjBDaGluZXNlQ0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBDaGluZXNlQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJPRkEtU3lzJTJGY2hpbmVzZS1jbGlwLXZpdC1iYXNlLXBhdGNoMTYlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ2hpbmVzZUNMSVBQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMk9GQS1TeXMlMkZjaGluZXNlLWNsaXAtdml0LWJhc2UtcGF0Y2gxNiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmNsaXAtY24tYmVpamluZy5vc3MtY24tYmVpamluZy5hbGl5dW5jcy5jb20lMkZwb2tlbW9uLmpwZWclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMjMlMjBTcXVpcnRsZSUyQyUyMEJ1bGJhc2F1ciUyQyUyMENoYXJtYW5kZXIlMkMlMjBQaWthY2h1JTIwaW4lMjBFbmdsaXNoJTBBdGV4dHMlMjAlM0QlMjAlNUIlMjIlRTYlOUQlQjAlRTUlQjAlQkMlRTklQkUlOUYlMjIlMkMlMjAlMjIlRTUlQTYlOTklRTglOUIlOTklRTclQTclOEQlRTUlQUQlOTAlMjIlMkMlMjAlMjIlRTUlQjAlOEYlRTclODElQUIlRTklQkUlOTklMjIlMkMlMjAlMjIlRTclOUElQUUlRTUlOEQlQTElRTQlQjglOTglMjIlNUQlMEElMEElMjMlMjBjb21wdXRlJTIwaW1hZ2UlMjBmZWF0dXJlJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyklMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMGltYWdlX2ZlYXR1cmVzJTIwJTJGJTIwaW1hZ2VfZmVhdHVyZXMubm9ybShwJTNEMiUyQyUyMGRpbSUzRC0xJTJDJTIwa2VlcGRpbSUzRFRydWUpJTIwJTIwJTIzJTIwbm9ybWFsaXplJTBBJTBBJTIzJTIwY29tcHV0ZSUyMHRleHQlMjBmZWF0dXJlcyUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEdGV4dHMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjB0ZXh0X2ZlYXR1cmVzJTIwJTJGJTIwdGV4dF9mZWF0dXJlcy5ub3JtKHAlM0QyJTJDJTIwZGltJTNELTElMkMlMjBrZWVwZGltJTNEVHJ1ZSklMjAlMjAlMjMlMjBub3JtYWxpemUlMEElMEElMjMlMjBjb21wdXRlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZXMlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRHRleHRzJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMjAlMjAlMjMlMjB0aGlzJTIwaXMlMjB0aGUlMjBpbWFnZS10ZXh0JTIwc2ltaWxhcml0eSUyMHNjb3JlJTBBcHJvYnMlMjAlM0QlMjBsb2dpdHNfcGVyX2ltYWdlLnNvZnRtYXgoZGltJTNEMSklMjAlMjAlMjMlMjBwcm9icyUzQSUyMCU1QiU1QjEuMjY4NmUtMDMlMkMlMjA1LjQ0OTllLTAyJTJDJTIwNi43OTY4ZS0wNCUyQyUyMDkuNDM1NWUtMDElNUQlNUQ=",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> ChineseCLIPProcessor, ChineseCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ChineseCLIPModel.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = ChineseCLIPProcessor.from_pretrained(<span class="hljs-string">&quot;OFA-Sys/chinese-clip-vit-base-patch16&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://clip-cn-beijing.oss-cn-beijing.aliyuncs.com/pokemon.jpeg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Squirtle, Bulbasaur, Charmander, Pikachu in English</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;杰尼龟&quot;</span>, <span class="hljs-string">&quot;妙蛙种子&quot;</span>, <span class="hljs-string">&quot;小火龙&quot;</span>, <span class="hljs-string">&quot;皮卡丘&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute image feature</span>
<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)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = image_features / image_features.norm(p=<span class="hljs-number">2</span>, dim=-<span class="hljs-number">1</span>, keepdim=<span class="hljs-literal">True</span>)  <span class="hljs-comment"># normalize</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute text features</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = text_features / text_features.norm(p=<span class="hljs-number">2</span>, dim=-<span class="hljs-number">1</span>, keepdim=<span class="hljs-literal">True</span>)  <span class="hljs-comment"># normalize</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute image-text similarity scores</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, 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"># 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"># probs: [[1.2686e-03, 5.4499e-02, 6.7968e-04, 9.4355e-01]]</span>`,wrap:!1}}),$e=new G({props:{title:"ChineseCLIPConfig",local:"transformers.ChineseCLIPConfig",headingTag:"h2"}}),xe=new w({props:{name:"class transformers.ChineseCLIPConfig",anchor:"transformers.ChineseCLIPConfig",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.ChineseCLIPConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPTextConfig">ChineseCLIPTextConfig</a>.`,name:"text_config"},{anchor:"transformers.ChineseCLIPConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPVisionConfig">ChineseCLIPVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.ChineseCLIPConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.ChineseCLIPConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original ChineseCLIP
implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.ChineseCLIPConfig.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/chinese_clip/configuration_chinese_clip.py#L274"}}),D=new Ce({props:{anchor:"transformers.ChineseCLIPConfig.example",$$slots:{default:[Wo]},$$scope:{ctx:I}}}),Le=new w({props:{name:"from_text_vision_configs",anchor:"transformers.ChineseCLIPConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": ChineseCLIPTextConfig"},{name:"vision_config",val:": ChineseCLIPVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L412"}}),Je=new G({props:{title:"ChineseCLIPTextConfig",local:"transformers.ChineseCLIPTextConfig",headingTag:"h2"}}),ke=new w({props:{name:"class transformers.ChineseCLIPTextConfig",anchor:"transformers.ChineseCLIPTextConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ChineseCLIPTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the CHINESE_CLIP model. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a>.`,name:"vocab_size"},{anchor:"transformers.ChineseCLIPTextConfig.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.ChineseCLIPTextConfig.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.ChineseCLIPTextConfig.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.ChineseCLIPTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ChineseCLIPTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ChineseCLIPTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ChineseCLIPTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ChineseCLIPTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.ChineseCLIPTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ChineseCLIPTextConfig.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.ChineseCLIPTextConfig.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.ChineseCLIPTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ChineseCLIPTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.ChineseCLIPTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.ChineseCLIPTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L37"}}),ee=new Ce({props:{anchor:"transformers.ChineseCLIPTextConfig.example",$$slots:{default:[Vo]},$$scope:{ctx:I}}}),ze=new G({props:{title:"ChineseCLIPVisionConfig",local:"transformers.ChineseCLIPVisionConfig",headingTag:"h2"}}),Ue=new w({props:{name:"class transformers.ChineseCLIPVisionConfig",anchor:"transformers.ChineseCLIPVisionConfig",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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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.ChineseCLIPVisionConfig.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/chinese_clip/configuration_chinese_clip.py#L166"}}),te=new Ce({props:{anchor:"transformers.ChineseCLIPVisionConfig.example",$$slots:{default:[No]},$$scope:{ctx:I}}}),Ze=new G({props:{title:"ChineseCLIPImageProcessor",local:"transformers.ChineseCLIPImageProcessor",headingTag:"h2"}}),We=new w({props:{name:"class transformers.ChineseCLIPImageProcessor",anchor:"transformers.ChineseCLIPImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": Dict = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.ChineseCLIPImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.ChineseCLIPImageProcessor.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/chinese_clip/image_processing_chinese_clip.py#L52"}}),Ve=new w({props:{name:"preprocess",anchor:"transformers.ChineseCLIPImageProcessor.preprocess",parameters:[{name:"images",val:": Union"},{name:"do_resize",val:": bool = None"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": int = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"return_tensors",val:": Union = None"},{name:"data_format",val:": Optional = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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.ChineseCLIPImageProcessor.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/chinese_clip/image_processing_chinese_clip.py#L182"}}),Ne=new G({props:{title:"ChineseCLIPFeatureExtractor",local:"transformers.ChineseCLIPFeatureExtractor",headingTag:"h2"}}),Be=new w({props:{name:"class transformers.ChineseCLIPFeatureExtractor",anchor:"transformers.ChineseCLIPFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/feature_extraction_chinese_clip.py#L26"}}),Re=new G({props:{title:"ChineseCLIPProcessor",local:"transformers.ChineseCLIPProcessor",headingTag:"h2"}}),Ge=new w({props:{name:"class transformers.ChineseCLIPProcessor",anchor:"transformers.ChineseCLIPProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ChineseCLIPProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPImageProcessor">ChineseCLIPImageProcessor</a>, <em>optional</em>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.ChineseCLIPProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ja/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>, <em>optional</em>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/processing_chinese_clip.py#L25"}}),Xe=new w({props:{name:"batch_decode",anchor:"transformers.ChineseCLIPProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/processing_chinese_clip.py#L115"}}),Fe=new w({props:{name:"decode",anchor:"transformers.ChineseCLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/processing_chinese_clip.py#L122"}}),Se=new G({props:{title:"ChineseCLIPModel",local:"transformers.ChineseCLIPModel",headingTag:"h2"}}),He=new w({props:{name:"class transformers.ChineseCLIPModel",anchor:"transformers.ChineseCLIPModel",parameters:[{name:"config",val:": ChineseCLIPConfig"}],parametersDescription:[{anchor:"transformers.ChineseCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1331"}}),Qe=new w({props:{name:"forward",anchor:"transformers.ChineseCLIPModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"pixel_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"return_loss",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ChineseCLIPModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ChineseCLIPModel.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.ChineseCLIPModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.ChineseCLIPModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ChineseCLIPModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ja/model_doc/deformable_detr#transformers.DeformableDetrFeatureExtractor.__call__">ChineseCLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ChineseCLIPModel.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.ChineseCLIPModel.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.ChineseCLIPModel.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.ChineseCLIPModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1467",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.chinese_clip.modeling_chinese_clip.ChineseCLIPOutput</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.chinese_clip.configuration_chinese_clip.ChineseCLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>torch.FloatTensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPTextModel"
>ChineseCLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPVisionModel"
>ChineseCLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPoolingAndCrossAttentions</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPTextModel"
>ChineseCLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPoolingAndCrossAttentions</code>):</strong>
The output of the <a
  href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPVisionModel"
>ChineseCLIPVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.chinese_clip.modeling_chinese_clip.ChineseCLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new kt({props:{$$slots:{default:[Eo]},$$scope:{ctx:I}}}),re=new Ce({props:{anchor:"transformers.ChineseCLIPModel.forward.example",$$slots:{default:[Bo]},$$scope:{ctx:I}}}),qe=new w({props:{name:"get_text_features",anchor:"transformers.ChineseCLIPModel.get_text_features",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ChineseCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ChineseCLIPModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ChineseCLIPModel.get_text_features.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.ChineseCLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ChineseCLIPModel.get_text_features.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ChineseCLIPModel.get_text_features.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.ChineseCLIPModel.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.ChineseCLIPModel.get_text_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ChineseCLIPModel.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/ja/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/chinese_clip/modeling_chinese_clip.py#L1367",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the final [CLS] hidden state of Text-Transformer.</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>
`}}),ie=new kt({props:{$$slots:{default:[Ro]},$$scope:{ctx:I}}}),le=new Ce({props:{anchor:"transformers.ChineseCLIPModel.get_text_features.example",$$slots:{default:[Go]},$$scope:{ctx:I}}}),Ye=new w({props:{name:"get_image_features",anchor:"transformers.ChineseCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ChineseCLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ja/model_doc/deformable_detr#transformers.DeformableDetrFeatureExtractor.__call__">ChineseCLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ChineseCLIPModel.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.ChineseCLIPModel.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.ChineseCLIPModel.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/ja/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/chinese_clip/modeling_chinese_clip.py#L1417",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by
applying the projection layer to the final [CLS] hidden state of Vision-Transformer.</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>
`}}),ce=new kt({props:{$$slots:{default:[Xo]},$$scope:{ctx:I}}}),de=new Ce({props:{anchor:"transformers.ChineseCLIPModel.get_image_features.example",$$slots:{default:[Fo]},$$scope:{ctx:I}}}),Ae=new G({props:{title:"ChineseCLIPTextModel",local:"transformers.ChineseCLIPTextModel",headingTag:"h2"}}),Oe=new w({props:{name:"class transformers.ChineseCLIPTextModel",anchor:"transformers.ChineseCLIPTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.ChineseCLIPTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1091"}}),De=new w({props:{name:"forward",anchor:"transformers.ChineseCLIPTextModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ChineseCLIPTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ChineseCLIPTextModel.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.ChineseCLIPTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.ChineseCLIPTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ChineseCLIPTextModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ja/model_doc/deformable_detr#transformers.DeformableDetrFeatureExtractor.__call__">ChineseCLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ChineseCLIPTextModel.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.ChineseCLIPTextModel.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.ChineseCLIPTextModel.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.ChineseCLIPTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ChineseCLIPTextModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.ChineseCLIPTextModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.ChineseCLIPTextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.ChineseCLIPTextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1136",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new kt({props:{$$slots:{default:[So]},$$scope:{ctx:I}}}),pe=new Ce({props:{anchor:"transformers.ChineseCLIPTextModel.forward.example",$$slots:{default:[Ho]},$$scope:{ctx:I}}}),Ke=new G({props:{title:"ChineseCLIPVisionModel",local:"transformers.ChineseCLIPVisionModel",headingTag:"h2"}}),et=new w({props:{name:"class transformers.ChineseCLIPVisionModel",anchor:"transformers.ChineseCLIPVisionModel",parameters:[{name:"config",val:": ChineseCLIPVisionConfig"}],parametersDescription:[{anchor:"transformers.ChineseCLIPVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1273"}}),tt=new w({props:{name:"forward",anchor:"transformers.ChineseCLIPVisionModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ChineseCLIPVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/ja/model_doc/deformable_detr#transformers.DeformableDetrFeatureExtractor.__call__">ChineseCLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ChineseCLIPVisionModel.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.ChineseCLIPVisionModel.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.ChineseCLIPVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1290",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new kt({props:{$$slots:{default:[Qo]},$$scope:{ctx:I}}}),ge=new Ce({props:{anchor:"transformers.ChineseCLIPVisionModel.forward.example",$$slots:{default:[qo]},$$scope:{ctx:I}}}),{c(){n=m("meta"),b=a(),c=m("p"),i=a(),h(M.$$.fragment),t=a(),h(y.$$.fragment),zt=a(),Me=m("p"),Me.innerHTML=eo,Ut=a(),be=m("p"),be.textContent=to,Zt=a(),Te=m("p"),Te.innerHTML=no,Wt=a(),ye=m("p"),ye.innerHTML=oo,Vt=a(),h(Ie.$$.fragment),Nt=a(),ve=m("p"),ve.textContent=so,Et=a(),h(je.$$.fragment),Bt=a(),we=m("p"),we.textContent=ao,Rt=a(),Pe=m("ul"),Pe.innerHTML=ro,Gt=a(),h($e.$$.fragment),Xt=a(),P=m("div"),h(xe.$$.fragment),cn=a(),rt=m("p"),rt.innerHTML=io,dn=a(),it=m("p"),it.innerHTML=lo,mn=a(),h(D.$$.fragment),pn=a(),K=m("div"),h(Le.$$.fragment),hn=a(),lt=m("p"),lt.innerHTML=co,Ft=a(),h(Je.$$.fragment),St=a(),J=m("div"),h(ke.$$.fragment),gn=a(),ct=m("p"),ct.innerHTML=mo,fn=a(),dt=m("p"),dt.innerHTML=po,un=a(),h(ee.$$.fragment),Ht=a(),h(ze.$$.fragment),Qt=a(),k=m("div"),h(Ue.$$.fragment),_n=a(),mt=m("p"),mt.innerHTML=ho,Cn=a(),pt=m("p"),pt.innerHTML=go,Mn=a(),h(te.$$.fragment),qt=a(),h(Ze.$$.fragment),Yt=a(),X=m("div"),h(We.$$.fragment),bn=a(),ht=m("p"),ht.textContent=fo,Tn=a(),ne=m("div"),h(Ve.$$.fragment),yn=a(),gt=m("p"),gt.textContent=uo,At=a(),h(Ne.$$.fragment),Ot=a(),Ee=m("div"),h(Be.$$.fragment),Dt=a(),h(Re.$$.fragment),Kt=a(),$=m("div"),h(Ge.$$.fragment),In=a(),ft=m("p"),ft.textContent=_o,vn=a(),ut=m("p"),ut.innerHTML=Co,jn=a(),oe=m("div"),h(Xe.$$.fragment),wn=a(),_t=m("p"),_t.innerHTML=Mo,Pn=a(),se=m("div"),h(Fe.$$.fragment),$n=a(),Ct=m("p"),Ct.innerHTML=bo,en=a(),h(Se.$$.fragment),tn=a(),x=m("div"),h(He.$$.fragment),xn=a(),Mt=m("p"),Mt.innerHTML=To,Ln=a(),V=m("div"),h(Qe.$$.fragment),Jn=a(),bt=m("p"),bt.innerHTML=yo,kn=a(),h(ae.$$.fragment),zn=a(),h(re.$$.fragment),Un=a(),N=m("div"),h(qe.$$.fragment),Zn=a(),Tt=m("p"),Tt.innerHTML=Io,Wn=a(),h(ie.$$.fragment),Vn=a(),h(le.$$.fragment),Nn=a(),E=m("div"),h(Ye.$$.fragment),En=a(),yt=m("p"),yt.innerHTML=vo,Bn=a(),h(ce.$$.fragment),Rn=a(),h(de.$$.fragment),nn=a(),h(Ae.$$.fragment),on=a(),L=m("div"),h(Oe.$$.fragment),Gn=a(),It=m("p"),It.innerHTML=jo,Xn=a(),vt=m("p"),vt.innerHTML=wo,Fn=a(),jt=m("p"),jt.innerHTML=Po,Sn=a(),B=m("div"),h(De.$$.fragment),Hn=a(),wt=m("p"),wt.innerHTML=$o,Qn=a(),h(me.$$.fragment),qn=a(),h(pe.$$.fragment),sn=a(),h(Ke.$$.fragment),an=a(),F=m("div"),h(et.$$.fragment),Yn=a(),Pt=m("p"),Pt.innerHTML=xo,An=a(),R=m("div"),h(tt.$$.fragment),On=a(),$t=m("p"),$t.innerHTML=Lo,Dn=a(),h(he.$$.fragment),Kn=a(),h(ge.$$.fragment),rn=a(),Lt=m("p"),this.h()},l(e){const o=Zo("svelte-u9bgzb",document.head);n=p(o,"META",{name:!0,content:!0}),o.forEach(s),b=r(e),c=p(e,"P",{}),v(c).forEach(s),i=r(e),g(M.$$.fragment,e),t=r(e),g(y.$$.fragment,e),zt=r(e),Me=p(e,"P",{"data-svelte-h":!0}),T(Me)!=="svelte-1n40eat"&&(Me.innerHTML=eo),Ut=r(e),be=p(e,"P",{"data-svelte-h":!0}),T(be)!=="svelte-1cv3nri"&&(be.textContent=to),Zt=r(e),Te=p(e,"P",{"data-svelte-h":!0}),T(Te)!=="svelte-13yjhn7"&&(Te.innerHTML=no),Wt=r(e),ye=p(e,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-67b1ll"&&(ye.innerHTML=oo),Vt=r(e),g(Ie.$$.fragment,e),Nt=r(e),ve=p(e,"P",{"data-svelte-h":!0}),T(ve)!=="svelte-1oamwfs"&&(ve.textContent=so),Et=r(e),g(je.$$.fragment,e),Bt=r(e),we=p(e,"P",{"data-svelte-h":!0}),T(we)!=="svelte-vyydp0"&&(we.textContent=ao),Rt=r(e),Pe=p(e,"UL",{"data-svelte-h":!0}),T(Pe)!=="svelte-14rhxk4"&&(Pe.innerHTML=ro),Gt=r(e),g($e.$$.fragment,e),Xt=r(e),P=p(e,"DIV",{class:!0});var z=v(P);g(xe.$$.fragment,z),cn=r(z),rt=p(z,"P",{"data-svelte-h":!0}),T(rt)!=="svelte-179fijg"&&(rt.innerHTML=io),dn=r(z),it=p(z,"P",{"data-svelte-h":!0}),T(it)!=="svelte-1s6wgpv"&&(it.innerHTML=lo),mn=r(z),g(D.$$.fragment,z),pn=r(z),K=p(z,"DIV",{class:!0});var nt=v(K);g(Le.$$.fragment,nt),hn=r(nt),lt=p(nt,"P",{"data-svelte-h":!0}),T(lt)!=="svelte-1ti3lyr"&&(lt.innerHTML=co),nt.forEach(s),z.forEach(s),Ft=r(e),g(Je.$$.fragment,e),St=r(e),J=p(e,"DIV",{class:!0});var S=v(J);g(ke.$$.fragment,S),gn=r(S),ct=p(S,"P",{"data-svelte-h":!0}),T(ct)!=="svelte-zih9i7"&&(ct.innerHTML=mo),fn=r(S),dt=p(S,"P",{"data-svelte-h":!0}),T(dt)!=="svelte-1s6wgpv"&&(dt.innerHTML=po),un=r(S),g(ee.$$.fragment,S),S.forEach(s),Ht=r(e),g(ze.$$.fragment,e),Qt=r(e),k=p(e,"DIV",{class:!0});var H=v(k);g(Ue.$$.fragment,H),_n=r(H),mt=p(H,"P",{"data-svelte-h":!0}),T(mt)!=="svelte-10pl4hz"&&(mt.innerHTML=ho),Cn=r(H),pt=p(H,"P",{"data-svelte-h":!0}),T(pt)!=="svelte-1s6wgpv"&&(pt.innerHTML=go),Mn=r(H),g(te.$$.fragment,H),H.forEach(s),qt=r(e),g(Ze.$$.fragment,e),Yt=r(e),X=p(e,"DIV",{class:!0});var A=v(X);g(We.$$.fragment,A),bn=r(A),ht=p(A,"P",{"data-svelte-h":!0}),T(ht)!=="svelte-13f40b0"&&(ht.textContent=fo),Tn=r(A),ne=p(A,"DIV",{class:!0});var ot=v(ne);g(Ve.$$.fragment,ot),yn=r(ot),gt=p(ot,"P",{"data-svelte-h":!0}),T(gt)!=="svelte-1x3yxsa"&&(gt.textContent=uo),ot.forEach(s),A.forEach(s),At=r(e),g(Ne.$$.fragment,e),Ot=r(e),Ee=p(e,"DIV",{class:!0});var Jt=v(Ee);g(Be.$$.fragment,Jt),Jt.forEach(s),Dt=r(e),g(Re.$$.fragment,e),Kt=r(e),$=p(e,"DIV",{class:!0});var U=v($);g(Ge.$$.fragment,U),In=r(U),ft=p(U,"P",{"data-svelte-h":!0}),T(ft)!=="svelte-1qx1ch7"&&(ft.textContent=_o),vn=r(U),ut=p(U,"P",{"data-svelte-h":!0}),T(ut)!=="svelte-6n0q96"&&(ut.innerHTML=Co),jn=r(U),oe=p(U,"DIV",{class:!0});var st=v(oe);g(Xe.$$.fragment,st),wn=r(st),_t=p(st,"P",{"data-svelte-h":!0}),T(_t)!=="svelte-5dhv7w"&&(_t.innerHTML=Mo),st.forEach(s),Pn=r(U),se=p(U,"DIV",{class:!0});var at=v(se);g(Fe.$$.fragment,at),$n=r(at),Ct=p(at,"P",{"data-svelte-h":!0}),T(Ct)!=="svelte-1o4d1yq"&&(Ct.innerHTML=bo),at.forEach(s),U.forEach(s),en=r(e),g(Se.$$.fragment,e),tn=r(e),x=p(e,"DIV",{class:!0});var Z=v(x);g(He.$$.fragment,Z),xn=r(Z),Mt=p(Z,"P",{"data-svelte-h":!0}),T(Mt)!=="svelte-1gjh92c"&&(Mt.innerHTML=To),Ln=r(Z),V=p(Z,"DIV",{class:!0});var Q=v(V);g(Qe.$$.fragment,Q),Jn=r(Q),bt=p(Q,"P",{"data-svelte-h":!0}),T(bt)!=="svelte-1gmgm2n"&&(bt.innerHTML=yo),kn=r(Q),g(ae.$$.fragment,Q),zn=r(Q),g(re.$$.fragment,Q),Q.forEach(s),Un=r(Z),N=p(Z,"DIV",{class:!0});var q=v(N);g(qe.$$.fragment,q),Zn=r(q),Tt=p(q,"P",{"data-svelte-h":!0}),T(Tt)!=="svelte-1gmgm2n"&&(Tt.innerHTML=Io),Wn=r(q),g(ie.$$.fragment,q),Vn=r(q),g(le.$$.fragment,q),q.forEach(s),Nn=r(Z),E=p(Z,"DIV",{class:!0});var fe=v(E);g(Ye.$$.fragment,fe),En=r(fe),yt=p(fe,"P",{"data-svelte-h":!0}),T(yt)!=="svelte-1gmgm2n"&&(yt.innerHTML=vo),Bn=r(fe),g(ce.$$.fragment,fe),Rn=r(fe),g(de.$$.fragment,fe),fe.forEach(s),Z.forEach(s),nn=r(e),g(Ae.$$.fragment,e),on=r(e),L=p(e,"DIV",{class:!0});var Y=v(L);g(Oe.$$.fragment,Y),Gn=r(Y),It=p(Y,"P",{"data-svelte-h":!0}),T(It)!=="svelte-1qchh77"&&(It.innerHTML=jo),Xn=r(Y),vt=p(Y,"P",{"data-svelte-h":!0}),T(vt)!=="svelte-1du13oj"&&(vt.innerHTML=wo),Fn=r(Y),jt=p(Y,"P",{"data-svelte-h":!0}),T(jt)!=="svelte-174erte"&&(jt.innerHTML=Po),Sn=r(Y),B=p(Y,"DIV",{class:!0});var ue=v(B);g(De.$$.fragment,ue),Hn=r(ue),wt=p(ue,"P",{"data-svelte-h":!0}),T(wt)!=="svelte-mnp3kp"&&(wt.innerHTML=$o),Qn=r(ue),g(me.$$.fragment,ue),qn=r(ue),g(pe.$$.fragment,ue),ue.forEach(s),Y.forEach(s),sn=r(e),g(Ke.$$.fragment,e),an=r(e),F=p(e,"DIV",{class:!0});var xt=v(F);g(et.$$.fragment,xt),Yn=r(xt),Pt=p(xt,"P",{"data-svelte-h":!0}),T(Pt)!=="svelte-oxx39y"&&(Pt.innerHTML=xo),An=r(xt),R=p(xt,"DIV",{class:!0});var _e=v(R);g(tt.$$.fragment,_e),On=r(_e),$t=p(_e,"P",{"data-svelte-h":!0}),T($t)!=="svelte-93gaq7"&&($t.innerHTML=Lo),Dn=r(_e),g(he.$$.fragment,_e),Kn=r(_e),g(ge.$$.fragment,_e),_e.forEach(s),xt.forEach(s),rn=r(e),Lt=p(e,"P",{}),v(Lt).forEach(s),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",Ao),j(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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(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(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(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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($,"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(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(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(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(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(F,"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,o){l(document.head,n),d(e,b,o),d(e,c,o),d(e,i,o),f(M,e,o),d(e,t,o),f(y,e,o),d(e,zt,o),d(e,Me,o),d(e,Ut,o),d(e,be,o),d(e,Zt,o),d(e,Te,o),d(e,Wt,o),d(e,ye,o),d(e,Vt,o),f(Ie,e,o),d(e,Nt,o),d(e,ve,o),d(e,Et,o),f(je,e,o),d(e,Bt,o),d(e,we,o),d(e,Rt,o),d(e,Pe,o),d(e,Gt,o),f($e,e,o),d(e,Xt,o),d(e,P,o),f(xe,P,null),l(P,cn),l(P,rt),l(P,dn),l(P,it),l(P,mn),f(D,P,null),l(P,pn),l(P,K),f(Le,K,null),l(K,hn),l(K,lt),d(e,Ft,o),f(Je,e,o),d(e,St,o),d(e,J,o),f(ke,J,null),l(J,gn),l(J,ct),l(J,fn),l(J,dt),l(J,un),f(ee,J,null),d(e,Ht,o),f(ze,e,o),d(e,Qt,o),d(e,k,o),f(Ue,k,null),l(k,_n),l(k,mt),l(k,Cn),l(k,pt),l(k,Mn),f(te,k,null),d(e,qt,o),f(Ze,e,o),d(e,Yt,o),d(e,X,o),f(We,X,null),l(X,bn),l(X,ht),l(X,Tn),l(X,ne),f(Ve,ne,null),l(ne,yn),l(ne,gt),d(e,At,o),f(Ne,e,o),d(e,Ot,o),d(e,Ee,o),f(Be,Ee,null),d(e,Dt,o),f(Re,e,o),d(e,Kt,o),d(e,$,o),f(Ge,$,null),l($,In),l($,ft),l($,vn),l($,ut),l($,jn),l($,oe),f(Xe,oe,null),l(oe,wn),l(oe,_t),l($,Pn),l($,se),f(Fe,se,null),l(se,$n),l(se,Ct),d(e,en,o),f(Se,e,o),d(e,tn,o),d(e,x,o),f(He,x,null),l(x,xn),l(x,Mt),l(x,Ln),l(x,V),f(Qe,V,null),l(V,Jn),l(V,bt),l(V,kn),f(ae,V,null),l(V,zn),f(re,V,null),l(x,Un),l(x,N),f(qe,N,null),l(N,Zn),l(N,Tt),l(N,Wn),f(ie,N,null),l(N,Vn),f(le,N,null),l(x,Nn),l(x,E),f(Ye,E,null),l(E,En),l(E,yt),l(E,Bn),f(ce,E,null),l(E,Rn),f(de,E,null),d(e,nn,o),f(Ae,e,o),d(e,on,o),d(e,L,o),f(Oe,L,null),l(L,Gn),l(L,It),l(L,Xn),l(L,vt),l(L,Fn),l(L,jt),l(L,Sn),l(L,B),f(De,B,null),l(B,Hn),l(B,wt),l(B,Qn),f(me,B,null),l(B,qn),f(pe,B,null),d(e,sn,o),f(Ke,e,o),d(e,an,o),d(e,F,o),f(et,F,null),l(F,Yn),l(F,Pt),l(F,An),l(F,R),f(tt,R,null),l(R,On),l(R,$t),l(R,Dn),f(he,R,null),l(R,Kn),f(ge,R,null),d(e,rn,o),d(e,Lt,o),ln=!0},p(e,[o]){const z={};o&2&&(z.$$scope={dirty:o,ctx:e}),D.$set(z);const nt={};o&2&&(nt.$$scope={dirty:o,ctx:e}),ee.$set(nt);const S={};o&2&&(S.$$scope={dirty:o,ctx:e}),te.$set(S);const H={};o&2&&(H.$$scope={dirty:o,ctx:e}),ae.$set(H);const A={};o&2&&(A.$$scope={dirty:o,ctx:e}),re.$set(A);const ot={};o&2&&(ot.$$scope={dirty:o,ctx:e}),ie.$set(ot);const Jt={};o&2&&(Jt.$$scope={dirty:o,ctx:e}),le.$set(Jt);const U={};o&2&&(U.$$scope={dirty:o,ctx:e}),ce.$set(U);const st={};o&2&&(st.$$scope={dirty:o,ctx:e}),de.$set(st);const at={};o&2&&(at.$$scope={dirty:o,ctx:e}),me.$set(at);const Z={};o&2&&(Z.$$scope={dirty:o,ctx:e}),pe.$set(Z);const Q={};o&2&&(Q.$$scope={dirty:o,ctx:e}),he.$set(Q);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),ge.$set(q)},i(e){ln||(u(M.$$.fragment,e),u(y.$$.fragment,e),u(Ie.$$.fragment,e),u(je.$$.fragment,e),u($e.$$.fragment,e),u(xe.$$.fragment,e),u(D.$$.fragment,e),u(Le.$$.fragment,e),u(Je.$$.fragment,e),u(ke.$$.fragment,e),u(ee.$$.fragment,e),u(ze.$$.fragment,e),u(Ue.$$.fragment,e),u(te.$$.fragment,e),u(Ze.$$.fragment,e),u(We.$$.fragment,e),u(Ve.$$.fragment,e),u(Ne.$$.fragment,e),u(Be.$$.fragment,e),u(Re.$$.fragment,e),u(Ge.$$.fragment,e),u(Xe.$$.fragment,e),u(Fe.$$.fragment,e),u(Se.$$.fragment,e),u(He.$$.fragment,e),u(Qe.$$.fragment,e),u(ae.$$.fragment,e),u(re.$$.fragment,e),u(qe.$$.fragment,e),u(ie.$$.fragment,e),u(le.$$.fragment,e),u(Ye.$$.fragment,e),u(ce.$$.fragment,e),u(de.$$.fragment,e),u(Ae.$$.fragment,e),u(Oe.$$.fragment,e),u(De.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(tt.$$.fragment,e),u(he.$$.fragment,e),u(ge.$$.fragment,e),ln=!0)},o(e){_(M.$$.fragment,e),_(y.$$.fragment,e),_(Ie.$$.fragment,e),_(je.$$.fragment,e),_($e.$$.fragment,e),_(xe.$$.fragment,e),_(D.$$.fragment,e),_(Le.$$.fragment,e),_(Je.$$.fragment,e),_(ke.$$.fragment,e),_(ee.$$.fragment,e),_(ze.$$.fragment,e),_(Ue.$$.fragment,e),_(te.$$.fragment,e),_(Ze.$$.fragment,e),_(We.$$.fragment,e),_(Ve.$$.fragment,e),_(Ne.$$.fragment,e),_(Be.$$.fragment,e),_(Re.$$.fragment,e),_(Ge.$$.fragment,e),_(Xe.$$.fragment,e),_(Fe.$$.fragment,e),_(Se.$$.fragment,e),_(He.$$.fragment,e),_(Qe.$$.fragment,e),_(ae.$$.fragment,e),_(re.$$.fragment,e),_(qe.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(Ye.$$.fragment,e),_(ce.$$.fragment,e),_(de.$$.fragment,e),_(Ae.$$.fragment,e),_(Oe.$$.fragment,e),_(De.$$.fragment,e),_(me.$$.fragment,e),_(pe.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(he.$$.fragment,e),_(ge.$$.fragment,e),ln=!1},d(e){e&&(s(b),s(c),s(i),s(t),s(zt),s(Me),s(Ut),s(be),s(Zt),s(Te),s(Wt),s(ye),s(Vt),s(Nt),s(ve),s(Et),s(Bt),s(we),s(Rt),s(Pe),s(Gt),s(Xt),s(P),s(Ft),s(St),s(J),s(Ht),s(Qt),s(k),s(qt),s(Yt),s(X),s(At),s(Ot),s(Ee),s(Dt),s(Kt),s($),s(en),s(tn),s(x),s(nn),s(on),s(L),s(sn),s(an),s(F),s(rn),s(Lt)),s(n),C(M,e),C(y,e),C(Ie,e),C(je,e),C($e,e),C(xe),C(D),C(Le),C(Je,e),C(ke),C(ee),C(ze,e),C(Ue),C(te),C(Ze,e),C(We),C(Ve),C(Ne,e),C(Be),C(Re,e),C(Ge),C(Xe),C(Fe),C(Se,e),C(He),C(Qe),C(ae),C(re),C(qe),C(ie),C(le),C(Ye),C(ce),C(de),C(Ae,e),C(Oe),C(De),C(me),C(pe),C(Ke,e),C(et),C(tt),C(he),C(ge)}}}const Ao='{"title":"Chinese-CLIP","local":"chinese-clip","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage example","local":"usage-example","sections":[],"depth":2},{"title":"ChineseCLIPConfig","local":"transformers.ChineseCLIPConfig","sections":[],"depth":2},{"title":"ChineseCLIPTextConfig","local":"transformers.ChineseCLIPTextConfig","sections":[],"depth":2},{"title":"ChineseCLIPVisionConfig","local":"transformers.ChineseCLIPVisionConfig","sections":[],"depth":2},{"title":"ChineseCLIPImageProcessor","local":"transformers.ChineseCLIPImageProcessor","sections":[],"depth":2},{"title":"ChineseCLIPFeatureExtractor","local":"transformers.ChineseCLIPFeatureExtractor","sections":[],"depth":2},{"title":"ChineseCLIPProcessor","local":"transformers.ChineseCLIPProcessor","sections":[],"depth":2},{"title":"ChineseCLIPModel","local":"transformers.ChineseCLIPModel","sections":[],"depth":2},{"title":"ChineseCLIPTextModel","local":"transformers.ChineseCLIPTextModel","sections":[],"depth":2},{"title":"ChineseCLIPVisionModel","local":"transformers.ChineseCLIPVisionModel","sections":[],"depth":2}],"depth":1}';function Oo(I){return ko(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class as extends zo{constructor(n){super(),Uo(this,n,Oo,Yo,Jo,{})}}export{as as component};
