import{s as Eo,o as Bo,n as W}from"../chunks/scheduler.9bc65507.js";import{S as Ro,i as Go,g as p,s as a,r as g,A as Xo,h as m,f as o,c as r,j as v,u,x as h,k as j,y as l,a as c,v as _,d as C,t as b,w as M}from"../chunks/index.707bf1b6.js";import{T as zt}from"../chunks/Tip.c2ecdbf4.js";import{D as w}from"../chunks/Docstring.86474e80.js";import{C as A}from"../chunks/CodeBlock.54a9f38d.js";import{E as _e}from"../chunks/ExampleCodeBlock.034f3a73.js";import{H as $t,E as Fo}from"../chunks/EditOnGithub.922df6ba.js";function So(I){let n,T="Example:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function Ho(I){let n,T="Example:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function Qo(I){let n,T="Example:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function qo(I){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=p("p"),n.innerHTML=T},l(d){n=m(d,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,i){c(d,n,i)},p:W,d(d){d&&o(n)}}}function Yo(I){let n,T="Examples:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function Ao(I){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=p("p"),n.innerHTML=T},l(d){n=m(d,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,i){c(d,n,i)},p:W,d(d){d&&o(n)}}}function Oo(I){let n,T="Examples:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function Do(I){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=p("p"),n.innerHTML=T},l(d){n=m(d,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,i){c(d,n,i)},p:W,d(d){d&&o(n)}}}function Ko(I){let n,T="Examples:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function es(I){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=p("p"),n.innerHTML=T},l(d){n=m(d,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,i){c(d,n,i)},p:W,d(d){d&&o(n)}}}function ts(I){let n,T="Example:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function ns(I){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=p("p"),n.innerHTML=T},l(d){n=m(d,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,i){c(d,n,i)},p:W,d(d){d&&o(n)}}}function os(I){let n,T="Examples:",d,i,f;return i=new A({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=p("p"),n.textContent=T,d=a(),g(i.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-kvfsh7"&&(n.textContent=T),d=r(t),u(i.$$.fragment,t)},m(t,y){c(t,n,y),c(t,d,y),_(i,t,y),f=!0},p:W,i(t){f||(C(i.$$.fragment,t),f=!0)},o(t){b(i.$$.fragment,t),f=!1},d(t){t&&(o(n),o(d)),M(i,t)}}}function ss(I){let n,T,d,i,f,t,y,Ut,Ce,no=`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>。`,Zt,be,oo="論文の要約は次のとおりです。",Wt,Me,so="<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>",Vt,Te,ao='Chinese-CLIP モデルは、<a href="https://huggingface.co/OFA-Sys" rel="nofollow">OFA-Sys</a> によって提供されました。',Nt,ye,Et,Ie,ro="以下のコード スニペットは、画像とテキストの特徴と類似性を計算する方法を示しています。",Bt,ve,Rt,je,io="現在、次のスケールの事前トレーニング済み Chinese-CLIP モデルが 🤗 Hub で利用可能です。",Gt,we,lo='<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>',Xt,Pe,Ft,P,xe,pn,rt,co=`<a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30621/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.`,mn,it,po=`Configuration objects inherit from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,hn,O,fn,D,Le,gn,lt,mo=`Instantiate a <a href="/docs/transformers/pr_30621/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/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPConfig">ChineseCLIPConfig</a>: An instance of a configuration object`,St,$e,Ht,k,ke,un,ct,ho=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30621/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.`,_n,dt,fo=`Configuration objects inherit from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Cn,K,Qt,Je,qt,J,ze,bn,pt,go=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30621/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.`,Mn,mt,uo=`Configuration objects inherit from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30621/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Tn,ee,Yt,Ue,_o="## ChineseCLIPImageProcessor[[transformers.ChineseCLIPImageProcessor]]",At,G,Ze,yn,ht,Co="Constructs a Chinese-CLIP image processor.",In,te,We,vn,ft,bo="Preprocess an image or batch of images.",Ot,Ve,Mo="## ChineseCLIPFeatureExtractor[[transformers.ChineseCLIPFeatureExtractor]]",Dt,Ne,Ee,Kt,Be,To="## ChineseCLIPProcessor[[transformers.ChineseCLIPProcessor]]",en,x,Re,jn,gt,yo=`Constructs a Chinese-CLIP processor which wraps a Chinese-CLIP image processor and a Chinese-CLIP tokenizer into a
single processor.`,wn,ut,Io=`<a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPProcessor">ChineseCLIPProcessor</a> offers all the functionalities of <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPImageProcessor">ChineseCLIPImageProcessor</a> and <a href="/docs/transformers/pr_30621/ja/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>.
See the <code>__call__()</code> and <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPProcessor.decode">decode()</a> for more information.`,Pn,ne,Ge,xn,_t,vo=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/pr_30621/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Ln,oe,Xe,$n,Ct,jo=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/pr_30621/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,tn,Fe,wo="## ChineseCLIPModel[[transformers.ChineseCLIPModel]]",nn,L,Se,kn,bt,Po=`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.`,Jn,V,He,zn,Mt,xo='The <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Un,se,Zn,ae,Wn,N,Qe,Vn,Tt,Lo='The <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Nn,re,En,ie,Bn,E,qe,Rn,yt,$o='The <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPModel">ChineseCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Gn,le,Xn,ce,on,Ye,ko="## ChineseCLIPTextModel[[transformers.ChineseCLIPTextModel]]",sn,$,Ae,Fn,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.`,Sn,vt,zo=`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.`,Hn,jt,Uo=`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.`,Qn,B,Oe,qn,wt,Zo='The <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPTextModel">ChineseCLIPTextModel</a> forward method, overrides the <code>__call__</code> special method.',Yn,de,An,pe,an,De,Wo="## ChineseCLIPVisionModel[[transformers.ChineseCLIPVisionModel]]",rn,X,Ke,On,Pt,Vo=`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.`,Dn,R,et,Kn,xt,No='The <a href="/docs/transformers/pr_30621/ja/model_doc/chinese_clip#transformers.ChineseCLIPVisionModel">ChineseCLIPVisionModel</a> forward method, overrides the <code>__call__</code> special method.',eo,me,to,he,ln,tt,cn,kt,dn;return f=new $t({props:{title:"Chinese-CLIP",local:"chinese-clip",headingTag:"h1"}}),y=new $t({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ye=new $t({props:{title:"Usage example",local:"usage-example",headingTag:"h2"}}),ve=new A({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}}),Pe=new $t({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/pr_30621/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/pr_30621/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/vr_30621/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L271"}}),O=new _e({props:{anchor:"transformers.ChineseCLIPConfig.example",$$slots:{default:[So]},$$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/vr_30621/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L409"}}),$e=new $t({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/pr_30621/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/pr_30621/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/vr_30621/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L34"}}),K=new _e({props:{anchor:"transformers.ChineseCLIPTextConfig.example",$$slots:{default:[Ho]},$$scope:{ctx:I}}}),Je=new $t({props:{title:"ChineseCLIPVisionConfig",local:"transformers.ChineseCLIPVisionConfig",headingTag:"h2"}}),ze=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/vr_30621/src/transformers/models/chinese_clip/configuration_chinese_clip.py#L163"}}),ee=new _e({props:{anchor:"transformers.ChineseCLIPVisionConfig.example",$$slots:{default:[Qo]},$$scope:{ctx:I}}}),Ze=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/vr_30621/src/transformers/models/chinese_clip/image_processing_chinese_clip.py#L52"}}),We=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/vr_30621/src/transformers/models/chinese_clip/image_processing_chinese_clip.py#L182"}}),Ee=new w({props:{name:"class transformers.ChineseCLIPFeatureExtractor",anchor:"transformers.ChineseCLIPFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/feature_extraction_chinese_clip.py#L26"}}),Re=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/pr_30621/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/pr_30621/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/vr_30621/src/transformers/models/chinese_clip/processing_chinese_clip.py#L25"}}),Ge=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/vr_30621/src/transformers/models/chinese_clip/processing_chinese_clip.py#L115"}}),Xe=new w({props:{name:"decode",anchor:"transformers.ChineseCLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/processing_chinese_clip.py#L122"}}),Se=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/pr_30621/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/pr_30621/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1336"}}),He=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/pr_30621/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30621/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30621/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/pr_30621/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30621/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__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/pr_30621/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1472",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/pr_30621/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/pr_30621/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/pr_30621/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/pr_30621/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>
`}}),se=new zt({props:{$$slots:{default:[qo]},$$scope:{ctx:I}}}),ae=new _e({props:{anchor:"transformers.ChineseCLIPModel.forward.example",$$slots:{default:[Yo]},$$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/pr_30621/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30621/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30621/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/pr_30621/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1372",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>
`}}),re=new zt({props:{$$slots:{default:[Ao]},$$scope:{ctx:I}}}),ie=new _e({props:{anchor:"transformers.ChineseCLIPModel.get_text_features.example",$$slots:{default:[Oo]},$$scope:{ctx:I}}}),qe=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/pr_30621/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30621/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__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/pr_30621/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1422",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>
`}}),le=new zt({props:{$$slots:{default:[Do]},$$scope:{ctx:I}}}),ce=new _e({props:{anchor:"transformers.ChineseCLIPModel.get_image_features.example",$$slots:{default:[Ko]},$$scope:{ctx:I}}}),Ae=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/pr_30621/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/pr_30621/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1094"}}),Oe=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/pr_30621/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30621/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30621/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/pr_30621/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30621/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__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/pr_30621/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/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1140",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30621/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/pr_30621/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/pr_30621/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),de=new zt({props:{$$slots:{default:[es]},$$scope:{ctx:I}}}),pe=new _e({props:{anchor:"transformers.ChineseCLIPTextModel.forward.example",$$slots:{default:[ts]},$$scope:{ctx:I}}}),Ke=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/pr_30621/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/pr_30621/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1277"}}),et=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/pr_30621/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30621/ja/model_doc/deit#transformers.DeiTFeatureExtractor.__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/pr_30621/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30621/src/transformers/models/chinese_clip/modeling_chinese_clip.py#L1295",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30621/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/pr_30621/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new zt({props:{$$slots:{default:[ns]},$$scope:{ctx:I}}}),he=new _e({props:{anchor:"transformers.ChineseCLIPVisionModel.forward.example",$$slots:{default:[os]},$$scope:{ctx:I}}}),tt=new Fo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/model_doc/chinese_clip.md"}}),{c(){n=p("meta"),T=a(),d=p("p"),i=a(),g(f.$$.fragment),t=a(),g(y.$$.fragment),Ut=a(),Ce=p("p"),Ce.innerHTML=no,Zt=a(),be=p("p"),be.textContent=oo,Wt=a(),Me=p("p"),Me.innerHTML=so,Vt=a(),Te=p("p"),Te.innerHTML=ao,Nt=a(),g(ye.$$.fragment),Et=a(),Ie=p("p"),Ie.textContent=ro,Bt=a(),g(ve.$$.fragment),Rt=a(),je=p("p"),je.textContent=io,Gt=a(),we=p("ul"),we.innerHTML=lo,Xt=a(),g(Pe.$$.fragment),Ft=a(),P=p("div"),g(xe.$$.fragment),pn=a(),rt=p("p"),rt.innerHTML=co,mn=a(),it=p("p"),it.innerHTML=po,hn=a(),g(O.$$.fragment),fn=a(),D=p("div"),g(Le.$$.fragment),gn=a(),lt=p("p"),lt.innerHTML=mo,St=a(),g($e.$$.fragment),Ht=a(),k=p("div"),g(ke.$$.fragment),un=a(),ct=p("p"),ct.innerHTML=ho,_n=a(),dt=p("p"),dt.innerHTML=fo,Cn=a(),g(K.$$.fragment),Qt=a(),g(Je.$$.fragment),qt=a(),J=p("div"),g(ze.$$.fragment),bn=a(),pt=p("p"),pt.innerHTML=go,Mn=a(),mt=p("p"),mt.innerHTML=uo,Tn=a(),g(ee.$$.fragment),Yt=a(),Ue=p("p"),Ue.textContent=_o,At=a(),G=p("div"),g(Ze.$$.fragment),yn=a(),ht=p("p"),ht.textContent=Co,In=a(),te=p("div"),g(We.$$.fragment),vn=a(),ft=p("p"),ft.textContent=bo,Ot=a(),Ve=p("p"),Ve.textContent=Mo,Dt=a(),Ne=p("div"),g(Ee.$$.fragment),Kt=a(),Be=p("p"),Be.textContent=To,en=a(),x=p("div"),g(Re.$$.fragment),jn=a(),gt=p("p"),gt.textContent=yo,wn=a(),ut=p("p"),ut.innerHTML=Io,Pn=a(),ne=p("div"),g(Ge.$$.fragment),xn=a(),_t=p("p"),_t.innerHTML=vo,Ln=a(),oe=p("div"),g(Xe.$$.fragment),$n=a(),Ct=p("p"),Ct.innerHTML=jo,tn=a(),Fe=p("p"),Fe.textContent=wo,nn=a(),L=p("div"),g(Se.$$.fragment),kn=a(),bt=p("p"),bt.innerHTML=Po,Jn=a(),V=p("div"),g(He.$$.fragment),zn=a(),Mt=p("p"),Mt.innerHTML=xo,Un=a(),g(se.$$.fragment),Zn=a(),g(ae.$$.fragment),Wn=a(),N=p("div"),g(Qe.$$.fragment),Vn=a(),Tt=p("p"),Tt.innerHTML=Lo,Nn=a(),g(re.$$.fragment),En=a(),g(ie.$$.fragment),Bn=a(),E=p("div"),g(qe.$$.fragment),Rn=a(),yt=p("p"),yt.innerHTML=$o,Gn=a(),g(le.$$.fragment),Xn=a(),g(ce.$$.fragment),on=a(),Ye=p("p"),Ye.textContent=ko,sn=a(),$=p("div"),g(Ae.$$.fragment),Fn=a(),It=p("p"),It.innerHTML=Jo,Sn=a(),vt=p("p"),vt.innerHTML=zo,Hn=a(),jt=p("p"),jt.innerHTML=Uo,Qn=a(),B=p("div"),g(Oe.$$.fragment),qn=a(),wt=p("p"),wt.innerHTML=Zo,Yn=a(),g(de.$$.fragment),An=a(),g(pe.$$.fragment),an=a(),De=p("p"),De.textContent=Wo,rn=a(),X=p("div"),g(Ke.$$.fragment),On=a(),Pt=p("p"),Pt.innerHTML=Vo,Dn=a(),R=p("div"),g(et.$$.fragment),Kn=a(),xt=p("p"),xt.innerHTML=No,eo=a(),g(me.$$.fragment),to=a(),g(he.$$.fragment),ln=a(),g(tt.$$.fragment),cn=a(),kt=p("p"),this.h()},l(e){const s=Xo("svelte-u9bgzb",document.head);n=m(s,"META",{name:!0,content:!0}),s.forEach(o),T=r(e),d=m(e,"P",{}),v(d).forEach(o),i=r(e),u(f.$$.fragment,e),t=r(e),u(y.$$.fragment,e),Ut=r(e),Ce=m(e,"P",{"data-svelte-h":!0}),h(Ce)!=="svelte-1n40eat"&&(Ce.innerHTML=no),Zt=r(e),be=m(e,"P",{"data-svelte-h":!0}),h(be)!=="svelte-1cv3nri"&&(be.textContent=oo),Wt=r(e),Me=m(e,"P",{"data-svelte-h":!0}),h(Me)!=="svelte-13yjhn7"&&(Me.innerHTML=so),Vt=r(e),Te=m(e,"P",{"data-svelte-h":!0}),h(Te)!=="svelte-67b1ll"&&(Te.innerHTML=ao),Nt=r(e),u(ye.$$.fragment,e),Et=r(e),Ie=m(e,"P",{"data-svelte-h":!0}),h(Ie)!=="svelte-1oamwfs"&&(Ie.textContent=ro),Bt=r(e),u(ve.$$.fragment,e),Rt=r(e),je=m(e,"P",{"data-svelte-h":!0}),h(je)!=="svelte-vyydp0"&&(je.textContent=io),Gt=r(e),we=m(e,"UL",{"data-svelte-h":!0}),h(we)!=="svelte-14rhxk4"&&(we.innerHTML=lo),Xt=r(e),u(Pe.$$.fragment,e),Ft=r(e),P=m(e,"DIV",{class:!0});var z=v(P);u(xe.$$.fragment,z),pn=r(z),rt=m(z,"P",{"data-svelte-h":!0}),h(rt)!=="svelte-bebfzg"&&(rt.innerHTML=co),mn=r(z),it=m(z,"P",{"data-svelte-h":!0}),h(it)!=="svelte-1jtjhnb"&&(it.innerHTML=po),hn=r(z),u(O.$$.fragment,z),fn=r(z),D=m(z,"DIV",{class:!0});var nt=v(D);u(Le.$$.fragment,nt),gn=r(nt),lt=m(nt,"P",{"data-svelte-h":!0}),h(lt)!=="svelte-3d5jtb"&&(lt.innerHTML=mo),nt.forEach(o),z.forEach(o),St=r(e),u($e.$$.fragment,e),Ht=r(e),k=m(e,"DIV",{class:!0});var F=v(k);u(ke.$$.fragment,F),un=r(F),ct=m(F,"P",{"data-svelte-h":!0}),h(ct)!=="svelte-7qyhjp"&&(ct.innerHTML=ho),_n=r(F),dt=m(F,"P",{"data-svelte-h":!0}),h(dt)!=="svelte-1jtjhnb"&&(dt.innerHTML=fo),Cn=r(F),u(K.$$.fragment,F),F.forEach(o),Qt=r(e),u(Je.$$.fragment,e),qt=r(e),J=m(e,"DIV",{class:!0});var S=v(J);u(ze.$$.fragment,S),bn=r(S),pt=m(S,"P",{"data-svelte-h":!0}),h(pt)!=="svelte-11j8pdn"&&(pt.innerHTML=go),Mn=r(S),mt=m(S,"P",{"data-svelte-h":!0}),h(mt)!=="svelte-164jdvz"&&(mt.innerHTML=uo),Tn=r(S),u(ee.$$.fragment,S),S.forEach(o),Yt=r(e),Ue=m(e,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-116bvug"&&(Ue.textContent=_o),At=r(e),G=m(e,"DIV",{class:!0});var Y=v(G);u(Ze.$$.fragment,Y),yn=r(Y),ht=m(Y,"P",{"data-svelte-h":!0}),h(ht)!=="svelte-13f40b0"&&(ht.textContent=Co),In=r(Y),te=m(Y,"DIV",{class:!0});var ot=v(te);u(We.$$.fragment,ot),vn=r(ot),ft=m(ot,"P",{"data-svelte-h":!0}),h(ft)!=="svelte-1x3yxsa"&&(ft.textContent=bo),ot.forEach(o),Y.forEach(o),Ot=r(e),Ve=m(e,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-3fwcsc"&&(Ve.textContent=Mo),Dt=r(e),Ne=m(e,"DIV",{class:!0});var Jt=v(Ne);u(Ee.$$.fragment,Jt),Jt.forEach(o),Kt=r(e),Be=m(e,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-m1gczi"&&(Be.textContent=To),en=r(e),x=m(e,"DIV",{class:!0});var U=v(x);u(Re.$$.fragment,U),jn=r(U),gt=m(U,"P",{"data-svelte-h":!0}),h(gt)!=="svelte-1qx1ch7"&&(gt.textContent=yo),wn=r(U),ut=m(U,"P",{"data-svelte-h":!0}),h(ut)!=="svelte-g7zne"&&(ut.innerHTML=Io),Pn=r(U),ne=m(U,"DIV",{class:!0});var st=v(ne);u(Ge.$$.fragment,st),xn=r(st),_t=m(st,"P",{"data-svelte-h":!0}),h(_t)!=="svelte-1sd2g6k"&&(_t.innerHTML=vo),st.forEach(o),Ln=r(U),oe=m(U,"DIV",{class:!0});var at=v(oe);u(Xe.$$.fragment,at),$n=r(at),Ct=m(at,"P",{"data-svelte-h":!0}),h(Ct)!=="svelte-iomlve"&&(Ct.innerHTML=jo),at.forEach(o),U.forEach(o),tn=r(e),Fe=m(e,"P",{"data-svelte-h":!0}),h(Fe)!=="svelte-1jbtxg0"&&(Fe.textContent=wo),nn=r(e),L=m(e,"DIV",{class:!0});var Z=v(L);u(Se.$$.fragment,Z),kn=r(Z),bt=m(Z,"P",{"data-svelte-h":!0}),h(bt)!=="svelte-1qhb76u"&&(bt.innerHTML=Po),Jn=r(Z),V=m(Z,"DIV",{class:!0});var H=v(V);u(He.$$.fragment,H),zn=r(H),Mt=m(H,"P",{"data-svelte-h":!0}),h(Mt)!=="svelte-1gcheuv"&&(Mt.innerHTML=xo),Un=r(H),u(se.$$.fragment,H),Zn=r(H),u(ae.$$.fragment,H),H.forEach(o),Wn=r(Z),N=m(Z,"DIV",{class:!0});var Q=v(N);u(Qe.$$.fragment,Q),Vn=r(Q),Tt=m(Q,"P",{"data-svelte-h":!0}),h(Tt)!=="svelte-1gcheuv"&&(Tt.innerHTML=Lo),Nn=r(Q),u(re.$$.fragment,Q),En=r(Q),u(ie.$$.fragment,Q),Q.forEach(o),Bn=r(Z),E=m(Z,"DIV",{class:!0});var fe=v(E);u(qe.$$.fragment,fe),Rn=r(fe),yt=m(fe,"P",{"data-svelte-h":!0}),h(yt)!=="svelte-1gcheuv"&&(yt.innerHTML=$o),Gn=r(fe),u(le.$$.fragment,fe),Xn=r(fe),u(ce.$$.fragment,fe),fe.forEach(o),Z.forEach(o),on=r(e),Ye=m(e,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-81vdyi"&&(Ye.textContent=ko),sn=r(e),$=m(e,"DIV",{class:!0});var q=v($);u(Ae.$$.fragment,q),Fn=r(q),It=m(q,"P",{"data-svelte-h":!0}),h(It)!=="svelte-9nf4tt"&&(It.innerHTML=Jo),Sn=r(q),vt=m(q,"P",{"data-svelte-h":!0}),h(vt)!=="svelte-1du13oj"&&(vt.innerHTML=zo),Hn=r(q),jt=m(q,"P",{"data-svelte-h":!0}),h(jt)!=="svelte-174erte"&&(jt.innerHTML=Uo),Qn=r(q),B=m(q,"DIV",{class:!0});var ge=v(B);u(Oe.$$.fragment,ge),qn=r(ge),wt=m(ge,"P",{"data-svelte-h":!0}),h(wt)!=="svelte-1kwsawp"&&(wt.innerHTML=Zo),Yn=r(ge),u(de.$$.fragment,ge),An=r(ge),u(pe.$$.fragment,ge),ge.forEach(o),q.forEach(o),an=r(e),De=m(e,"P",{"data-svelte-h":!0}),h(De)!=="svelte-1lruukg"&&(De.textContent=Wo),rn=r(e),X=m(e,"DIV",{class:!0});var Lt=v(X);u(Ke.$$.fragment,Lt),On=r(Lt),Pt=m(Lt,"P",{"data-svelte-h":!0}),h(Pt)!=="svelte-1gn227o"&&(Pt.innerHTML=Vo),Dn=r(Lt),R=m(Lt,"DIV",{class:!0});var ue=v(R);u(et.$$.fragment,ue),Kn=r(ue),xt=m(ue,"P",{"data-svelte-h":!0}),h(xt)!=="svelte-o0in5z"&&(xt.innerHTML=No),eo=r(ue),u(me.$$.fragment,ue),to=r(ue),u(he.$$.fragment,ue),ue.forEach(o),Lt.forEach(o),ln=r(e),u(tt.$$.fragment,e),cn=r(e),kt=m(e,"P",{}),v(kt).forEach(o),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",as),j(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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(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(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(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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(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(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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(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(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($,"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(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){l(document.head,n),c(e,T,s),c(e,d,s),c(e,i,s),_(f,e,s),c(e,t,s),_(y,e,s),c(e,Ut,s),c(e,Ce,s),c(e,Zt,s),c(e,be,s),c(e,Wt,s),c(e,Me,s),c(e,Vt,s),c(e,Te,s),c(e,Nt,s),_(ye,e,s),c(e,Et,s),c(e,Ie,s),c(e,Bt,s),_(ve,e,s),c(e,Rt,s),c(e,je,s),c(e,Gt,s),c(e,we,s),c(e,Xt,s),_(Pe,e,s),c(e,Ft,s),c(e,P,s),_(xe,P,null),l(P,pn),l(P,rt),l(P,mn),l(P,it),l(P,hn),_(O,P,null),l(P,fn),l(P,D),_(Le,D,null),l(D,gn),l(D,lt),c(e,St,s),_($e,e,s),c(e,Ht,s),c(e,k,s),_(ke,k,null),l(k,un),l(k,ct),l(k,_n),l(k,dt),l(k,Cn),_(K,k,null),c(e,Qt,s),_(Je,e,s),c(e,qt,s),c(e,J,s),_(ze,J,null),l(J,bn),l(J,pt),l(J,Mn),l(J,mt),l(J,Tn),_(ee,J,null),c(e,Yt,s),c(e,Ue,s),c(e,At,s),c(e,G,s),_(Ze,G,null),l(G,yn),l(G,ht),l(G,In),l(G,te),_(We,te,null),l(te,vn),l(te,ft),c(e,Ot,s),c(e,Ve,s),c(e,Dt,s),c(e,Ne,s),_(Ee,Ne,null),c(e,Kt,s),c(e,Be,s),c(e,en,s),c(e,x,s),_(Re,x,null),l(x,jn),l(x,gt),l(x,wn),l(x,ut),l(x,Pn),l(x,ne),_(Ge,ne,null),l(ne,xn),l(ne,_t),l(x,Ln),l(x,oe),_(Xe,oe,null),l(oe,$n),l(oe,Ct),c(e,tn,s),c(e,Fe,s),c(e,nn,s),c(e,L,s),_(Se,L,null),l(L,kn),l(L,bt),l(L,Jn),l(L,V),_(He,V,null),l(V,zn),l(V,Mt),l(V,Un),_(se,V,null),l(V,Zn),_(ae,V,null),l(L,Wn),l(L,N),_(Qe,N,null),l(N,Vn),l(N,Tt),l(N,Nn),_(re,N,null),l(N,En),_(ie,N,null),l(L,Bn),l(L,E),_(qe,E,null),l(E,Rn),l(E,yt),l(E,Gn),_(le,E,null),l(E,Xn),_(ce,E,null),c(e,on,s),c(e,Ye,s),c(e,sn,s),c(e,$,s),_(Ae,$,null),l($,Fn),l($,It),l($,Sn),l($,vt),l($,Hn),l($,jt),l($,Qn),l($,B),_(Oe,B,null),l(B,qn),l(B,wt),l(B,Yn),_(de,B,null),l(B,An),_(pe,B,null),c(e,an,s),c(e,De,s),c(e,rn,s),c(e,X,s),_(Ke,X,null),l(X,On),l(X,Pt),l(X,Dn),l(X,R),_(et,R,null),l(R,Kn),l(R,xt),l(R,eo),_(me,R,null),l(R,to),_(he,R,null),c(e,ln,s),_(tt,e,s),c(e,cn,s),c(e,kt,s),dn=!0},p(e,[s]){const z={};s&2&&(z.$$scope={dirty:s,ctx:e}),O.$set(z);const nt={};s&2&&(nt.$$scope={dirty:s,ctx:e}),K.$set(nt);const F={};s&2&&(F.$$scope={dirty:s,ctx:e}),ee.$set(F);const S={};s&2&&(S.$$scope={dirty:s,ctx:e}),se.$set(S);const Y={};s&2&&(Y.$$scope={dirty:s,ctx:e}),ae.$set(Y);const ot={};s&2&&(ot.$$scope={dirty:s,ctx:e}),re.$set(ot);const Jt={};s&2&&(Jt.$$scope={dirty:s,ctx:e}),ie.$set(Jt);const U={};s&2&&(U.$$scope={dirty:s,ctx:e}),le.$set(U);const st={};s&2&&(st.$$scope={dirty:s,ctx:e}),ce.$set(st);const at={};s&2&&(at.$$scope={dirty:s,ctx:e}),de.$set(at);const Z={};s&2&&(Z.$$scope={dirty:s,ctx:e}),pe.$set(Z);const H={};s&2&&(H.$$scope={dirty:s,ctx:e}),me.$set(H);const Q={};s&2&&(Q.$$scope={dirty:s,ctx:e}),he.$set(Q)},i(e){dn||(C(f.$$.fragment,e),C(y.$$.fragment,e),C(ye.$$.fragment,e),C(ve.$$.fragment,e),C(Pe.$$.fragment,e),C(xe.$$.fragment,e),C(O.$$.fragment,e),C(Le.$$.fragment,e),C($e.$$.fragment,e),C(ke.$$.fragment,e),C(K.$$.fragment,e),C(Je.$$.fragment,e),C(ze.$$.fragment,e),C(ee.$$.fragment,e),C(Ze.$$.fragment,e),C(We.$$.fragment,e),C(Ee.$$.fragment,e),C(Re.$$.fragment,e),C(Ge.$$.fragment,e),C(Xe.$$.fragment,e),C(Se.$$.fragment,e),C(He.$$.fragment,e),C(se.$$.fragment,e),C(ae.$$.fragment,e),C(Qe.$$.fragment,e),C(re.$$.fragment,e),C(ie.$$.fragment,e),C(qe.$$.fragment,e),C(le.$$.fragment,e),C(ce.$$.fragment,e),C(Ae.$$.fragment,e),C(Oe.$$.fragment,e),C(de.$$.fragment,e),C(pe.$$.fragment,e),C(Ke.$$.fragment,e),C(et.$$.fragment,e),C(me.$$.fragment,e),C(he.$$.fragment,e),C(tt.$$.fragment,e),dn=!0)},o(e){b(f.$$.fragment,e),b(y.$$.fragment,e),b(ye.$$.fragment,e),b(ve.$$.fragment,e),b(Pe.$$.fragment,e),b(xe.$$.fragment,e),b(O.$$.fragment,e),b(Le.$$.fragment,e),b($e.$$.fragment,e),b(ke.$$.fragment,e),b(K.$$.fragment,e),b(Je.$$.fragment,e),b(ze.$$.fragment,e),b(ee.$$.fragment,e),b(Ze.$$.fragment,e),b(We.$$.fragment,e),b(Ee.$$.fragment,e),b(Re.$$.fragment,e),b(Ge.$$.fragment,e),b(Xe.$$.fragment,e),b(Se.$$.fragment,e),b(He.$$.fragment,e),b(se.$$.fragment,e),b(ae.$$.fragment,e),b(Qe.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(qe.$$.fragment,e),b(le.$$.fragment,e),b(ce.$$.fragment,e),b(Ae.$$.fragment,e),b(Oe.$$.fragment,e),b(de.$$.fragment,e),b(pe.$$.fragment,e),b(Ke.$$.fragment,e),b(et.$$.fragment,e),b(me.$$.fragment,e),b(he.$$.fragment,e),b(tt.$$.fragment,e),dn=!1},d(e){e&&(o(T),o(d),o(i),o(t),o(Ut),o(Ce),o(Zt),o(be),o(Wt),o(Me),o(Vt),o(Te),o(Nt),o(Et),o(Ie),o(Bt),o(Rt),o(je),o(Gt),o(we),o(Xt),o(Ft),o(P),o(St),o(Ht),o(k),o(Qt),o(qt),o(J),o(Yt),o(Ue),o(At),o(G),o(Ot),o(Ve),o(Dt),o(Ne),o(Kt),o(Be),o(en),o(x),o(tn),o(Fe),o(nn),o(L),o(on),o(Ye),o(sn),o($),o(an),o(De),o(rn),o(X),o(ln),o(cn),o(kt)),o(n),M(f,e),M(y,e),M(ye,e),M(ve,e),M(Pe,e),M(xe),M(O),M(Le),M($e,e),M(ke),M(K),M(Je,e),M(ze),M(ee),M(Ze),M(We),M(Ee),M(Re),M(Ge),M(Xe),M(Se),M(He),M(se),M(ae),M(Qe),M(re),M(ie),M(qe),M(le),M(ce),M(Ae),M(Oe),M(de),M(pe),M(Ke),M(et),M(me),M(he),M(tt,e)}}}const as='{"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}],"depth":1}';function rs(I){return Bo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fs extends Ro{constructor(n){super(),Go(this,n,rs,ss,Eo,{})}}export{fs as component};
