import{S as Qv,i as Ov,s as Kv,e as s,k as m,w as T,t as i,M as eM,c as a,d as o,m as h,a as r,x as v,h as l,b as f,G as e,g as b,y as M,q as w,o as I,B as $,v as tM,L as W}from"../../chunks/vendor-hf-doc-builder.js";import{T as q}from"../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../chunks/Docstring-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as J}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as F}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function oM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBDb25maWclMkMlMjBDTElQTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUENvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENMSVBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDTElQTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBDTElQQ29uZmlnJTIwZnJvbSUyMGElMjBDTElQVGV4dENvbmZpZyUyMGFuZCUyMGElMjBDTElQVmlzaW9uQ29uZmlnJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUZXh0Q29uZmlnJTJDJTIwQ0xJUFZpc2lvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dCUyMGFuZCUyMENMSVBWaXNpb24lMjBjb25maWd1cmF0aW9uJTBBY29uZmlnX3RleHQlMjAlM0QlMjBDTElQVGV4dENvbmZpZygpJTBBY29uZmlnX3Zpc2lvbiUyMCUzRCUyMENMSVBWaXNpb25Db25maWcoKSUwQSUwQWNvbmZpZyUyMCUzRCUyMENMSVBDb25maWcuZnJvbV90ZXh0X3Zpc2lvbl9jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX3Zpc2lvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPConfig, CLIPModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a CLIPConfig from a CLIPTextConfig and a CLIPVisionConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextConfig, CLIPVisionConfig

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

<span class="hljs-meta">&gt;&gt;&gt; </span>config = CLIPConfig.from_text_vision_configs(config_text, config_vision)`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function nM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUZXh0Q29uZmlnJTJDJTIwQ0xJUFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dENvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUFRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTElQVGV4dE1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMENMSVBUZXh0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextConfig, CLIPTextModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPTextModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPTextModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function sM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Db25maWclMkMlMjBDTElQVmlzaW9uTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUFZpc2lvbkNvbmZpZyUyMHdpdGglMjBvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ0xJUFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENMSVBWaXNpb25Nb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDTElQVmlzaW9uTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionConfig, CLIPVisionModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLIPVisionModel (with random weights) from the openai/clip-vit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CLIPVisionModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function aM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function rM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, CLIPModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function iM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function lM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENMSVBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CLIPModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function dM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function cM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, CLIPModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function pM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function mM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDTElQVGV4dE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBDTElQVGV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjAoRU9TJTIwdG9rZW4pJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CLIPTextModel

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function hM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function fM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDTElQVGV4dE1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFtb2RlbCUyMCUzRCUyMENMSVBUZXh0TW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEF0ZXh0X2VtYmVkcyUyMCUzRCUyMG91dHB1dHMudGV4dF9lbWJlZHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CLIPTextModelWithProjection

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeds = outputs.text_embeds`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function uM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function gM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBDTElQVmlzaW9uTW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBaW1hZ2VfZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy5pbWFnZV9lbWJlZHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, CLIPVisionModelWithProjection

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_embeds = outputs.image_embeds`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function _M(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function bM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMENMSVBWaXNpb25Nb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUFZpc2lvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwQ0xTJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, CLIPVisionModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function yM(P){let d,y,u,p,_,n,c,C,ts,ro,D,pe,Re,j,os,Fe,ns,io,te,ss,We,ot,as,lo,me,rs,co,he,nt,is,st,V,N,at,re,ls,rt,it,po,qe,fe,mo,oe,ds,Xe,lt,cs,ho,L,ps,ue,ms,fo,Y,hs,Ve,Ae,fs;return{c(){d=s("p"),y=i("TensorFlow models and layers in "),u=s("code"),p=i("transformers"),_=i(" accept two formats as input:"),n=m(),c=s("ul"),C=s("li"),ts=i("having all inputs as keyword arguments (like PyTorch models), or"),ro=m(),D=s("li"),pe=i("having all inputs as a list, tuple or dict in the first positional argument."),Re=m(),j=s("p"),os=i(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Fe=s("code"),ns=i("model.fit()"),io=i(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),te=s("code"),ss=i("model.fit()"),We=i(` supports! If, however, you want to use the second
format outside of Keras methods like `),ot=s("code"),as=i("fit()"),lo=i(" and "),me=s("code"),rs=i("predict()"),co=i(`, such as when creating your own layers or models with
the Keras `),he=s("code"),nt=i("Functional"),is=i(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),st=m(),V=s("ul"),N=s("li"),at=i("a single Tensor with "),re=s("code"),ls=i("input_ids"),rt=i(" only and nothing else: "),it=s("code"),po=i("model(input_ids)"),qe=m(),fe=s("li"),mo=i(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=s("code"),ds=i("model([input_ids, attention_mask])"),Xe=i(" or "),lt=s("code"),cs=i("model([input_ids, attention_mask, token_type_ids])"),ho=m(),L=s("li"),ps=i(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ue=s("code"),ms=i('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),fo=m(),Y=s("p"),hs=i(`Note that when creating models and layers with
`),Ve=s("a"),Ae=i("subclassing"),fs=i(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(x){d=a(x,"P",{});var z=r(d);y=l(z,"TensorFlow models and layers in "),u=a(z,"CODE",{});var Cr=r(u);p=l(Cr,"transformers"),Cr.forEach(o),_=l(z," accept two formats as input:"),z.forEach(o),n=h(x),c=a(x,"UL",{});var uo=r(c);C=a(uo,"LI",{});var dt=r(C);ts=l(dt,"having all inputs as keyword arguments (like PyTorch models), or"),dt.forEach(o),ro=h(uo),D=a(uo,"LI",{});var kr=r(D);pe=l(kr,"having all inputs as a list, tuple or dict in the first positional argument."),kr.forEach(o),uo.forEach(o),Re=h(x),j=a(x,"P",{});var X=r(j);os=l(X,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Fe=a(X,"CODE",{});var ct=r(Fe);ns=l(ct,"model.fit()"),ct.forEach(o),io=l(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),te=a(X,"CODE",{});var xr=r(te);ss=l(xr,"model.fit()"),xr.forEach(o),We=l(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),ot=a(X,"CODE",{});var Lr=r(ot);as=l(Lr,"fit()"),Lr.forEach(o),lo=l(X," and "),me=a(X,"CODE",{});var us=r(me);rs=l(us,"predict()"),us.forEach(o),co=l(X,`, such as when creating your own layers or models with
the Keras `),he=a(X,"CODE",{});var Se=r(he);nt=l(Se,"Functional"),Se.forEach(o),is=l(X,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),X.forEach(o),st=h(x),V=a(x,"UL",{});var Ze=r(V);N=a(Ze,"LI",{});var A=r(N);at=l(A,"a single Tensor with "),re=a(A,"CODE",{});var jr=r(re);ls=l(jr,"input_ids"),jr.forEach(o),rt=l(A," only and nothing else: "),it=a(A,"CODE",{});var De=r(it);po=l(De,"model(input_ids)"),De.forEach(o),A.forEach(o),qe=h(Ze),fe=a(Ze,"LI",{});var pt=r(fe);mo=l(pt,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=a(pt,"CODE",{});var Jr=r(oe);ds=l(Jr,"model([input_ids, attention_mask])"),Jr.forEach(o),Xe=l(pt," or "),lt=a(pt,"CODE",{});var Ye=r(lt);cs=l(Ye,"model([input_ids, attention_mask, token_type_ids])"),Ye.forEach(o),pt.forEach(o),ho=h(Ze),L=a(Ze,"LI",{});var gs=r(L);ps=l(gs,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ue=a(gs,"CODE",{});var Er=r(ue);ms=l(Er,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Er.forEach(o),gs.forEach(o),Ze.forEach(o),fo=h(x),Y=a(x,"P",{});var mt=r(Y);hs=l(mt,`Note that when creating models and layers with
`),Ve=a(mt,"A",{href:!0,rel:!0});var ge=r(Ve);Ae=l(ge,"subclassing"),ge.forEach(o),fs=l(mt,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),mt.forEach(o),this.h()},h(){f(Ve,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Ve,"rel","nofollow")},m(x,z){b(x,d,z),e(d,y),e(d,u),e(u,p),e(d,_),b(x,n,z),b(x,c,z),e(c,C),e(C,ts),e(c,ro),e(c,D),e(D,pe),b(x,Re,z),b(x,j,z),e(j,os),e(j,Fe),e(Fe,ns),e(j,io),e(j,te),e(te,ss),e(j,We),e(j,ot),e(ot,as),e(j,lo),e(j,me),e(me,rs),e(j,co),e(j,he),e(he,nt),e(j,is),b(x,st,z),b(x,V,z),e(V,N),e(N,at),e(N,re),e(re,ls),e(N,rt),e(N,it),e(it,po),e(V,qe),e(V,fe),e(fe,mo),e(fe,oe),e(oe,ds),e(fe,Xe),e(fe,lt),e(lt,cs),e(V,ho),e(V,L),e(L,ps),e(L,ue),e(ue,ms),b(x,fo,z),b(x,Y,z),e(Y,hs),e(Y,Ve),e(Ve,Ae),e(Y,fs)},d(x){x&&o(d),x&&o(n),x&&o(c),x&&o(Re),x&&o(j),x&&o(st),x&&o(V),x&&o(fo),x&&o(Y)}}}function TM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function vM(P){let d,y,u,p,_;return p=new E({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvUHJvY2Vzc29yJTJDJTIwVEZDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFRGQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwdGYubm4uc29mdG1heChsb2dpdHNfcGVyX2ltYWdlJTJDJTIwYXhpcyUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFCLIPModel

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function IM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function $M(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQ0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkNMSVBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFCLIPModel

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function kM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function xM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQ0xJUFZpc2lvbk1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkNMSVBWaXNpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVkX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMENMUyUyMHN0YXRlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFCLIPVisionModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function LM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function jM(P){let d,y,u,p,_;return p=new E({props:{code:"aW1wb3J0JTIwamF4JTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMEElMjAlMjAlMjAlMjB0ZXh0JTNEJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyJTJDJTIwcGFkZGluZyUzRFRydWUlMEEpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMjAlMjAlMjMlMjB0aGlzJTIwaXMlMjB0aGUlMjBpbWFnZS10ZXh0JTIwc2ltaWxhcml0eSUyMHNjb3JlJTBBcHJvYnMlMjAlM0QlMjBqYXgubm4uc29mdG1heChsb2dpdHNfcGVyX2ltYWdlJTJDJTIwYXhpcyUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, FlaxCLIPModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = jax.nn.softmax(logits_per_image, axis=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function JM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4Q0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function EM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBaW1hZ2VfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfaW1hZ2VfZmVhdHVyZXMoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, FlaxCLIPModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`}}),{c(){d=s("p"),y=i("Examples:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Examples:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function zM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function UM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUFRleHRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheENMSVBUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVyX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMChFT1MlMjB0b2tlbiklMjBzdGF0ZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPTextModel

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooler_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function FM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function WM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Q0xJUFRleHRNb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4Q0xJUFRleHRNb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXRleHRfZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy50ZXh0X2VtYmVkcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxCLIPTextModelWithProjection

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeds = outputs.text_embeds`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function VM(P){let d,y,u,p,_;return{c(){d=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(c,"CODE",{});var C=r(u);p=l(C,"Module"),C.forEach(o),_=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,y),e(d,u),e(u,p),e(d,_)},d(n){n&&o(d)}}}function ZM(P){let d,y,u,p,_;return p=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEZsYXhDTElQVmlzaW9uTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhDTElQVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlcl9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjBDTFMlMjBzdGF0ZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, FlaxCLIPVisionModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooler_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`}}),{c(){d=s("p"),y=i("Example:"),u=m(),T(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);y=l(c,"Example:"),c.forEach(o),u=h(n),v(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,y),b(n,u,c),M(p,n,c),_=!0},p:W,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){I(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function BM(P){let d,y,u,p,_,n,c,C,ts,ro,D,pe,Re,j,os,Fe,ns,io,te,ss,We,ot,as,lo,me,rs,co,he,nt,is,st,V,N,at,re,ls,rt,it,po,qe,fe,mo,oe,ds,Xe,lt,cs,ho,L,ps,ue,ms,fo,Y,hs,Ve,Ae,fs,x,z,Cr,uo,dt,kr,X,ct,xr,Lr,us,Se,Ze,A,jr,De,pt,Jr,Ye,gs,Er,mt,ge,go,Xi,_s,Rp,Ai,qp,Qd,zr,Xp,Od,_o,bs,Ap,ys,Sp,Dp,Yp,Ts,Hp,vs,Qp,Op,Kd,Ur,Kp,ec,ht,bo,Si,Ms,em,Di,tm,tc,H,ws,om,He,Fr,nm,sm,Wr,am,rm,Is,im,lm,dm,ft,cm,Vr,pm,mm,Zr,hm,fm,um,yo,gm,To,$s,_m,Ps,bm,Br,ym,Tm,oc,ut,vo,Yi,Cs,vm,Hi,Mm,nc,ie,ks,wm,gt,Im,Nr,$m,Pm,xs,Cm,km,xm,_t,Lm,Gr,jm,Jm,Rr,Em,zm,Um,Mo,sc,bt,wo,Qi,Ls,Fm,Oi,Wm,ac,le,js,Vm,yt,Zm,qr,Bm,Nm,Js,Gm,Rm,qm,Tt,Xm,Xr,Am,Sm,Ar,Dm,Ym,Hm,Io,rc,vt,$o,Ki,Es,Qm,el,Om,ic,Z,zs,Km,tl,eh,th,Us,oh,Sr,nh,sh,ah,_e,Fs,rh,ol,ih,lh,nl,Dr,dh,sl,ch,ph,al,mh,hh,Po,Ws,fh,Vs,uh,rl,gh,_h,bh,Co,Zs,yh,il,Th,vh,Yr,Bs,lc,Mt,ko,ll,Ns,Mh,dl,wh,dc,Q,Gs,Ih,Rs,$h,cl,Ph,Ch,kh,qs,xh,Hr,Lh,jh,Jh,be,Xs,Eh,pl,zh,Uh,ml,Qr,Fh,hl,Wh,Vh,fl,Zh,Bh,xo,As,Nh,ul,Gh,cc,wt,Lo,gl,Ss,Rh,_l,qh,pc,Be,Ds,Xh,bl,Ah,Sh,jo,Ys,Dh,yl,Yh,mc,It,Jo,Tl,Hs,Hh,vl,Qh,hc,Qs,Os,fc,$t,Eo,Ml,Ks,Oh,wl,Kh,uc,O,ea,ef,Il,tf,of,ne,Or,nf,sf,Kr,af,rf,ei,lf,df,$l,cf,pf,ti,mf,hf,ff,zo,ta,uf,oa,gf,oi,_f,bf,yf,Uo,na,Tf,sa,vf,ni,Mf,wf,gc,Pt,Fo,Pl,aa,If,Cl,$f,_c,G,ra,Pf,ia,Cf,si,kf,xf,Lf,la,jf,da,Jf,Ef,zf,ye,ca,Uf,Ct,Ff,ai,Wf,Vf,kl,Zf,Bf,Nf,Wo,Gf,Vo,Rf,Te,pa,qf,kt,Xf,ri,Af,Sf,xl,Df,Yf,Hf,Zo,Qf,Bo,Of,ve,ma,Kf,xt,eu,ii,tu,ou,Ll,nu,su,au,No,ru,Go,bc,Lt,Ro,jl,ha,iu,Jl,lu,yc,de,fa,du,ua,cu,li,pu,mu,hu,ga,fu,_a,uu,gu,_u,Me,ba,bu,jt,yu,di,Tu,vu,El,Mu,wu,Iu,qo,$u,Xo,Tc,Jt,Ao,zl,ya,Pu,Ul,Cu,vc,K,Ta,ku,Fl,xu,Lu,va,ju,ci,Ju,Eu,zu,Ma,Uu,wa,Fu,Wu,Vu,we,Ia,Zu,Et,Bu,pi,Nu,Gu,Wl,Ru,qu,Xu,So,Au,Do,Mc,zt,Yo,Vl,$a,Su,Zl,Du,wc,ee,Pa,Yu,Bl,Hu,Qu,Ca,Ou,mi,Ku,eg,tg,ka,og,xa,ng,sg,ag,Ie,La,rg,Ut,ig,hi,lg,dg,Nl,cg,pg,mg,Ho,hg,Qo,Ic,Ft,Oo,Gl,ja,fg,Rl,ug,$c,ce,Ja,gg,Ea,_g,fi,bg,yg,Tg,za,vg,Ua,Mg,wg,Ig,$e,Fa,$g,Wt,Pg,ui,Cg,kg,ql,xg,Lg,jg,Ko,Jg,en,Pc,Vt,tn,Xl,Wa,Eg,Al,zg,Cc,B,Va,Ug,Za,Fg,gi,Wg,Vg,Zg,Ba,Bg,Na,Ng,Gg,Rg,on,qg,Pe,Ga,Xg,Zt,Ag,_i,Sg,Dg,Sl,Yg,Hg,Qg,nn,Og,sn,Kg,Ce,Ra,e_,Bt,t_,bi,o_,n_,Dl,s_,a_,r_,an,i_,rn,l_,ke,qa,d_,Nt,c_,yi,p_,m_,Yl,h_,f_,u_,ln,g_,dn,kc,Gt,cn,Hl,Xa,__,Ql,b_,xc,Rt,Aa,y_,xe,Sa,T_,qt,v_,Ti,M_,w_,Ol,I_,$_,P_,pn,C_,mn,Lc,Xt,hn,Kl,Da,k_,ed,x_,jc,At,Ya,L_,Le,Ha,j_,St,J_,vi,E_,z_,td,U_,F_,W_,fn,V_,un,Jc,Dt,gn,od,Qa,Z_,nd,B_,Ec,U,Oa,N_,Ka,G_,Mi,R_,q_,X_,er,A_,tr,S_,D_,Y_,sd,H_,Q_,Ne,ad,or,O_,K_,rd,nr,eb,tb,id,sr,ob,nb,ld,ar,sb,ab,je,rr,rb,Yt,ib,dd,lb,db,cd,cb,pb,mb,_n,hb,bn,fb,yn,ir,ub,Tn,gb,vn,lr,_b,Mn,zc,Ht,wn,pd,dr,bb,md,yb,Uc,Qt,cr,Tb,Je,pr,vb,Ot,Mb,hd,wb,Ib,fd,$b,Pb,Cb,In,kb,$n,Fc,Kt,Pn,ud,mr,xb,gd,Lb,Wc,eo,hr,jb,Ee,fr,Jb,to,Eb,_d,zb,Ub,bd,Fb,Wb,Vb,Cn,Zb,kn,Vc,oo,xn,yd,ur,Bb,Td,Nb,Zc,no,gr,Gb,ze,_r,Rb,so,qb,vd,Xb,Ab,Md,Sb,Db,Yb,Ln,Hb,jn,Bc;return n=new J({}),j=new J({}),re=new J({}),Se=new E({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFByb2Nlc3NvciUyQyUyMENMSVBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ0xJUFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGY2xpcC12aXQtYmFzZS1wYXRjaDMyJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># 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>`}}),_s=new J({}),Ms=new J({}),ws=new k({props:{name:"class transformers.CLIPConfig",anchor:"transformers.CLIPConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextConfig">CLIPTextConfig</a>.`,name:"text_config"},{anchor:"transformers.CLIPConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionConfig">CLIPVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.CLIPConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.CLIPConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original CLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.CLIPConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L253"}}),yo=new F({props:{anchor:"transformers.CLIPConfig.example",$$slots:{default:[oM]},$$scope:{ctx:P}}}),$s=new k({props:{name:"from_text_vision_configs",anchor:"transformers.CLIPConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": CLIPTextConfig"},{name:"vision_config",val:": CLIPVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L389",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig"
>CLIPConfig</a></p>
`}}),Cs=new J({}),ks=new k({props:{name:"class transformers.CLIPTextConfig",anchor:"transformers.CLIPTextConfig",parameters:[{name:"vocab_size",val:" = 49408"},{name:"hidden_size",val:" = 512"},{name:"intermediate_size",val:" = 2048"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 77"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 49406"},{name:"eos_token_id",val:" = 49407"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 49408) &#x2014;
Vocabulary size of the CLIP text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel">CLIPModel</a>.`,name:"vocab_size"},{anchor:"transformers.CLIPTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.CLIPTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CLIPTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.CLIPTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CLIPTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 77) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.CLIPTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CLIPTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.CLIPTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.CLIPTextConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.CLIPTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L39"}}),Mo=new F({props:{anchor:"transformers.CLIPTextConfig.example",$$slots:{default:[nM]},$$scope:{ctx:P}}}),Ls=new J({}),js=new k({props:{name:"class transformers.CLIPVisionConfig",anchor:"transformers.CLIPVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 32"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.CLIPVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CLIPVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.CLIPVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CLIPVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.CLIPVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.CLIPVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CLIPVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.CLIPVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.CLIPVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.CLIPVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/configuration_clip.py#L148"}}),Io=new F({props:{anchor:"transformers.CLIPVisionConfig.example",$$slots:{default:[sM]},$$scope:{ctx:P}}}),Es=new J({}),zs=new k({props:{name:"class transformers.CLIPTokenizer",anchor:"transformers.CLIPTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|startoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = '<|endoftext|>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CLIPTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CLIPTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.CLIPTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.CLIPTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|startoftext|&gt;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CLIPTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L272"}}),Fs=new k({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L358",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ws=new k({props:{name:"get_special_tokens_mask",anchor:"transformers.CLIPTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.CLIPTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L385",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Zs=new k({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L413",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bs=new k({props:{name:"save_vocabulary",anchor:"transformers.CLIPTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip.py#L508"}}),Ns=new J({}),Gs=new k({props:{name:"class transformers.CLIPTokenizerFast",anchor:"transformers.CLIPTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|startoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = '<|endoftext|>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CLIPTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CLIPTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.CLIPTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|startoftext|&gt;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CLIPTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L50"}}),Xs=new k({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L123",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),As=new k({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CLIPTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/tokenization_clip_fast.py#L150",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ss=new J({}),Ds=new k({props:{name:"class transformers.CLIPImageProcessor",anchor:"transformers.CLIPImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.CLIPImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the image after resizing. The shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio. Can be overridden by <code>size</code> in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.CLIPImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.CLIPImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by <code>do_center_crop</code> in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.CLIPImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to 224) &#x2014;
Size of the output image after applying <code>center_crop</code>. Can be overridden by <code>crop_size</code> in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.CLIPImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.CLIPImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by <code>rescale_factor</code> in the <code>preprocess</code>
method.
do_normalize &#x2014;
Whether to normalize the image. Can be overridden by <code>do_normalize</code> in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.CLIPImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.48145466, 0.4578275, 0.40821073]</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.CLIPImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.26862954, 0.26130258, 0.27577711]</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.CLIPImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
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.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/image_processing_clip.py#L50"}}),Ys=new k({props:{name:"preprocess",anchor:"transformers.CLIPImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = 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:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.CLIPImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.CLIPImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.CLIPImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.CLIPImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.CLIPImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.CLIPImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.CLIPImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.CLIPImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.CLIPImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.CLIPImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/image_processing_clip.py#L163"}}),Hs=new J({}),Os=new k({props:{name:"class transformers.CLIPFeatureExtractor",anchor:"transformers.CLIPFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/feature_extraction_clip.py#L26"}}),Ks=new J({}),ea=new k({props:{name:"class transformers.CLIPProcessor",anchor:"transformers.CLIPProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CLIPProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.CLIPProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizerFast">CLIPTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L25"}}),ta=new k({props:{name:"batch_decode",anchor:"transformers.CLIPProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L113"}}),na=new k({props:{name:"decode",anchor:"transformers.CLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/processing_clip.py#L120"}}),aa=new J({}),ra=new k({props:{name:"class transformers.CLIPModel",anchor:"transformers.CLIPModel",parameters:[{name:"config",val:": CLIPConfig"}],parametersDescription:[{anchor:"transformers.CLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L967"}}),ca=new k({props:{name:"forward",anchor:"transformers.CLIPModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.CLIPModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CLIPModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.CLIPModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.CLIPModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1098",returnDescription:`
<p>A <code>transformers.models.clip.modeling_clip.CLIPOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPConfig'&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>) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel"
>CLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel"
>CLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel"
>CLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel"
>CLIPVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.clip.modeling_clip.CLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wo=new q({props:{$$slots:{default:[aM]},$$scope:{ctx:P}}}),Vo=new F({props:{anchor:"transformers.CLIPModel.forward.example",$$slots:{default:[rM]},$$scope:{ctx:P}}}),pa=new k({props:{name:"get_text_features",anchor:"transformers.CLIPModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.CLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.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.CLIPModel.get_text_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPModel.get_text_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1002",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel"
>CLIPTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Zo=new q({props:{$$slots:{default:[iM]},$$scope:{ctx:P}}}),Bo=new F({props:{anchor:"transformers.CLIPModel.get_text_features.example",$$slots:{default:[lM]},$$scope:{ctx:P}}}),ma=new k({props:{name:"get_image_features",anchor:"transformers.CLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.CLIPModel.get_image_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPModel.get_image_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1049",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel"
>CLIPVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),No=new q({props:{$$slots:{default:[dM]},$$scope:{ctx:P}}}),Go=new F({props:{anchor:"transformers.CLIPModel.get_image_features.example",$$slots:{default:[cM]},$$scope:{ctx:P}}}),ha=new J({}),fa=new k({props:{name:"class transformers.CLIPTextModel",anchor:"transformers.CLIPTextModel",parameters:[{name:"config",val:": CLIPTextConfig"}],parametersDescription:[{anchor:"transformers.CLIPTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L793"}}),ba=new k({props:{name:"forward",anchor:"transformers.CLIPTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.CLIPTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.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.CLIPTextModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPTextModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L810",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/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.clip.configuration_clip.CLIPTextConfig'&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>) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qo=new q({props:{$$slots:{default:[pM]},$$scope:{ctx:P}}}),Xo=new F({props:{anchor:"transformers.CLIPTextModel.forward.example",$$slots:{default:[mM]},$$scope:{ctx:P}}}),ya=new J({}),Ta=new k({props:{name:"class transformers.CLIPTextModelWithProjection",anchor:"transformers.CLIPTextModelWithProjection",parameters:[{name:"config",val:": CLIPTextConfig"}],parametersDescription:[{anchor:"transformers.CLIPTextModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1198"}}),Ia=new k({props:{name:"forward",anchor:"transformers.CLIPTextModelWithProjection.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPTextModelWithProjection.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CLIPTextModelWithProjection.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.CLIPTextModelWithProjection.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.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.CLIPTextModelWithProjection.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPTextModelWithProjection.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPTextModelWithProjection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1219",returnDescription:`
<p>A <code>transformers.models.clip.modeling_clip.CLIPTextModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 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>) \u2014 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:`
<p><code>transformers.models.clip.modeling_clip.CLIPTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),So=new q({props:{$$slots:{default:[hM]},$$scope:{ctx:P}}}),Do=new F({props:{anchor:"transformers.CLIPTextModelWithProjection.forward.example",$$slots:{default:[fM]},$$scope:{ctx:P}}}),$a=new J({}),Pa=new k({props:{name:"class transformers.CLIPVisionModelWithProjection",anchor:"transformers.CLIPVisionModelWithProjection",parameters:[{name:"config",val:": CLIPVisionConfig"}],parametersDescription:[{anchor:"transformers.CLIPVisionModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1279"}}),La=new k({props:{name:"forward",anchor:"transformers.CLIPVisionModelWithProjection.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPVisionModelWithProjection.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.CLIPVisionModelWithProjection.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPVisionModelWithProjection.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPVisionModelWithProjection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L1296",returnDescription:`
<p>A <code>transformers.models.clip.modeling_clip.CLIPVisionModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 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>) \u2014 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:`
<p><code>transformers.models.clip.modeling_clip.CLIPVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ho=new q({props:{$$slots:{default:[uM]},$$scope:{ctx:P}}}),Qo=new F({props:{anchor:"transformers.CLIPVisionModelWithProjection.forward.example",$$slots:{default:[gM]},$$scope:{ctx:P}}}),ja=new J({}),Ja=new k({props:{name:"class transformers.CLIPVisionModel",anchor:"transformers.CLIPVisionModel",parameters:[{name:"config",val:": CLIPVisionConfig"}],parametersDescription:[{anchor:"transformers.CLIPVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L912"}}),Fa=new k({props:{name:"forward",anchor:"transformers.CLIPVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CLIPVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.CLIPVisionModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.CLIPVisionModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CLIPVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_clip.py#L925",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/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.clip.configuration_clip.CLIPVisionConfig'&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>) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ko=new q({props:{$$slots:{default:[_M]},$$scope:{ctx:P}}}),en=new F({props:{anchor:"transformers.CLIPVisionModel.forward.example",$$slots:{default:[bM]},$$scope:{ctx:P}}}),Wa=new J({}),Va=new k({props:{name:"class transformers.TFCLIPModel",anchor:"transformers.TFCLIPModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1167"}}),on=new q({props:{$$slots:{default:[yM]},$$scope:{ctx:P}}}),Ga=new k({props:{name:"call",anchor:"transformers.TFCLIPModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"return_loss",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> <code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFCLIPModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPModel.call.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.TFCLIPModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1257",returnDescription:`
<p>A <code>transformers.models.clip.modeling_tf_clip.TFCLIPOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) \u2014 Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>tf.Tensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>tf.Tensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>tf.Tensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPTextModel"
>TFCLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>tf.Tensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPVisionModel"
>TFCLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>~modeling_tf_utils.TFBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPTextModel"
>TFCLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>~modeling_tf_utils.TFBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPVisionModel"
>TFCLIPVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.clip.modeling_tf_clip.TFCLIPOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),nn=new q({props:{$$slots:{default:[TM]},$$scope:{ctx:P}}}),sn=new F({props:{anchor:"transformers.TFCLIPModel.call.example",$$slots:{default:[vM]},$$scope:{ctx:P}}}),Ra=new k({props:{name:"get_text_features",anchor:"transformers.TFCLIPModel.get_text_features",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPModel.get_text_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPModel.get_text_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.get_text_features.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1175",returnDescription:`
<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPTextModel"
>TFCLIPTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),an=new q({props:{$$slots:{default:[MM]},$$scope:{ctx:P}}}),rn=new F({props:{anchor:"transformers.TFCLIPModel.get_text_features.example",$$slots:{default:[wM]},$$scope:{ctx:P}}}),qa=new k({props:{name:"get_image_features",anchor:"transformers.TFCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFCLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details. output_attentions (<code>bool</code>, <em>optional</em>): Whether or not to
return the attentions tensors of all attention layers. See <code>attentions</code> under returned tensors for more
detail. This argument can be used only in eager mode, in graph mode the value in the config will be used
instead.`,name:"pixel_values"},{anchor:"transformers.TFCLIPModel.get_image_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPModel.get_image_features.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1215",returnDescription:`
<p>The image embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPVisionModel"
>TFCLIPVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ln=new q({props:{$$slots:{default:[IM]},$$scope:{ctx:P}}}),dn=new F({props:{anchor:"transformers.TFCLIPModel.get_image_features.example",$$slots:{default:[$M]},$$scope:{ctx:P}}}),Xa=new J({}),Aa=new k({props:{name:"class transformers.TFCLIPTextModel",anchor:"transformers.TFCLIPTextModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1060"}}),Sa=new k({props:{name:"call",anchor:"transformers.TFCLIPTextModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCLIPTextModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCLIPTextModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCLIPTextModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCLIPTextModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCLIPTextModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPTextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPTextModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1068",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),pn=new q({props:{$$slots:{default:[PM]},$$scope:{ctx:P}}}),mn=new F({props:{anchor:"transformers.TFCLIPTextModel.call.example",$$slots:{default:[CM]},$$scope:{ctx:P}}}),Da=new J({}),Ya=new k({props:{name:"class transformers.TFCLIPVisionModel",anchor:"transformers.TFCLIPVisionModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1112"}}),Ha=new k({props:{name:"call",anchor:"transformers.TFCLIPVisionModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCLIPVisionModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details. output_attentions (<code>bool</code>, <em>optional</em>): Whether or not to
return the attentions tensors of all attention layers. See <code>attentions</code> under returned tensors for more
detail. This argument can be used only in eager mode, in graph mode the value in the config will be used
instead.`,name:"pixel_values"},{anchor:"transformers.TFCLIPVisionModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCLIPVisionModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCLIPVisionModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_tf_clip.py#L1121",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fn=new q({props:{$$slots:{default:[kM]},$$scope:{ctx:P}}}),un=new F({props:{anchor:"transformers.TFCLIPVisionModel.call.example",$$slots:{default:[xM]},$$scope:{ctx:P}}}),Qa=new J({}),Oa=new k({props:{name:"class transformers.FlaxCLIPModel",anchor:"transformers.FlaxCLIPModel",parameters:[{name:"config",val:": CLIPConfig"},{name:"input_shape",val:": typing.Optional[typing.Tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig">CLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxCLIPModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1262"}}),rr=new k({props:{name:"__call__",anchor:"transformers.FlaxCLIPModel.__call__",parameters:[{name:"input_ids",val:""},{name:"pixel_values",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxCLIPModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaxCLIPModel.__call__.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlaxCLIPModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L819",returnDescription:`
<p>A <code>transformers.models.clip.modeling_flax_clip.FlaxCLIPOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>logits_per_image:(<code>jnp.ndarray</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>jnp.ndarray</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>jnp.ndarray</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>jnp.ndarray</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPVisionModel"
>FlaxCLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>FlaxBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>FlaxBaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPVisionModel"
>FlaxCLIPVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.clip.modeling_flax_clip.FlaxCLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new q({props:{$$slots:{default:[LM]},$$scope:{ctx:P}}}),bn=new F({props:{anchor:"transformers.FlaxCLIPModel.__call__.example",$$slots:{default:[jM]},$$scope:{ctx:P}}}),ir=new k({props:{name:"get_text_features",anchor:"transformers.FlaxCLIPModel.get_text_features",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:" = False"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L864",returnDescription:`
<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Tn=new F({props:{anchor:"transformers.FlaxCLIPModel.get_text_features.example",$$slots:{default:[JM]},$$scope:{ctx:P}}}),lr=new k({props:{name:"get_image_features",anchor:"transformers.FlaxCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:" = False"}],parametersDescription:[{anchor:"transformers.FlaxCLIPModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained
using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L931",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPVisionModel"
>FlaxCLIPVisionModel</a></p>
`,returnType:`
<p>image_features (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Mn=new F({props:{anchor:"transformers.FlaxCLIPModel.get_image_features.example",$$slots:{default:[EM]},$$scope:{ctx:P}}}),dr=new J({}),cr=new k({props:{name:"class transformers.FlaxCLIPTextModel",anchor:"transformers.FlaxCLIPTextModel",parameters:[{name:"config",val:": CLIPTextConfig"},{name:"input_shape",val:" = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1011"}}),pr=new k({props:{name:"__call__",anchor:"transformers.FlaxCLIPTextModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPTextModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPTextModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxCLIPTextModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaxCLIPTextModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPTextModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPTextModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L664",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),In=new q({props:{$$slots:{default:[zM]},$$scope:{ctx:P}}}),$n=new F({props:{anchor:"transformers.FlaxCLIPTextModel.__call__.example",$$slots:{default:[UM]},$$scope:{ctx:P}}}),mr=new J({}),hr=new k({props:{name:"class transformers.FlaxCLIPTextModelWithProjection",anchor:"transformers.FlaxCLIPTextModelWithProjection",parameters:[{name:"config",val:": CLIPTextConfig"},{name:"input_shape",val:" = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1082"}}),fr=new k({props:{name:"__call__",anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L664",returnDescription:`
<p>A <code>transformers.models.clip.modeling_flax_clip.FlaxCLIPTextModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPTextModel"
>FlaxCLIPTextModel</a>.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.clip.modeling_flax_clip.FlaxCLIPTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Cn=new q({props:{$$slots:{default:[FM]},$$scope:{ctx:P}}}),kn=new F({props:{anchor:"transformers.FlaxCLIPTextModelWithProjection.__call__.example",$$slots:{default:[WM]},$$scope:{ctx:P}}}),ur=new J({}),gr=new k({props:{name:"class transformers.FlaxCLIPVisionModel",anchor:"transformers.FlaxCLIPVisionModel",parameters:[{name:"config",val:": CLIPVisionConfig"},{name:"input_shape",val:": typing.Optional[typing.Tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L1136"}}),_r=new k({props:{name:"__call__",anchor:"transformers.FlaxCLIPVisionModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxCLIPVisionModel.__call__.pixel_values",description:`<strong>pixel_values</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxCLIPVisionModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clip/modeling_flax_clip.py#L744",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.clip.configuration_clip.CLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ln=new q({props:{$$slots:{default:[VM]},$$scope:{ctx:P}}}),jn=new F({props:{anchor:"transformers.FlaxCLIPVisionModel.__call__.example",$$slots:{default:[ZM]},$$scope:{ctx:P}}}),{c(){d=s("meta"),y=m(),u=s("h1"),p=s("a"),_=s("span"),T(n.$$.fragment),c=m(),C=s("span"),ts=i("CLIP"),ro=m(),D=s("h2"),pe=s("a"),Re=s("span"),T(j.$$.fragment),os=m(),Fe=s("span"),ns=i("Overview"),io=m(),te=s("p"),ss=i("The CLIP model was proposed in "),We=s("a"),ot=i("Learning Transferable Visual Models From Natural Language Supervision"),as=i(` by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh,
Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever. CLIP
(Contrastive Language-Image Pre-Training) is a neural network trained on a variety of (image, text) pairs. It can be
instructed in natural language to predict the most relevant text snippet, given an image, without directly optimizing
for the task, similarly to the zero-shot capabilities of GPT-2 and 3.`),lo=m(),me=s("p"),rs=i("The abstract from the paper is the following:"),co=m(),he=s("p"),nt=s("em"),is=i(`State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories. This
restricted form of supervision limits their generality and usability since additional labeled data is needed to specify
any other visual concept. Learning directly from raw text about images is a promising alternative which leverages a
much broader source of supervision. We demonstrate that the simple pre-training task of predicting which caption goes
with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400
million (image, text) pairs collected from the internet. After pre-training, natural language is used to reference
learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks. We study
the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks
such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification. The
model transfers non-trivially to most tasks and is often competitive with a fully supervised baseline without the need
for any dataset specific training. For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot
without needing to use any of the 1.28 million training examples it was trained on. We release our code and pre-trained
model weights at this https URL.`),st=m(),V=s("h2"),N=s("a"),at=s("span"),T(re.$$.fragment),ls=m(),rt=s("span"),it=i("Usage"),po=m(),qe=s("p"),fe=i(`CLIP is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image
classification. CLIP uses a ViT like transformer to get visual features and a causal language model to get the text
features. Both the text and visual features are then projected to a latent space with identical dimension. The dot
product between the projected image and text features is then used as a similar score.`),mo=m(),oe=s("p"),ds=i(`To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image. The authors
also add absolute position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder.
The `),Xe=s("a"),lt=i("CLIPImageProcessor"),cs=i(" can be used to resize (or rescale) and normalize images for the model."),ho=m(),L=s("p"),ps=i("The "),ue=s("a"),ms=i("CLIPTokenizer"),fo=i(" is used to encode the text. The "),Y=s("a"),hs=i("CLIPProcessor"),Ve=i(` wraps
`),Ae=s("a"),fs=i("CLIPImageProcessor"),x=i(" and "),z=s("a"),Cr=i("CLIPTokenizer"),uo=i(` into a single instance to both
encode the text and prepare the images. The following example shows how to get the image-text similarity scores using
`),dt=s("a"),kr=i("CLIPProcessor"),X=i(" and "),ct=s("a"),xr=i("CLIPModel"),Lr=i("."),us=m(),T(Se.$$.fragment),Ze=m(),A=s("p"),jr=i("This model was contributed by "),De=s("a"),pt=i("valhalla"),Jr=i(". The original code can be found "),Ye=s("a"),gs=i("here"),Er=i("."),mt=m(),ge=s("h2"),go=s("a"),Xi=s("span"),T(_s.$$.fragment),Rp=m(),Ai=s("span"),qp=i("Resources"),Qd=m(),zr=s("p"),Xp=i("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with CLIP."),Od=m(),_o=s("ul"),bs=s("li"),Ap=i("A blog post on "),ys=s("a"),Sp=i("How to fine-tune CLIP on 10,000 image-text pairs"),Dp=i("."),Yp=m(),Ts=s("li"),Hp=i("CLIP is supported by this "),vs=s("a"),Qp=i("example script"),Op=i("."),Kd=m(),Ur=s("p"),Kp=i(`If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it.
The resource should ideally demonstrate something new instead of duplicating an existing resource.`),ec=m(),ht=s("h2"),bo=s("a"),Si=s("span"),T(Ms.$$.fragment),em=m(),Di=s("span"),tm=i("CLIPConfig"),tc=m(),H=s("div"),T(ws.$$.fragment),om=m(),He=s("p"),Fr=s("a"),nm=i("CLIPConfig"),sm=i(" is the configuration class to store the configuration of a "),Wr=s("a"),am=i("CLIPModel"),rm=i(`. It is used to instantiate
a CLIP model according to the specified arguments, defining the text model and vision model configs. Instantiating
a configuration with the defaults will yield a similar configuration to that of the CLIP
`),Is=s("a"),im=i("openai/clip-vit-base-patch32"),lm=i(" architecture."),dm=m(),ft=s("p"),cm=i("Configuration objects inherit from "),Vr=s("a"),pm=i("PretrainedConfig"),mm=i(` and can be used to control the model outputs. Read the
documentation from `),Zr=s("a"),hm=i("PretrainedConfig"),fm=i(" for more information."),um=m(),T(yo.$$.fragment),gm=m(),To=s("div"),T($s.$$.fragment),_m=m(),Ps=s("p"),bm=i("Instantiate a "),Br=s("a"),ym=i("CLIPConfig"),Tm=i(` (or a derived class) from clip text model configuration and clip vision model
configuration.`),oc=m(),ut=s("h2"),vo=s("a"),Yi=s("span"),T(Cs.$$.fragment),vm=m(),Hi=s("span"),Mm=i("CLIPTextConfig"),nc=m(),ie=s("div"),T(ks.$$.fragment),wm=m(),gt=s("p"),Im=i("This is the configuration class to store the configuration of a "),Nr=s("a"),$m=i("CLIPTextModel"),Pm=i(`. It is used to instantiate a CLIP
text encoder according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the text encoder of the CLIP
`),xs=s("a"),Cm=i("openai/clip-vit-base-patch32"),km=i(" architecture."),xm=m(),_t=s("p"),Lm=i("Configuration objects inherit from "),Gr=s("a"),jm=i("PretrainedConfig"),Jm=i(` and can be used to control the model outputs. Read the
documentation from `),Rr=s("a"),Em=i("PretrainedConfig"),zm=i(" for more information."),Um=m(),T(Mo.$$.fragment),sc=m(),bt=s("h2"),wo=s("a"),Qi=s("span"),T(Ls.$$.fragment),Fm=m(),Oi=s("span"),Wm=i("CLIPVisionConfig"),ac=m(),le=s("div"),T(js.$$.fragment),Vm=m(),yt=s("p"),Zm=i("This is the configuration class to store the configuration of a "),qr=s("a"),Bm=i("CLIPVisionModel"),Nm=i(`. It is used to instantiate a
CLIP vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder of the CLIP
`),Js=s("a"),Gm=i("openai/clip-vit-base-patch32"),Rm=i(" architecture."),qm=m(),Tt=s("p"),Xm=i("Configuration objects inherit from "),Xr=s("a"),Am=i("PretrainedConfig"),Sm=i(` and can be used to control the model outputs. Read the
documentation from `),Ar=s("a"),Dm=i("PretrainedConfig"),Ym=i(" for more information."),Hm=m(),T(Io.$$.fragment),rc=m(),vt=s("h2"),$o=s("a"),Ki=s("span"),T(Es.$$.fragment),Qm=m(),el=s("span"),Om=i("CLIPTokenizer"),ic=m(),Z=s("div"),T(zs.$$.fragment),Km=m(),tl=s("p"),eh=i("Construct a CLIP tokenizer. Based on byte-level Byte-Pair-Encoding."),th=m(),Us=s("p"),oh=i("This tokenizer inherits from "),Sr=s("a"),nh=i("PreTrainedTokenizer"),sh=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ah=m(),_e=s("div"),T(Fs.$$.fragment),rh=m(),ol=s("p"),ih=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`),lh=m(),nl=s("ul"),Dr=s("li"),dh=i("single sequence: "),sl=s("code"),ch=i("<|startoftext|> X <|endoftext|>"),ph=m(),al=s("p"),mh=i("Pairs of sequences are not the expected use case, but they will be handled without a separator."),hh=m(),Po=s("div"),T(Ws.$$.fragment),fh=m(),Vs=s("p"),uh=i(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),rl=s("code"),gh=i("prepare_for_model"),_h=i(" method."),bh=m(),Co=s("div"),T(Zs.$$.fragment),yh=m(),il=s("p"),Th=i(`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`),vh=m(),Yr=s("div"),T(Bs.$$.fragment),lc=m(),Mt=s("h2"),ko=s("a"),ll=s("span"),T(Ns.$$.fragment),Mh=m(),dl=s("span"),wh=i("CLIPTokenizerFast"),dc=m(),Q=s("div"),T(Gs.$$.fragment),Ih=m(),Rs=s("p"),$h=i("Construct a \u201Cfast\u201D CLIP tokenizer (backed by HuggingFace\u2019s "),cl=s("em"),Ph=i("tokenizers"),Ch=i(` library). Based on byte-level
Byte-Pair-Encoding.`),kh=m(),qs=s("p"),xh=i("This tokenizer inherits from "),Hr=s("a"),Lh=i("PreTrainedTokenizerFast"),jh=i(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Jh=m(),be=s("div"),T(Xs.$$.fragment),Eh=m(),pl=s("p"),zh=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`),Uh=m(),ml=s("ul"),Qr=s("li"),Fh=i("single sequence: "),hl=s("code"),Wh=i("<|startoftext|> X <|endoftext|>"),Vh=m(),fl=s("p"),Zh=i("Pairs of sequences are not the expected use case, but they will be handled without a separator."),Bh=m(),xo=s("div"),T(As.$$.fragment),Nh=m(),ul=s("p"),Gh=i(`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`),cc=m(),wt=s("h2"),Lo=s("a"),gl=s("span"),T(Ss.$$.fragment),Rh=m(),_l=s("span"),qh=i("CLIPImageProcessor"),pc=m(),Be=s("div"),T(Ds.$$.fragment),Xh=m(),bl=s("p"),Ah=i("Constructs a CLIP image processor."),Sh=m(),jo=s("div"),T(Ys.$$.fragment),Dh=m(),yl=s("p"),Yh=i("Preprocess an image or batch of images."),mc=m(),It=s("h2"),Jo=s("a"),Tl=s("span"),T(Hs.$$.fragment),Hh=m(),vl=s("span"),Qh=i("CLIPFeatureExtractor"),hc=m(),Qs=s("div"),T(Os.$$.fragment),fc=m(),$t=s("h2"),Eo=s("a"),Ml=s("span"),T(Ks.$$.fragment),Oh=m(),wl=s("span"),Kh=i("CLIPProcessor"),uc=m(),O=s("div"),T(ea.$$.fragment),ef=m(),Il=s("p"),tf=i("Constructs a CLIP processor which wraps a CLIP image processor and a CLIP tokenizer into a single processor."),of=m(),ne=s("p"),Or=s("a"),nf=i("CLIPProcessor"),sf=i(" offers all the functionalities of "),Kr=s("a"),af=i("CLIPImageProcessor"),rf=i(" and "),ei=s("a"),lf=i("CLIPTokenizerFast"),df=i(`. See the
`),$l=s("code"),cf=i("__call__()"),pf=i(" and "),ti=s("a"),mf=i("decode()"),hf=i(" for more information."),ff=m(),zo=s("div"),T(ta.$$.fragment),uf=m(),oa=s("p"),gf=i("This method forwards all its arguments to CLIPTokenizerFast\u2019s "),oi=s("a"),_f=i("batch_decode()"),bf=i(`. Please
refer to the docstring of this method for more information.`),yf=m(),Uo=s("div"),T(na.$$.fragment),Tf=m(),sa=s("p"),vf=i("This method forwards all its arguments to CLIPTokenizerFast\u2019s "),ni=s("a"),Mf=i("decode()"),wf=i(`. Please refer to
the docstring of this method for more information.`),gc=m(),Pt=s("h2"),Fo=s("a"),Pl=s("span"),T(aa.$$.fragment),If=m(),Cl=s("span"),$f=i("CLIPModel"),_c=m(),G=s("div"),T(ra.$$.fragment),Pf=m(),ia=s("p"),Cf=i("This model inherits from "),si=s("a"),kf=i("PreTrainedModel"),xf=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Lf=m(),la=s("p"),jf=i("This model is also a PyTorch "),da=s("a"),Jf=i("torch.nn.Module"),Ef=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zf=m(),ye=s("div"),T(ca.$$.fragment),Uf=m(),Ct=s("p"),Ff=i("The "),ai=s("a"),Wf=i("CLIPModel"),Vf=i(" forward method, overrides the "),kl=s("code"),Zf=i("__call__"),Bf=i(" special method."),Nf=m(),T(Wo.$$.fragment),Gf=m(),T(Vo.$$.fragment),Rf=m(),Te=s("div"),T(pa.$$.fragment),qf=m(),kt=s("p"),Xf=i("The "),ri=s("a"),Af=i("CLIPModel"),Sf=i(" forward method, overrides the "),xl=s("code"),Df=i("__call__"),Yf=i(" special method."),Hf=m(),T(Zo.$$.fragment),Qf=m(),T(Bo.$$.fragment),Of=m(),ve=s("div"),T(ma.$$.fragment),Kf=m(),xt=s("p"),eu=i("The "),ii=s("a"),tu=i("CLIPModel"),ou=i(" forward method, overrides the "),Ll=s("code"),nu=i("__call__"),su=i(" special method."),au=m(),T(No.$$.fragment),ru=m(),T(Go.$$.fragment),bc=m(),Lt=s("h2"),Ro=s("a"),jl=s("span"),T(ha.$$.fragment),iu=m(),Jl=s("span"),lu=i("CLIPTextModel"),yc=m(),de=s("div"),T(fa.$$.fragment),du=m(),ua=s("p"),cu=i(`The text model from CLIP without any head or projection on top.
This model inherits from `),li=s("a"),pu=i("PreTrainedModel"),mu=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hu=m(),ga=s("p"),fu=i("This model is also a PyTorch "),_a=s("a"),uu=i("torch.nn.Module"),gu=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_u=m(),Me=s("div"),T(ba.$$.fragment),bu=m(),jt=s("p"),yu=i("The "),di=s("a"),Tu=i("CLIPTextModel"),vu=i(" forward method, overrides the "),El=s("code"),Mu=i("__call__"),wu=i(" special method."),Iu=m(),T(qo.$$.fragment),$u=m(),T(Xo.$$.fragment),Tc=m(),Jt=s("h2"),Ao=s("a"),zl=s("span"),T(ya.$$.fragment),Pu=m(),Ul=s("span"),Cu=i("CLIPTextModelWithProjection"),vc=m(),K=s("div"),T(Ta.$$.fragment),ku=m(),Fl=s("p"),xu=i("CLIP Text Model with a projection layer on top (a linear layer on top of the pooled output)."),Lu=m(),va=s("p"),ju=i("This model inherits from "),ci=s("a"),Ju=i("PreTrainedModel"),Eu=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zu=m(),Ma=s("p"),Uu=i("This model is also a PyTorch "),wa=s("a"),Fu=i("torch.nn.Module"),Wu=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vu=m(),we=s("div"),T(Ia.$$.fragment),Zu=m(),Et=s("p"),Bu=i("The "),pi=s("a"),Nu=i("CLIPTextModelWithProjection"),Gu=i(" forward method, overrides the "),Wl=s("code"),Ru=i("__call__"),qu=i(" special method."),Xu=m(),T(So.$$.fragment),Au=m(),T(Do.$$.fragment),Mc=m(),zt=s("h2"),Yo=s("a"),Vl=s("span"),T($a.$$.fragment),Su=m(),Zl=s("span"),Du=i("CLIPVisionModelWithProjection"),wc=m(),ee=s("div"),T(Pa.$$.fragment),Yu=m(),Bl=s("p"),Hu=i("CLIP Vision Model with a projection layer on top (a linear layer on top of the pooled output)."),Qu=m(),Ca=s("p"),Ou=i("This model inherits from "),mi=s("a"),Ku=i("PreTrainedModel"),eg=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),tg=m(),ka=s("p"),og=i("This model is also a PyTorch "),xa=s("a"),ng=i("torch.nn.Module"),sg=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ag=m(),Ie=s("div"),T(La.$$.fragment),rg=m(),Ut=s("p"),ig=i("The "),hi=s("a"),lg=i("CLIPVisionModelWithProjection"),dg=i(" forward method, overrides the "),Nl=s("code"),cg=i("__call__"),pg=i(" special method."),mg=m(),T(Ho.$$.fragment),hg=m(),T(Qo.$$.fragment),Ic=m(),Ft=s("h2"),Oo=s("a"),Gl=s("span"),T(ja.$$.fragment),fg=m(),Rl=s("span"),ug=i("CLIPVisionModel"),$c=m(),ce=s("div"),T(Ja.$$.fragment),gg=m(),Ea=s("p"),_g=i(`The vision model from CLIP without any head or projection on top.
This model inherits from `),fi=s("a"),bg=i("PreTrainedModel"),yg=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tg=m(),za=s("p"),vg=i("This model is also a PyTorch "),Ua=s("a"),Mg=i("torch.nn.Module"),wg=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ig=m(),$e=s("div"),T(Fa.$$.fragment),$g=m(),Wt=s("p"),Pg=i("The "),ui=s("a"),Cg=i("CLIPVisionModel"),kg=i(" forward method, overrides the "),ql=s("code"),xg=i("__call__"),Lg=i(" special method."),jg=m(),T(Ko.$$.fragment),Jg=m(),T(en.$$.fragment),Pc=m(),Vt=s("h2"),tn=s("a"),Xl=s("span"),T(Wa.$$.fragment),Eg=m(),Al=s("span"),zg=i("TFCLIPModel"),Cc=m(),B=s("div"),T(Va.$$.fragment),Ug=m(),Za=s("p"),Fg=i("This model inherits from "),gi=s("a"),Wg=i("TFPreTrainedModel"),Vg=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zg=m(),Ba=s("p"),Bg=i("This model is also a "),Na=s("a"),Ng=i("tf.keras.Model"),Gg=i(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Rg=m(),T(on.$$.fragment),qg=m(),Pe=s("div"),T(Ga.$$.fragment),Xg=m(),Zt=s("p"),Ag=i("The "),_i=s("a"),Sg=i("TFCLIPModel"),Dg=i(" forward method, overrides the "),Sl=s("code"),Yg=i("__call__"),Hg=i(" special method."),Qg=m(),T(nn.$$.fragment),Og=m(),T(sn.$$.fragment),Kg=m(),Ce=s("div"),T(Ra.$$.fragment),e_=m(),Bt=s("p"),t_=i("The "),bi=s("a"),o_=i("TFCLIPModel"),n_=i(" forward method, overrides the "),Dl=s("code"),s_=i("__call__"),a_=i(" special method."),r_=m(),T(an.$$.fragment),i_=m(),T(rn.$$.fragment),l_=m(),ke=s("div"),T(qa.$$.fragment),d_=m(),Nt=s("p"),c_=i("The "),yi=s("a"),p_=i("TFCLIPModel"),m_=i(" forward method, overrides the "),Yl=s("code"),h_=i("__call__"),f_=i(" special method."),u_=m(),T(ln.$$.fragment),g_=m(),T(dn.$$.fragment),kc=m(),Gt=s("h2"),cn=s("a"),Hl=s("span"),T(Xa.$$.fragment),__=m(),Ql=s("span"),b_=i("TFCLIPTextModel"),xc=m(),Rt=s("div"),T(Aa.$$.fragment),y_=m(),xe=s("div"),T(Sa.$$.fragment),T_=m(),qt=s("p"),v_=i("The "),Ti=s("a"),M_=i("TFCLIPTextModel"),w_=i(" forward method, overrides the "),Ol=s("code"),I_=i("__call__"),$_=i(" special method."),P_=m(),T(pn.$$.fragment),C_=m(),T(mn.$$.fragment),Lc=m(),Xt=s("h2"),hn=s("a"),Kl=s("span"),T(Da.$$.fragment),k_=m(),ed=s("span"),x_=i("TFCLIPVisionModel"),jc=m(),At=s("div"),T(Ya.$$.fragment),L_=m(),Le=s("div"),T(Ha.$$.fragment),j_=m(),St=s("p"),J_=i("The "),vi=s("a"),E_=i("TFCLIPVisionModel"),z_=i(" forward method, overrides the "),td=s("code"),U_=i("__call__"),F_=i(" special method."),W_=m(),T(fn.$$.fragment),V_=m(),T(un.$$.fragment),Jc=m(),Dt=s("h2"),gn=s("a"),od=s("span"),T(Qa.$$.fragment),Z_=m(),nd=s("span"),B_=i("FlaxCLIPModel"),Ec=m(),U=s("div"),T(Oa.$$.fragment),N_=m(),Ka=s("p"),G_=i("This model inherits from "),Mi=s("a"),R_=i("FlaxPreTrainedModel"),q_=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),X_=m(),er=s("p"),A_=i("This model is also a Flax Linen "),tr=s("a"),S_=i("flax.linen.Module"),D_=i(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Y_=m(),sd=s("p"),H_=i("Finally, this model supports inherent JAX features such as:"),Q_=m(),Ne=s("ul"),ad=s("li"),or=s("a"),O_=i("Just-In-Time (JIT) compilation"),K_=m(),rd=s("li"),nr=s("a"),eb=i("Automatic Differentiation"),tb=m(),id=s("li"),sr=s("a"),ob=i("Vectorization"),nb=m(),ld=s("li"),ar=s("a"),sb=i("Parallelization"),ab=m(),je=s("div"),T(rr.$$.fragment),rb=m(),Yt=s("p"),ib=i("The "),dd=s("code"),lb=i("FlaxCLIPPreTrainedModel"),db=i(" forward method, overrides the "),cd=s("code"),cb=i("__call__"),pb=i(" special method."),mb=m(),T(_n.$$.fragment),hb=m(),T(bn.$$.fragment),fb=m(),yn=s("div"),T(ir.$$.fragment),ub=m(),T(Tn.$$.fragment),gb=m(),vn=s("div"),T(lr.$$.fragment),_b=m(),T(Mn.$$.fragment),zc=m(),Ht=s("h2"),wn=s("a"),pd=s("span"),T(dr.$$.fragment),bb=m(),md=s("span"),yb=i("FlaxCLIPTextModel"),Uc=m(),Qt=s("div"),T(cr.$$.fragment),Tb=m(),Je=s("div"),T(pr.$$.fragment),vb=m(),Ot=s("p"),Mb=i("The "),hd=s("code"),wb=i("FlaxCLIPTextPreTrainedModel"),Ib=i(" forward method, overrides the "),fd=s("code"),$b=i("__call__"),Pb=i(" special method."),Cb=m(),T(In.$$.fragment),kb=m(),T($n.$$.fragment),Fc=m(),Kt=s("h2"),Pn=s("a"),ud=s("span"),T(mr.$$.fragment),xb=m(),gd=s("span"),Lb=i("FlaxCLIPTextModelWithProjection"),Wc=m(),eo=s("div"),T(hr.$$.fragment),jb=m(),Ee=s("div"),T(fr.$$.fragment),Jb=m(),to=s("p"),Eb=i("The "),_d=s("code"),zb=i("FlaxCLIPTextPreTrainedModel"),Ub=i(" forward method, overrides the "),bd=s("code"),Fb=i("__call__"),Wb=i(" special method."),Vb=m(),T(Cn.$$.fragment),Zb=m(),T(kn.$$.fragment),Vc=m(),oo=s("h2"),xn=s("a"),yd=s("span"),T(ur.$$.fragment),Bb=m(),Td=s("span"),Nb=i("FlaxCLIPVisionModel"),Zc=m(),no=s("div"),T(gr.$$.fragment),Gb=m(),ze=s("div"),T(_r.$$.fragment),Rb=m(),so=s("p"),qb=i("The "),vd=s("code"),Xb=i("FlaxCLIPVisionPreTrainedModel"),Ab=i(" forward method, overrides the "),Md=s("code"),Sb=i("__call__"),Db=i(" special method."),Yb=m(),T(Ln.$$.fragment),Hb=m(),T(jn.$$.fragment),this.h()},l(t){const g=eM('[data-svelte="svelte-1phssyn"]',document.head);d=a(g,"META",{name:!0,content:!0}),g.forEach(o),y=h(t),u=a(t,"H1",{class:!0});var br=r(u);p=a(br,"A",{id:!0,class:!0,href:!0});var wd=r(p);_=a(wd,"SPAN",{});var Id=r(_);v(n.$$.fragment,Id),Id.forEach(o),wd.forEach(o),c=h(br),C=a(br,"SPAN",{});var $d=r(C);ts=l($d,"CLIP"),$d.forEach(o),br.forEach(o),ro=h(t),D=a(t,"H2",{class:!0});var yr=r(D);pe=a(yr,"A",{id:!0,class:!0,href:!0});var Pd=r(pe);Re=a(Pd,"SPAN",{});var Cd=r(Re);v(j.$$.fragment,Cd),Cd.forEach(o),Pd.forEach(o),os=h(yr),Fe=a(yr,"SPAN",{});var kd=r(Fe);ns=l(kd,"Overview"),kd.forEach(o),yr.forEach(o),io=h(t),te=a(t,"P",{});var Tr=r(te);ss=l(Tr,"The CLIP model was proposed in "),We=a(Tr,"A",{href:!0,rel:!0});var xd=r(We);ot=l(xd,"Learning Transferable Visual Models From Natural Language Supervision"),xd.forEach(o),as=l(Tr,` by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh,
Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever. CLIP
(Contrastive Language-Image Pre-Training) is a neural network trained on a variety of (image, text) pairs. It can be
instructed in natural language to predict the most relevant text snippet, given an image, without directly optimizing
for the task, similarly to the zero-shot capabilities of GPT-2 and 3.`),Tr.forEach(o),lo=h(t),me=a(t,"P",{});var Ld=r(me);rs=l(Ld,"The abstract from the paper is the following:"),Ld.forEach(o),co=h(t),he=a(t,"P",{});var jd=r(he);nt=a(jd,"EM",{});var Jd=r(nt);is=l(Jd,`State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories. This
restricted form of supervision limits their generality and usability since additional labeled data is needed to specify
any other visual concept. Learning directly from raw text about images is a promising alternative which leverages a
much broader source of supervision. We demonstrate that the simple pre-training task of predicting which caption goes
with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400
million (image, text) pairs collected from the internet. After pre-training, natural language is used to reference
learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks. We study
the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks
such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification. The
model transfers non-trivially to most tasks and is often competitive with a fully supervised baseline without the need
for any dataset specific training. For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot
without needing to use any of the 1.28 million training examples it was trained on. We release our code and pre-trained
model weights at this https URL.`),Jd.forEach(o),jd.forEach(o),st=h(t),V=a(t,"H2",{class:!0});var vr=r(V);N=a(vr,"A",{id:!0,class:!0,href:!0});var Ed=r(N);at=a(Ed,"SPAN",{});var zd=r(at);v(re.$$.fragment,zd),zd.forEach(o),Ed.forEach(o),ls=h(vr),rt=a(vr,"SPAN",{});var Ud=r(rt);it=l(Ud,"Usage"),Ud.forEach(o),vr.forEach(o),po=h(t),qe=a(t,"P",{});var Fd=r(qe);fe=l(Fd,`CLIP is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image
classification. CLIP uses a ViT like transformer to get visual features and a causal language model to get the text
features. Both the text and visual features are then projected to a latent space with identical dimension. The dot
product between the projected image and text features is then used as a similar score.`),Fd.forEach(o),mo=h(t),oe=a(t,"P",{});var Mr=r(oe);ds=l(Mr,`To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image. The authors
also add absolute position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder.
The `),Xe=a(Mr,"A",{href:!0});var Wd=r(Xe);lt=l(Wd,"CLIPImageProcessor"),Wd.forEach(o),cs=l(Mr," can be used to resize (or rescale) and normalize images for the model."),Mr.forEach(o),ho=h(t),L=a(t,"P",{});var R=r(L);ps=l(R,"The "),ue=a(R,"A",{href:!0});var Vd=r(ue);ms=l(Vd,"CLIPTokenizer"),Vd.forEach(o),fo=l(R," is used to encode the text. The "),Y=a(R,"A",{href:!0});var Zd=r(Y);hs=l(Zd,"CLIPProcessor"),Zd.forEach(o),Ve=l(R,` wraps
`),Ae=a(R,"A",{href:!0});var Bd=r(Ae);fs=l(Bd,"CLIPImageProcessor"),Bd.forEach(o),x=l(R," and "),z=a(R,"A",{href:!0});var Nd=r(z);Cr=l(Nd,"CLIPTokenizer"),Nd.forEach(o),uo=l(R,` into a single instance to both
encode the text and prepare the images. The following example shows how to get the image-text similarity scores using
`),dt=a(R,"A",{href:!0});var Gd=r(dt);kr=l(Gd,"CLIPProcessor"),Gd.forEach(o),X=l(R," and "),ct=a(R,"A",{href:!0});var Rd=r(ct);xr=l(Rd,"CLIPModel"),Rd.forEach(o),Lr=l(R,"."),R.forEach(o),us=h(t),v(Se.$$.fragment,t),Ze=h(t),A=a(t,"P",{});var ao=r(A);jr=l(ao,"This model was contributed by "),De=a(ao,"A",{href:!0,rel:!0});var qd=r(De);pt=l(qd,"valhalla"),qd.forEach(o),Jr=l(ao,". The original code can be found "),Ye=a(ao,"A",{href:!0,rel:!0});var Xd=r(Ye);gs=l(Xd,"here"),Xd.forEach(o),Er=l(ao,"."),ao.forEach(o),mt=h(t),ge=a(t,"H2",{class:!0});var wr=r(ge);go=a(wr,"A",{id:!0,class:!0,href:!0});var Ad=r(go);Xi=a(Ad,"SPAN",{});var Sd=r(Xi);v(_s.$$.fragment,Sd),Sd.forEach(o),Ad.forEach(o),Rp=h(wr),Ai=a(wr,"SPAN",{});var Dd=r(Ai);qp=l(Dd,"Resources"),Dd.forEach(o),wr.forEach(o),Qd=h(t),zr=a(t,"P",{});var Yd=r(zr);Xp=l(Yd,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with CLIP."),Yd.forEach(o),Od=h(t),_o=a(t,"UL",{});var Ir=r(_o);bs=a(Ir,"LI",{});var $r=r(bs);Ap=l($r,"A blog post on "),ys=a($r,"A",{href:!0,rel:!0});var Hd=r(ys);Sp=l(Hd,"How to fine-tune CLIP on 10,000 image-text pairs"),Hd.forEach(o),Dp=l($r,"."),$r.forEach(o),Yp=h(Ir),Ts=a(Ir,"LI",{});var Nc=r(Ts);Hp=l(Nc,"CLIP is supported by this "),vs=a(Nc,"A",{href:!0,rel:!0});var Kb=r(vs);Qp=l(Kb,"example script"),Kb.forEach(o),Op=l(Nc,"."),Nc.forEach(o),Ir.forEach(o),Kd=h(t),Ur=a(t,"P",{});var ey=r(Ur);Kp=l(ey,`If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it.
The resource should ideally demonstrate something new instead of duplicating an existing resource.`),ey.forEach(o),ec=h(t),ht=a(t,"H2",{class:!0});var Gc=r(ht);bo=a(Gc,"A",{id:!0,class:!0,href:!0});var ty=r(bo);Si=a(ty,"SPAN",{});var oy=r(Si);v(Ms.$$.fragment,oy),oy.forEach(o),ty.forEach(o),em=h(Gc),Di=a(Gc,"SPAN",{});var ny=r(Di);tm=l(ny,"CLIPConfig"),ny.forEach(o),Gc.forEach(o),tc=h(t),H=a(t,"DIV",{class:!0});var Qe=r(H);v(ws.$$.fragment,Qe),om=h(Qe),He=a(Qe,"P",{});var Pr=r(He);Fr=a(Pr,"A",{href:!0});var sy=r(Fr);nm=l(sy,"CLIPConfig"),sy.forEach(o),sm=l(Pr," is the configuration class to store the configuration of a "),Wr=a(Pr,"A",{href:!0});var ay=r(Wr);am=l(ay,"CLIPModel"),ay.forEach(o),rm=l(Pr,`. It is used to instantiate
a CLIP model according to the specified arguments, defining the text model and vision model configs. Instantiating
a configuration with the defaults will yield a similar configuration to that of the CLIP
`),Is=a(Pr,"A",{href:!0,rel:!0});var ry=r(Is);im=l(ry,"openai/clip-vit-base-patch32"),ry.forEach(o),lm=l(Pr," architecture."),Pr.forEach(o),dm=h(Qe),ft=a(Qe,"P",{});var wi=r(ft);cm=l(wi,"Configuration objects inherit from "),Vr=a(wi,"A",{href:!0});var iy=r(Vr);pm=l(iy,"PretrainedConfig"),iy.forEach(o),mm=l(wi,` and can be used to control the model outputs. Read the
documentation from `),Zr=a(wi,"A",{href:!0});var ly=r(Zr);hm=l(ly,"PretrainedConfig"),ly.forEach(o),fm=l(wi," for more information."),wi.forEach(o),um=h(Qe),v(yo.$$.fragment,Qe),gm=h(Qe),To=a(Qe,"DIV",{class:!0});var Rc=r(To);v($s.$$.fragment,Rc),_m=h(Rc),Ps=a(Rc,"P",{});var qc=r(Ps);bm=l(qc,"Instantiate a "),Br=a(qc,"A",{href:!0});var dy=r(Br);ym=l(dy,"CLIPConfig"),dy.forEach(o),Tm=l(qc,` (or a derived class) from clip text model configuration and clip vision model
configuration.`),qc.forEach(o),Rc.forEach(o),Qe.forEach(o),oc=h(t),ut=a(t,"H2",{class:!0});var Xc=r(ut);vo=a(Xc,"A",{id:!0,class:!0,href:!0});var cy=r(vo);Yi=a(cy,"SPAN",{});var py=r(Yi);v(Cs.$$.fragment,py),py.forEach(o),cy.forEach(o),vm=h(Xc),Hi=a(Xc,"SPAN",{});var my=r(Hi);Mm=l(my,"CLIPTextConfig"),my.forEach(o),Xc.forEach(o),nc=h(t),ie=a(t,"DIV",{class:!0});var Jn=r(ie);v(ks.$$.fragment,Jn),wm=h(Jn),gt=a(Jn,"P",{});var Ii=r(gt);Im=l(Ii,"This is the configuration class to store the configuration of a "),Nr=a(Ii,"A",{href:!0});var hy=r(Nr);$m=l(hy,"CLIPTextModel"),hy.forEach(o),Pm=l(Ii,`. It is used to instantiate a CLIP
text encoder according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the text encoder of the CLIP
`),xs=a(Ii,"A",{href:!0,rel:!0});var fy=r(xs);Cm=l(fy,"openai/clip-vit-base-patch32"),fy.forEach(o),km=l(Ii," architecture."),Ii.forEach(o),xm=h(Jn),_t=a(Jn,"P",{});var $i=r(_t);Lm=l($i,"Configuration objects inherit from "),Gr=a($i,"A",{href:!0});var uy=r(Gr);jm=l(uy,"PretrainedConfig"),uy.forEach(o),Jm=l($i,` and can be used to control the model outputs. Read the
documentation from `),Rr=a($i,"A",{href:!0});var gy=r(Rr);Em=l(gy,"PretrainedConfig"),gy.forEach(o),zm=l($i," for more information."),$i.forEach(o),Um=h(Jn),v(Mo.$$.fragment,Jn),Jn.forEach(o),sc=h(t),bt=a(t,"H2",{class:!0});var Ac=r(bt);wo=a(Ac,"A",{id:!0,class:!0,href:!0});var _y=r(wo);Qi=a(_y,"SPAN",{});var by=r(Qi);v(Ls.$$.fragment,by),by.forEach(o),_y.forEach(o),Fm=h(Ac),Oi=a(Ac,"SPAN",{});var yy=r(Oi);Wm=l(yy,"CLIPVisionConfig"),yy.forEach(o),Ac.forEach(o),ac=h(t),le=a(t,"DIV",{class:!0});var En=r(le);v(js.$$.fragment,En),Vm=h(En),yt=a(En,"P",{});var Pi=r(yt);Zm=l(Pi,"This is the configuration class to store the configuration of a "),qr=a(Pi,"A",{href:!0});var Ty=r(qr);Bm=l(Ty,"CLIPVisionModel"),Ty.forEach(o),Nm=l(Pi,`. It is used to instantiate a
CLIP vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder of the CLIP
`),Js=a(Pi,"A",{href:!0,rel:!0});var vy=r(Js);Gm=l(vy,"openai/clip-vit-base-patch32"),vy.forEach(o),Rm=l(Pi," architecture."),Pi.forEach(o),qm=h(En),Tt=a(En,"P",{});var Ci=r(Tt);Xm=l(Ci,"Configuration objects inherit from "),Xr=a(Ci,"A",{href:!0});var My=r(Xr);Am=l(My,"PretrainedConfig"),My.forEach(o),Sm=l(Ci,` and can be used to control the model outputs. Read the
documentation from `),Ar=a(Ci,"A",{href:!0});var wy=r(Ar);Dm=l(wy,"PretrainedConfig"),wy.forEach(o),Ym=l(Ci," for more information."),Ci.forEach(o),Hm=h(En),v(Io.$$.fragment,En),En.forEach(o),rc=h(t),vt=a(t,"H2",{class:!0});var Sc=r(vt);$o=a(Sc,"A",{id:!0,class:!0,href:!0});var Iy=r($o);Ki=a(Iy,"SPAN",{});var $y=r(Ki);v(Es.$$.fragment,$y),$y.forEach(o),Iy.forEach(o),Qm=h(Sc),el=a(Sc,"SPAN",{});var Py=r(el);Om=l(Py,"CLIPTokenizer"),Py.forEach(o),Sc.forEach(o),ic=h(t),Z=a(t,"DIV",{class:!0});var se=r(Z);v(zs.$$.fragment,se),Km=h(se),tl=a(se,"P",{});var Cy=r(tl);eh=l(Cy,"Construct a CLIP tokenizer. Based on byte-level Byte-Pair-Encoding."),Cy.forEach(o),th=h(se),Us=a(se,"P",{});var Dc=r(Us);oh=l(Dc,"This tokenizer inherits from "),Sr=a(Dc,"A",{href:!0});var ky=r(Sr);nh=l(ky,"PreTrainedTokenizer"),ky.forEach(o),sh=l(Dc,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dc.forEach(o),ah=h(se),_e=a(se,"DIV",{class:!0});var zn=r(_e);v(Fs.$$.fragment,zn),rh=h(zn),ol=a(zn,"P",{});var xy=r(ol);ih=l(xy,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`),xy.forEach(o),lh=h(zn),nl=a(zn,"UL",{});var Ly=r(nl);Dr=a(Ly,"LI",{});var Qb=r(Dr);dh=l(Qb,"single sequence: "),sl=a(Qb,"CODE",{});var jy=r(sl);ch=l(jy,"<|startoftext|> X <|endoftext|>"),jy.forEach(o),Qb.forEach(o),Ly.forEach(o),ph=h(zn),al=a(zn,"P",{});var Jy=r(al);mh=l(Jy,"Pairs of sequences are not the expected use case, but they will be handled without a separator."),Jy.forEach(o),zn.forEach(o),hh=h(se),Po=a(se,"DIV",{class:!0});var Yc=r(Po);v(Ws.$$.fragment,Yc),fh=h(Yc),Vs=a(Yc,"P",{});var Hc=r(Vs);uh=l(Hc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),rl=a(Hc,"CODE",{});var Ey=r(rl);gh=l(Ey,"prepare_for_model"),Ey.forEach(o),_h=l(Hc," method."),Hc.forEach(o),Yc.forEach(o),bh=h(se),Co=a(se,"DIV",{class:!0});var Qc=r(Co);v(Zs.$$.fragment,Qc),yh=h(Qc),il=a(Qc,"P",{});var zy=r(il);Th=l(zy,`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`),zy.forEach(o),Qc.forEach(o),vh=h(se),Yr=a(se,"DIV",{class:!0});var Uy=r(Yr);v(Bs.$$.fragment,Uy),Uy.forEach(o),se.forEach(o),lc=h(t),Mt=a(t,"H2",{class:!0});var Oc=r(Mt);ko=a(Oc,"A",{id:!0,class:!0,href:!0});var Fy=r(ko);ll=a(Fy,"SPAN",{});var Wy=r(ll);v(Ns.$$.fragment,Wy),Wy.forEach(o),Fy.forEach(o),Mh=h(Oc),dl=a(Oc,"SPAN",{});var Vy=r(dl);wh=l(Vy,"CLIPTokenizerFast"),Vy.forEach(o),Oc.forEach(o),dc=h(t),Q=a(t,"DIV",{class:!0});var Oe=r(Q);v(Gs.$$.fragment,Oe),Ih=h(Oe),Rs=a(Oe,"P",{});var Kc=r(Rs);$h=l(Kc,"Construct a \u201Cfast\u201D CLIP tokenizer (backed by HuggingFace\u2019s "),cl=a(Kc,"EM",{});var Zy=r(cl);Ph=l(Zy,"tokenizers"),Zy.forEach(o),Ch=l(Kc,` library). Based on byte-level
Byte-Pair-Encoding.`),Kc.forEach(o),kh=h(Oe),qs=a(Oe,"P",{});var ep=r(qs);xh=l(ep,"This tokenizer inherits from "),Hr=a(ep,"A",{href:!0});var By=r(Hr);Lh=l(By,"PreTrainedTokenizerFast"),By.forEach(o),jh=l(ep,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ep.forEach(o),Jh=h(Oe),be=a(Oe,"DIV",{class:!0});var Un=r(be);v(Xs.$$.fragment,Un),Eh=h(Un),pl=a(Un,"P",{});var Ny=r(pl);zh=l(Ny,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CLIP sequence has the following format:`),Ny.forEach(o),Uh=h(Un),ml=a(Un,"UL",{});var Gy=r(ml);Qr=a(Gy,"LI",{});var Ob=r(Qr);Fh=l(Ob,"single sequence: "),hl=a(Ob,"CODE",{});var Ry=r(hl);Wh=l(Ry,"<|startoftext|> X <|endoftext|>"),Ry.forEach(o),Ob.forEach(o),Gy.forEach(o),Vh=h(Un),fl=a(Un,"P",{});var qy=r(fl);Zh=l(qy,"Pairs of sequences are not the expected use case, but they will be handled without a separator."),qy.forEach(o),Un.forEach(o),Bh=h(Oe),xo=a(Oe,"DIV",{class:!0});var tp=r(xo);v(As.$$.fragment,tp),Nh=h(tp),ul=a(tp,"P",{});var Xy=r(ul);Gh=l(Xy,`Create a mask from the two sequences passed. CLIP does not make use of token type ids, therefore a list of
zeros is returned.`),Xy.forEach(o),tp.forEach(o),Oe.forEach(o),cc=h(t),wt=a(t,"H2",{class:!0});var op=r(wt);Lo=a(op,"A",{id:!0,class:!0,href:!0});var Ay=r(Lo);gl=a(Ay,"SPAN",{});var Sy=r(gl);v(Ss.$$.fragment,Sy),Sy.forEach(o),Ay.forEach(o),Rh=h(op),_l=a(op,"SPAN",{});var Dy=r(_l);qh=l(Dy,"CLIPImageProcessor"),Dy.forEach(o),op.forEach(o),pc=h(t),Be=a(t,"DIV",{class:!0});var ki=r(Be);v(Ds.$$.fragment,ki),Xh=h(ki),bl=a(ki,"P",{});var Yy=r(bl);Ah=l(Yy,"Constructs a CLIP image processor."),Yy.forEach(o),Sh=h(ki),jo=a(ki,"DIV",{class:!0});var np=r(jo);v(Ys.$$.fragment,np),Dh=h(np),yl=a(np,"P",{});var Hy=r(yl);Yh=l(Hy,"Preprocess an image or batch of images."),Hy.forEach(o),np.forEach(o),ki.forEach(o),mc=h(t),It=a(t,"H2",{class:!0});var sp=r(It);Jo=a(sp,"A",{id:!0,class:!0,href:!0});var Qy=r(Jo);Tl=a(Qy,"SPAN",{});var Oy=r(Tl);v(Hs.$$.fragment,Oy),Oy.forEach(o),Qy.forEach(o),Hh=h(sp),vl=a(sp,"SPAN",{});var Ky=r(vl);Qh=l(Ky,"CLIPFeatureExtractor"),Ky.forEach(o),sp.forEach(o),hc=h(t),Qs=a(t,"DIV",{class:!0});var eT=r(Qs);v(Os.$$.fragment,eT),eT.forEach(o),fc=h(t),$t=a(t,"H2",{class:!0});var ap=r($t);Eo=a(ap,"A",{id:!0,class:!0,href:!0});var tT=r(Eo);Ml=a(tT,"SPAN",{});var oT=r(Ml);v(Ks.$$.fragment,oT),oT.forEach(o),tT.forEach(o),Oh=h(ap),wl=a(ap,"SPAN",{});var nT=r(wl);Kh=l(nT,"CLIPProcessor"),nT.forEach(o),ap.forEach(o),uc=h(t),O=a(t,"DIV",{class:!0});var Ke=r(O);v(ea.$$.fragment,Ke),ef=h(Ke),Il=a(Ke,"P",{});var sT=r(Il);tf=l(sT,"Constructs a CLIP processor which wraps a CLIP image processor and a CLIP tokenizer into a single processor."),sT.forEach(o),of=h(Ke),ne=a(Ke,"P",{});var Ge=r(ne);Or=a(Ge,"A",{href:!0});var aT=r(Or);nf=l(aT,"CLIPProcessor"),aT.forEach(o),sf=l(Ge," offers all the functionalities of "),Kr=a(Ge,"A",{href:!0});var rT=r(Kr);af=l(rT,"CLIPImageProcessor"),rT.forEach(o),rf=l(Ge," and "),ei=a(Ge,"A",{href:!0});var iT=r(ei);lf=l(iT,"CLIPTokenizerFast"),iT.forEach(o),df=l(Ge,`. See the
`),$l=a(Ge,"CODE",{});var lT=r($l);cf=l(lT,"__call__()"),lT.forEach(o),pf=l(Ge," and "),ti=a(Ge,"A",{href:!0});var dT=r(ti);mf=l(dT,"decode()"),dT.forEach(o),hf=l(Ge," for more information."),Ge.forEach(o),ff=h(Ke),zo=a(Ke,"DIV",{class:!0});var rp=r(zo);v(ta.$$.fragment,rp),uf=h(rp),oa=a(rp,"P",{});var ip=r(oa);gf=l(ip,"This method forwards all its arguments to CLIPTokenizerFast\u2019s "),oi=a(ip,"A",{href:!0});var cT=r(oi);_f=l(cT,"batch_decode()"),cT.forEach(o),bf=l(ip,`. Please
refer to the docstring of this method for more information.`),ip.forEach(o),rp.forEach(o),yf=h(Ke),Uo=a(Ke,"DIV",{class:!0});var lp=r(Uo);v(na.$$.fragment,lp),Tf=h(lp),sa=a(lp,"P",{});var dp=r(sa);vf=l(dp,"This method forwards all its arguments to CLIPTokenizerFast\u2019s "),ni=a(dp,"A",{href:!0});var pT=r(ni);Mf=l(pT,"decode()"),pT.forEach(o),wf=l(dp,`. Please refer to
the docstring of this method for more information.`),dp.forEach(o),lp.forEach(o),Ke.forEach(o),gc=h(t),Pt=a(t,"H2",{class:!0});var cp=r(Pt);Fo=a(cp,"A",{id:!0,class:!0,href:!0});var mT=r(Fo);Pl=a(mT,"SPAN",{});var hT=r(Pl);v(aa.$$.fragment,hT),hT.forEach(o),mT.forEach(o),If=h(cp),Cl=a(cp,"SPAN",{});var fT=r(Cl);$f=l(fT,"CLIPModel"),fT.forEach(o),cp.forEach(o),_c=h(t),G=a(t,"DIV",{class:!0});var Ue=r(G);v(ra.$$.fragment,Ue),Pf=h(Ue),ia=a(Ue,"P",{});var pp=r(ia);Cf=l(pp,"This model inherits from "),si=a(pp,"A",{href:!0});var uT=r(si);kf=l(uT,"PreTrainedModel"),uT.forEach(o),xf=l(pp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pp.forEach(o),Lf=h(Ue),la=a(Ue,"P",{});var mp=r(la);jf=l(mp,"This model is also a PyTorch "),da=a(mp,"A",{href:!0,rel:!0});var gT=r(da);Jf=l(gT,"torch.nn.Module"),gT.forEach(o),Ef=l(mp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mp.forEach(o),zf=h(Ue),ye=a(Ue,"DIV",{class:!0});var Fn=r(ye);v(ca.$$.fragment,Fn),Uf=h(Fn),Ct=a(Fn,"P",{});var xi=r(Ct);Ff=l(xi,"The "),ai=a(xi,"A",{href:!0});var _T=r(ai);Wf=l(_T,"CLIPModel"),_T.forEach(o),Vf=l(xi," forward method, overrides the "),kl=a(xi,"CODE",{});var bT=r(kl);Zf=l(bT,"__call__"),bT.forEach(o),Bf=l(xi," special method."),xi.forEach(o),Nf=h(Fn),v(Wo.$$.fragment,Fn),Gf=h(Fn),v(Vo.$$.fragment,Fn),Fn.forEach(o),Rf=h(Ue),Te=a(Ue,"DIV",{class:!0});var Wn=r(Te);v(pa.$$.fragment,Wn),qf=h(Wn),kt=a(Wn,"P",{});var Li=r(kt);Xf=l(Li,"The "),ri=a(Li,"A",{href:!0});var yT=r(ri);Af=l(yT,"CLIPModel"),yT.forEach(o),Sf=l(Li," forward method, overrides the "),xl=a(Li,"CODE",{});var TT=r(xl);Df=l(TT,"__call__"),TT.forEach(o),Yf=l(Li," special method."),Li.forEach(o),Hf=h(Wn),v(Zo.$$.fragment,Wn),Qf=h(Wn),v(Bo.$$.fragment,Wn),Wn.forEach(o),Of=h(Ue),ve=a(Ue,"DIV",{class:!0});var Vn=r(ve);v(ma.$$.fragment,Vn),Kf=h(Vn),xt=a(Vn,"P",{});var ji=r(xt);eu=l(ji,"The "),ii=a(ji,"A",{href:!0});var vT=r(ii);tu=l(vT,"CLIPModel"),vT.forEach(o),ou=l(ji," forward method, overrides the "),Ll=a(ji,"CODE",{});var MT=r(Ll);nu=l(MT,"__call__"),MT.forEach(o),su=l(ji," special method."),ji.forEach(o),au=h(Vn),v(No.$$.fragment,Vn),ru=h(Vn),v(Go.$$.fragment,Vn),Vn.forEach(o),Ue.forEach(o),bc=h(t),Lt=a(t,"H2",{class:!0});var hp=r(Lt);Ro=a(hp,"A",{id:!0,class:!0,href:!0});var wT=r(Ro);jl=a(wT,"SPAN",{});var IT=r(jl);v(ha.$$.fragment,IT),IT.forEach(o),wT.forEach(o),iu=h(hp),Jl=a(hp,"SPAN",{});var $T=r(Jl);lu=l($T,"CLIPTextModel"),$T.forEach(o),hp.forEach(o),yc=h(t),de=a(t,"DIV",{class:!0});var Zn=r(de);v(fa.$$.fragment,Zn),du=h(Zn),ua=a(Zn,"P",{});var fp=r(ua);cu=l(fp,`The text model from CLIP without any head or projection on top.
This model inherits from `),li=a(fp,"A",{href:!0});var PT=r(li);pu=l(PT,"PreTrainedModel"),PT.forEach(o),mu=l(fp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fp.forEach(o),hu=h(Zn),ga=a(Zn,"P",{});var up=r(ga);fu=l(up,"This model is also a PyTorch "),_a=a(up,"A",{href:!0,rel:!0});var CT=r(_a);uu=l(CT,"torch.nn.Module"),CT.forEach(o),gu=l(up,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),up.forEach(o),_u=h(Zn),Me=a(Zn,"DIV",{class:!0});var Bn=r(Me);v(ba.$$.fragment,Bn),bu=h(Bn),jt=a(Bn,"P",{});var Ji=r(jt);yu=l(Ji,"The "),di=a(Ji,"A",{href:!0});var kT=r(di);Tu=l(kT,"CLIPTextModel"),kT.forEach(o),vu=l(Ji," forward method, overrides the "),El=a(Ji,"CODE",{});var xT=r(El);Mu=l(xT,"__call__"),xT.forEach(o),wu=l(Ji," special method."),Ji.forEach(o),Iu=h(Bn),v(qo.$$.fragment,Bn),$u=h(Bn),v(Xo.$$.fragment,Bn),Bn.forEach(o),Zn.forEach(o),Tc=h(t),Jt=a(t,"H2",{class:!0});var gp=r(Jt);Ao=a(gp,"A",{id:!0,class:!0,href:!0});var LT=r(Ao);zl=a(LT,"SPAN",{});var jT=r(zl);v(ya.$$.fragment,jT),jT.forEach(o),LT.forEach(o),Pu=h(gp),Ul=a(gp,"SPAN",{});var JT=r(Ul);Cu=l(JT,"CLIPTextModelWithProjection"),JT.forEach(o),gp.forEach(o),vc=h(t),K=a(t,"DIV",{class:!0});var et=r(K);v(Ta.$$.fragment,et),ku=h(et),Fl=a(et,"P",{});var ET=r(Fl);xu=l(ET,"CLIP Text Model with a projection layer on top (a linear layer on top of the pooled output)."),ET.forEach(o),Lu=h(et),va=a(et,"P",{});var _p=r(va);ju=l(_p,"This model inherits from "),ci=a(_p,"A",{href:!0});var zT=r(ci);Ju=l(zT,"PreTrainedModel"),zT.forEach(o),Eu=l(_p,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_p.forEach(o),zu=h(et),Ma=a(et,"P",{});var bp=r(Ma);Uu=l(bp,"This model is also a PyTorch "),wa=a(bp,"A",{href:!0,rel:!0});var UT=r(wa);Fu=l(UT,"torch.nn.Module"),UT.forEach(o),Wu=l(bp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bp.forEach(o),Vu=h(et),we=a(et,"DIV",{class:!0});var Nn=r(we);v(Ia.$$.fragment,Nn),Zu=h(Nn),Et=a(Nn,"P",{});var Ei=r(Et);Bu=l(Ei,"The "),pi=a(Ei,"A",{href:!0});var FT=r(pi);Nu=l(FT,"CLIPTextModelWithProjection"),FT.forEach(o),Gu=l(Ei," forward method, overrides the "),Wl=a(Ei,"CODE",{});var WT=r(Wl);Ru=l(WT,"__call__"),WT.forEach(o),qu=l(Ei," special method."),Ei.forEach(o),Xu=h(Nn),v(So.$$.fragment,Nn),Au=h(Nn),v(Do.$$.fragment,Nn),Nn.forEach(o),et.forEach(o),Mc=h(t),zt=a(t,"H2",{class:!0});var yp=r(zt);Yo=a(yp,"A",{id:!0,class:!0,href:!0});var VT=r(Yo);Vl=a(VT,"SPAN",{});var ZT=r(Vl);v($a.$$.fragment,ZT),ZT.forEach(o),VT.forEach(o),Su=h(yp),Zl=a(yp,"SPAN",{});var BT=r(Zl);Du=l(BT,"CLIPVisionModelWithProjection"),BT.forEach(o),yp.forEach(o),wc=h(t),ee=a(t,"DIV",{class:!0});var tt=r(ee);v(Pa.$$.fragment,tt),Yu=h(tt),Bl=a(tt,"P",{});var NT=r(Bl);Hu=l(NT,"CLIP Vision Model with a projection layer on top (a linear layer on top of the pooled output)."),NT.forEach(o),Qu=h(tt),Ca=a(tt,"P",{});var Tp=r(Ca);Ou=l(Tp,"This model inherits from "),mi=a(Tp,"A",{href:!0});var GT=r(mi);Ku=l(GT,"PreTrainedModel"),GT.forEach(o),eg=l(Tp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tp.forEach(o),tg=h(tt),ka=a(tt,"P",{});var vp=r(ka);og=l(vp,"This model is also a PyTorch "),xa=a(vp,"A",{href:!0,rel:!0});var RT=r(xa);ng=l(RT,"torch.nn.Module"),RT.forEach(o),sg=l(vp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vp.forEach(o),ag=h(tt),Ie=a(tt,"DIV",{class:!0});var Gn=r(Ie);v(La.$$.fragment,Gn),rg=h(Gn),Ut=a(Gn,"P",{});var zi=r(Ut);ig=l(zi,"The "),hi=a(zi,"A",{href:!0});var qT=r(hi);lg=l(qT,"CLIPVisionModelWithProjection"),qT.forEach(o),dg=l(zi," forward method, overrides the "),Nl=a(zi,"CODE",{});var XT=r(Nl);cg=l(XT,"__call__"),XT.forEach(o),pg=l(zi," special method."),zi.forEach(o),mg=h(Gn),v(Ho.$$.fragment,Gn),hg=h(Gn),v(Qo.$$.fragment,Gn),Gn.forEach(o),tt.forEach(o),Ic=h(t),Ft=a(t,"H2",{class:!0});var Mp=r(Ft);Oo=a(Mp,"A",{id:!0,class:!0,href:!0});var AT=r(Oo);Gl=a(AT,"SPAN",{});var ST=r(Gl);v(ja.$$.fragment,ST),ST.forEach(o),AT.forEach(o),fg=h(Mp),Rl=a(Mp,"SPAN",{});var DT=r(Rl);ug=l(DT,"CLIPVisionModel"),DT.forEach(o),Mp.forEach(o),$c=h(t),ce=a(t,"DIV",{class:!0});var Rn=r(ce);v(Ja.$$.fragment,Rn),gg=h(Rn),Ea=a(Rn,"P",{});var wp=r(Ea);_g=l(wp,`The vision model from CLIP without any head or projection on top.
This model inherits from `),fi=a(wp,"A",{href:!0});var YT=r(fi);bg=l(YT,"PreTrainedModel"),YT.forEach(o),yg=l(wp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),wp.forEach(o),Tg=h(Rn),za=a(Rn,"P",{});var Ip=r(za);vg=l(Ip,"This model is also a PyTorch "),Ua=a(Ip,"A",{href:!0,rel:!0});var HT=r(Ua);Mg=l(HT,"torch.nn.Module"),HT.forEach(o),wg=l(Ip,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ip.forEach(o),Ig=h(Rn),$e=a(Rn,"DIV",{class:!0});var qn=r($e);v(Fa.$$.fragment,qn),$g=h(qn),Wt=a(qn,"P",{});var Ui=r(Wt);Pg=l(Ui,"The "),ui=a(Ui,"A",{href:!0});var QT=r(ui);Cg=l(QT,"CLIPVisionModel"),QT.forEach(o),kg=l(Ui," forward method, overrides the "),ql=a(Ui,"CODE",{});var OT=r(ql);xg=l(OT,"__call__"),OT.forEach(o),Lg=l(Ui," special method."),Ui.forEach(o),jg=h(qn),v(Ko.$$.fragment,qn),Jg=h(qn),v(en.$$.fragment,qn),qn.forEach(o),Rn.forEach(o),Pc=h(t),Vt=a(t,"H2",{class:!0});var $p=r(Vt);tn=a($p,"A",{id:!0,class:!0,href:!0});var KT=r(tn);Xl=a(KT,"SPAN",{});var ev=r(Xl);v(Wa.$$.fragment,ev),ev.forEach(o),KT.forEach(o),Eg=h($p),Al=a($p,"SPAN",{});var tv=r(Al);zg=l(tv,"TFCLIPModel"),tv.forEach(o),$p.forEach(o),Cc=h(t),B=a(t,"DIV",{class:!0});var ae=r(B);v(Va.$$.fragment,ae),Ug=h(ae),Za=a(ae,"P",{});var Pp=r(Za);Fg=l(Pp,"This model inherits from "),gi=a(Pp,"A",{href:!0});var ov=r(gi);Wg=l(ov,"TFPreTrainedModel"),ov.forEach(o),Vg=l(Pp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pp.forEach(o),Zg=h(ae),Ba=a(ae,"P",{});var Cp=r(Ba);Bg=l(Cp,"This model is also a "),Na=a(Cp,"A",{href:!0,rel:!0});var nv=r(Na);Ng=l(nv,"tf.keras.Model"),nv.forEach(o),Gg=l(Cp,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Cp.forEach(o),Rg=h(ae),v(on.$$.fragment,ae),qg=h(ae),Pe=a(ae,"DIV",{class:!0});var Xn=r(Pe);v(Ga.$$.fragment,Xn),Xg=h(Xn),Zt=a(Xn,"P",{});var Fi=r(Zt);Ag=l(Fi,"The "),_i=a(Fi,"A",{href:!0});var sv=r(_i);Sg=l(sv,"TFCLIPModel"),sv.forEach(o),Dg=l(Fi," forward method, overrides the "),Sl=a(Fi,"CODE",{});var av=r(Sl);Yg=l(av,"__call__"),av.forEach(o),Hg=l(Fi," special method."),Fi.forEach(o),Qg=h(Xn),v(nn.$$.fragment,Xn),Og=h(Xn),v(sn.$$.fragment,Xn),Xn.forEach(o),Kg=h(ae),Ce=a(ae,"DIV",{class:!0});var An=r(Ce);v(Ra.$$.fragment,An),e_=h(An),Bt=a(An,"P",{});var Wi=r(Bt);t_=l(Wi,"The "),bi=a(Wi,"A",{href:!0});var rv=r(bi);o_=l(rv,"TFCLIPModel"),rv.forEach(o),n_=l(Wi," forward method, overrides the "),Dl=a(Wi,"CODE",{});var iv=r(Dl);s_=l(iv,"__call__"),iv.forEach(o),a_=l(Wi," special method."),Wi.forEach(o),r_=h(An),v(an.$$.fragment,An),i_=h(An),v(rn.$$.fragment,An),An.forEach(o),l_=h(ae),ke=a(ae,"DIV",{class:!0});var Sn=r(ke);v(qa.$$.fragment,Sn),d_=h(Sn),Nt=a(Sn,"P",{});var Vi=r(Nt);c_=l(Vi,"The "),yi=a(Vi,"A",{href:!0});var lv=r(yi);p_=l(lv,"TFCLIPModel"),lv.forEach(o),m_=l(Vi," forward method, overrides the "),Yl=a(Vi,"CODE",{});var dv=r(Yl);h_=l(dv,"__call__"),dv.forEach(o),f_=l(Vi," special method."),Vi.forEach(o),u_=h(Sn),v(ln.$$.fragment,Sn),g_=h(Sn),v(dn.$$.fragment,Sn),Sn.forEach(o),ae.forEach(o),kc=h(t),Gt=a(t,"H2",{class:!0});var kp=r(Gt);cn=a(kp,"A",{id:!0,class:!0,href:!0});var cv=r(cn);Hl=a(cv,"SPAN",{});var pv=r(Hl);v(Xa.$$.fragment,pv),pv.forEach(o),cv.forEach(o),__=h(kp),Ql=a(kp,"SPAN",{});var mv=r(Ql);b_=l(mv,"TFCLIPTextModel"),mv.forEach(o),kp.forEach(o),xc=h(t),Rt=a(t,"DIV",{class:!0});var xp=r(Rt);v(Aa.$$.fragment,xp),y_=h(xp),xe=a(xp,"DIV",{class:!0});var Dn=r(xe);v(Sa.$$.fragment,Dn),T_=h(Dn),qt=a(Dn,"P",{});var Zi=r(qt);v_=l(Zi,"The "),Ti=a(Zi,"A",{href:!0});var hv=r(Ti);M_=l(hv,"TFCLIPTextModel"),hv.forEach(o),w_=l(Zi," forward method, overrides the "),Ol=a(Zi,"CODE",{});var fv=r(Ol);I_=l(fv,"__call__"),fv.forEach(o),$_=l(Zi," special method."),Zi.forEach(o),P_=h(Dn),v(pn.$$.fragment,Dn),C_=h(Dn),v(mn.$$.fragment,Dn),Dn.forEach(o),xp.forEach(o),Lc=h(t),Xt=a(t,"H2",{class:!0});var Lp=r(Xt);hn=a(Lp,"A",{id:!0,class:!0,href:!0});var uv=r(hn);Kl=a(uv,"SPAN",{});var gv=r(Kl);v(Da.$$.fragment,gv),gv.forEach(o),uv.forEach(o),k_=h(Lp),ed=a(Lp,"SPAN",{});var _v=r(ed);x_=l(_v,"TFCLIPVisionModel"),_v.forEach(o),Lp.forEach(o),jc=h(t),At=a(t,"DIV",{class:!0});var jp=r(At);v(Ya.$$.fragment,jp),L_=h(jp),Le=a(jp,"DIV",{class:!0});var Yn=r(Le);v(Ha.$$.fragment,Yn),j_=h(Yn),St=a(Yn,"P",{});var Bi=r(St);J_=l(Bi,"The "),vi=a(Bi,"A",{href:!0});var bv=r(vi);E_=l(bv,"TFCLIPVisionModel"),bv.forEach(o),z_=l(Bi," forward method, overrides the "),td=a(Bi,"CODE",{});var yv=r(td);U_=l(yv,"__call__"),yv.forEach(o),F_=l(Bi," special method."),Bi.forEach(o),W_=h(Yn),v(fn.$$.fragment,Yn),V_=h(Yn),v(un.$$.fragment,Yn),Yn.forEach(o),jp.forEach(o),Jc=h(t),Dt=a(t,"H2",{class:!0});var Jp=r(Dt);gn=a(Jp,"A",{id:!0,class:!0,href:!0});var Tv=r(gn);od=a(Tv,"SPAN",{});var vv=r(od);v(Qa.$$.fragment,vv),vv.forEach(o),Tv.forEach(o),Z_=h(Jp),nd=a(Jp,"SPAN",{});var Mv=r(nd);B_=l(Mv,"FlaxCLIPModel"),Mv.forEach(o),Jp.forEach(o),Ec=h(t),U=a(t,"DIV",{class:!0});var S=r(U);v(Oa.$$.fragment,S),N_=h(S),Ka=a(S,"P",{});var Ep=r(Ka);G_=l(Ep,"This model inherits from "),Mi=a(Ep,"A",{href:!0});var wv=r(Mi);R_=l(wv,"FlaxPreTrainedModel"),wv.forEach(o),q_=l(Ep,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ep.forEach(o),X_=h(S),er=a(S,"P",{});var zp=r(er);A_=l(zp,"This model is also a Flax Linen "),tr=a(zp,"A",{href:!0,rel:!0});var Iv=r(tr);S_=l(Iv,"flax.linen.Module"),Iv.forEach(o),D_=l(zp,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zp.forEach(o),Y_=h(S),sd=a(S,"P",{});var $v=r(sd);H_=l($v,"Finally, this model supports inherent JAX features such as:"),$v.forEach(o),Q_=h(S),Ne=a(S,"UL",{});var Hn=r(Ne);ad=a(Hn,"LI",{});var Pv=r(ad);or=a(Pv,"A",{href:!0,rel:!0});var Cv=r(or);O_=l(Cv,"Just-In-Time (JIT) compilation"),Cv.forEach(o),Pv.forEach(o),K_=h(Hn),rd=a(Hn,"LI",{});var kv=r(rd);nr=a(kv,"A",{href:!0,rel:!0});var xv=r(nr);eb=l(xv,"Automatic Differentiation"),xv.forEach(o),kv.forEach(o),tb=h(Hn),id=a(Hn,"LI",{});var Lv=r(id);sr=a(Lv,"A",{href:!0,rel:!0});var jv=r(sr);ob=l(jv,"Vectorization"),jv.forEach(o),Lv.forEach(o),nb=h(Hn),ld=a(Hn,"LI",{});var Jv=r(ld);ar=a(Jv,"A",{href:!0,rel:!0});var Ev=r(ar);sb=l(Ev,"Parallelization"),Ev.forEach(o),Jv.forEach(o),Hn.forEach(o),ab=h(S),je=a(S,"DIV",{class:!0});var Qn=r(je);v(rr.$$.fragment,Qn),rb=h(Qn),Yt=a(Qn,"P",{});var Ni=r(Yt);ib=l(Ni,"The "),dd=a(Ni,"CODE",{});var zv=r(dd);lb=l(zv,"FlaxCLIPPreTrainedModel"),zv.forEach(o),db=l(Ni," forward method, overrides the "),cd=a(Ni,"CODE",{});var Uv=r(cd);cb=l(Uv,"__call__"),Uv.forEach(o),pb=l(Ni," special method."),Ni.forEach(o),mb=h(Qn),v(_n.$$.fragment,Qn),hb=h(Qn),v(bn.$$.fragment,Qn),Qn.forEach(o),fb=h(S),yn=a(S,"DIV",{class:!0});var Up=r(yn);v(ir.$$.fragment,Up),ub=h(Up),v(Tn.$$.fragment,Up),Up.forEach(o),gb=h(S),vn=a(S,"DIV",{class:!0});var Fp=r(vn);v(lr.$$.fragment,Fp),_b=h(Fp),v(Mn.$$.fragment,Fp),Fp.forEach(o),S.forEach(o),zc=h(t),Ht=a(t,"H2",{class:!0});var Wp=r(Ht);wn=a(Wp,"A",{id:!0,class:!0,href:!0});var Fv=r(wn);pd=a(Fv,"SPAN",{});var Wv=r(pd);v(dr.$$.fragment,Wv),Wv.forEach(o),Fv.forEach(o),bb=h(Wp),md=a(Wp,"SPAN",{});var Vv=r(md);yb=l(Vv,"FlaxCLIPTextModel"),Vv.forEach(o),Wp.forEach(o),Uc=h(t),Qt=a(t,"DIV",{class:!0});var Vp=r(Qt);v(cr.$$.fragment,Vp),Tb=h(Vp),Je=a(Vp,"DIV",{class:!0});var On=r(Je);v(pr.$$.fragment,On),vb=h(On),Ot=a(On,"P",{});var Gi=r(Ot);Mb=l(Gi,"The "),hd=a(Gi,"CODE",{});var Zv=r(hd);wb=l(Zv,"FlaxCLIPTextPreTrainedModel"),Zv.forEach(o),Ib=l(Gi," forward method, overrides the "),fd=a(Gi,"CODE",{});var Bv=r(fd);$b=l(Bv,"__call__"),Bv.forEach(o),Pb=l(Gi," special method."),Gi.forEach(o),Cb=h(On),v(In.$$.fragment,On),kb=h(On),v($n.$$.fragment,On),On.forEach(o),Vp.forEach(o),Fc=h(t),Kt=a(t,"H2",{class:!0});var Zp=r(Kt);Pn=a(Zp,"A",{id:!0,class:!0,href:!0});var Nv=r(Pn);ud=a(Nv,"SPAN",{});var Gv=r(ud);v(mr.$$.fragment,Gv),Gv.forEach(o),Nv.forEach(o),xb=h(Zp),gd=a(Zp,"SPAN",{});var Rv=r(gd);Lb=l(Rv,"FlaxCLIPTextModelWithProjection"),Rv.forEach(o),Zp.forEach(o),Wc=h(t),eo=a(t,"DIV",{class:!0});var Bp=r(eo);v(hr.$$.fragment,Bp),jb=h(Bp),Ee=a(Bp,"DIV",{class:!0});var Kn=r(Ee);v(fr.$$.fragment,Kn),Jb=h(Kn),to=a(Kn,"P",{});var Ri=r(to);Eb=l(Ri,"The "),_d=a(Ri,"CODE",{});var qv=r(_d);zb=l(qv,"FlaxCLIPTextPreTrainedModel"),qv.forEach(o),Ub=l(Ri," forward method, overrides the "),bd=a(Ri,"CODE",{});var Xv=r(bd);Fb=l(Xv,"__call__"),Xv.forEach(o),Wb=l(Ri," special method."),Ri.forEach(o),Vb=h(Kn),v(Cn.$$.fragment,Kn),Zb=h(Kn),v(kn.$$.fragment,Kn),Kn.forEach(o),Bp.forEach(o),Vc=h(t),oo=a(t,"H2",{class:!0});var Np=r(oo);xn=a(Np,"A",{id:!0,class:!0,href:!0});var Av=r(xn);yd=a(Av,"SPAN",{});var Sv=r(yd);v(ur.$$.fragment,Sv),Sv.forEach(o),Av.forEach(o),Bb=h(Np),Td=a(Np,"SPAN",{});var Dv=r(Td);Nb=l(Dv,"FlaxCLIPVisionModel"),Dv.forEach(o),Np.forEach(o),Zc=h(t),no=a(t,"DIV",{class:!0});var Gp=r(no);v(gr.$$.fragment,Gp),Gb=h(Gp),ze=a(Gp,"DIV",{class:!0});var es=r(ze);v(_r.$$.fragment,es),Rb=h(es),so=a(es,"P",{});var qi=r(so);qb=l(qi,"The "),vd=a(qi,"CODE",{});var Yv=r(vd);Xb=l(Yv,"FlaxCLIPVisionPreTrainedModel"),Yv.forEach(o),Ab=l(qi," forward method, overrides the "),Md=a(qi,"CODE",{});var Hv=r(Md);Sb=l(Hv,"__call__"),Hv.forEach(o),Db=l(qi," special method."),qi.forEach(o),Yb=h(es),v(Ln.$$.fragment,es),Hb=h(es),v(jn.$$.fragment,es),es.forEach(o),Gp.forEach(o),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(NM)),f(p,"id","clip"),f(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(p,"href","#clip"),f(u,"class","relative group"),f(pe,"id","overview"),f(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(pe,"href","#overview"),f(D,"class","relative group"),f(We,"href","https://arxiv.org/abs/2103.00020"),f(We,"rel","nofollow"),f(N,"id","usage"),f(N,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(N,"href","#usage"),f(V,"class","relative group"),f(Xe,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),f(ue,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer"),f(Y,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPProcessor"),f(Ae,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),f(z,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer"),f(dt,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPProcessor"),f(ct,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel"),f(De,"href","https://huggingface.co/valhalla"),f(De,"rel","nofollow"),f(Ye,"href","https://github.com/openai/CLIP"),f(Ye,"rel","nofollow"),f(go,"id","resources"),f(go,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(go,"href","#resources"),f(ge,"class","relative group"),f(ys,"href","https://huggingface.co/blog/fine-tune-clip-rsicd"),f(ys,"rel","nofollow"),f(vs,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/contrastive-image-text"),f(vs,"rel","nofollow"),f(bo,"id","transformers.CLIPConfig"),f(bo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(bo,"href","#transformers.CLIPConfig"),f(ht,"class","relative group"),f(Fr,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig"),f(Wr,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel"),f(Is,"href","https://huggingface.co/openai/clip-vit-base-patch32"),f(Is,"rel","nofollow"),f(Vr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Zr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Br,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPConfig"),f(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vo,"id","transformers.CLIPTextConfig"),f(vo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(vo,"href","#transformers.CLIPTextConfig"),f(ut,"class","relative group"),f(Nr,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel"),f(xs,"href","https://huggingface.co/openai/clip-vit-base-patch32"),f(xs,"rel","nofollow"),f(Gr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Rr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wo,"id","transformers.CLIPVisionConfig"),f(wo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(wo,"href","#transformers.CLIPVisionConfig"),f(bt,"class","relative group"),f(qr,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel"),f(Js,"href","https://huggingface.co/openai/clip-vit-base-patch32"),f(Js,"rel","nofollow"),f(Xr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Ar,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($o,"id","transformers.CLIPTokenizer"),f($o,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f($o,"href","#transformers.CLIPTokenizer"),f(vt,"class","relative group"),f(Sr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ko,"id","transformers.CLIPTokenizerFast"),f(ko,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ko,"href","#transformers.CLIPTokenizerFast"),f(Mt,"class","relative group"),f(Hr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Lo,"id","transformers.CLIPImageProcessor"),f(Lo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Lo,"href","#transformers.CLIPImageProcessor"),f(wt,"class","relative group"),f(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Jo,"id","transformers.CLIPFeatureExtractor"),f(Jo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Jo,"href","#transformers.CLIPFeatureExtractor"),f(It,"class","relative group"),f(Qs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Eo,"id","transformers.CLIPProcessor"),f(Eo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Eo,"href","#transformers.CLIPProcessor"),f($t,"class","relative group"),f(Or,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPProcessor"),f(Kr,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),f(ei,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizerFast"),f(ti,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPProcessor.decode"),f(oi,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),f(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ni,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),f(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Fo,"id","transformers.CLIPModel"),f(Fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Fo,"href","#transformers.CLIPModel"),f(Pt,"class","relative group"),f(si,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(da,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(da,"rel","nofollow"),f(ai,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel"),f(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ri,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel"),f(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ii,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPModel"),f(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ro,"id","transformers.CLIPTextModel"),f(Ro,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ro,"href","#transformers.CLIPTextModel"),f(Lt,"class","relative group"),f(li,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(_a,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(_a,"rel","nofollow"),f(di,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel"),f(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ao,"id","transformers.CLIPTextModelWithProjection"),f(Ao,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ao,"href","#transformers.CLIPTextModelWithProjection"),f(Jt,"class","relative group"),f(ci,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(wa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(wa,"rel","nofollow"),f(pi,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModelWithProjection"),f(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yo,"id","transformers.CLIPVisionModelWithProjection"),f(Yo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Yo,"href","#transformers.CLIPVisionModelWithProjection"),f(zt,"class","relative group"),f(mi,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(xa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(xa,"rel","nofollow"),f(hi,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModelWithProjection"),f(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Oo,"id","transformers.CLIPVisionModel"),f(Oo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Oo,"href","#transformers.CLIPVisionModel"),f(Ft,"class","relative group"),f(fi,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(Ua,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ua,"rel","nofollow"),f(ui,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel"),f($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tn,"id","transformers.TFCLIPModel"),f(tn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(tn,"href","#transformers.TFCLIPModel"),f(Vt,"class","relative group"),f(gi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(Na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Na,"rel","nofollow"),f(_i,"href","/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPModel"),f(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(bi,"href","/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPModel"),f(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(yi,"href","/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPModel"),f(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(cn,"id","transformers.TFCLIPTextModel"),f(cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(cn,"href","#transformers.TFCLIPTextModel"),f(Gt,"class","relative group"),f(Ti,"href","/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPTextModel"),f(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(hn,"id","transformers.TFCLIPVisionModel"),f(hn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(hn,"href","#transformers.TFCLIPVisionModel"),f(Xt,"class","relative group"),f(vi,"href","/docs/transformers/main/en/model_doc/clip#transformers.TFCLIPVisionModel"),f(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gn,"id","transformers.FlaxCLIPModel"),f(gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(gn,"href","#transformers.FlaxCLIPModel"),f(Dt,"class","relative group"),f(Mi,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),f(tr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),f(tr,"rel","nofollow"),f(or,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),f(or,"rel","nofollow"),f(nr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),f(nr,"rel","nofollow"),f(sr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),f(sr,"rel","nofollow"),f(ar,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),f(ar,"rel","nofollow"),f(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wn,"id","transformers.FlaxCLIPTextModel"),f(wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(wn,"href","#transformers.FlaxCLIPTextModel"),f(Ht,"class","relative group"),f(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Pn,"id","transformers.FlaxCLIPTextModelWithProjection"),f(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Pn,"href","#transformers.FlaxCLIPTextModelWithProjection"),f(Kt,"class","relative group"),f(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xn,"id","transformers.FlaxCLIPVisionModel"),f(xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(xn,"href","#transformers.FlaxCLIPVisionModel"),f(oo,"class","relative group"),f(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),b(t,y,g),b(t,u,g),e(u,p),e(p,_),M(n,_,null),e(u,c),e(u,C),e(C,ts),b(t,ro,g),b(t,D,g),e(D,pe),e(pe,Re),M(j,Re,null),e(D,os),e(D,Fe),e(Fe,ns),b(t,io,g),b(t,te,g),e(te,ss),e(te,We),e(We,ot),e(te,as),b(t,lo,g),b(t,me,g),e(me,rs),b(t,co,g),b(t,he,g),e(he,nt),e(nt,is),b(t,st,g),b(t,V,g),e(V,N),e(N,at),M(re,at,null),e(V,ls),e(V,rt),e(rt,it),b(t,po,g),b(t,qe,g),e(qe,fe),b(t,mo,g),b(t,oe,g),e(oe,ds),e(oe,Xe),e(Xe,lt),e(oe,cs),b(t,ho,g),b(t,L,g),e(L,ps),e(L,ue),e(ue,ms),e(L,fo),e(L,Y),e(Y,hs),e(L,Ve),e(L,Ae),e(Ae,fs),e(L,x),e(L,z),e(z,Cr),e(L,uo),e(L,dt),e(dt,kr),e(L,X),e(L,ct),e(ct,xr),e(L,Lr),b(t,us,g),M(Se,t,g),b(t,Ze,g),b(t,A,g),e(A,jr),e(A,De),e(De,pt),e(A,Jr),e(A,Ye),e(Ye,gs),e(A,Er),b(t,mt,g),b(t,ge,g),e(ge,go),e(go,Xi),M(_s,Xi,null),e(ge,Rp),e(ge,Ai),e(Ai,qp),b(t,Qd,g),b(t,zr,g),e(zr,Xp),b(t,Od,g),b(t,_o,g),e(_o,bs),e(bs,Ap),e(bs,ys),e(ys,Sp),e(bs,Dp),e(_o,Yp),e(_o,Ts),e(Ts,Hp),e(Ts,vs),e(vs,Qp),e(Ts,Op),b(t,Kd,g),b(t,Ur,g),e(Ur,Kp),b(t,ec,g),b(t,ht,g),e(ht,bo),e(bo,Si),M(Ms,Si,null),e(ht,em),e(ht,Di),e(Di,tm),b(t,tc,g),b(t,H,g),M(ws,H,null),e(H,om),e(H,He),e(He,Fr),e(Fr,nm),e(He,sm),e(He,Wr),e(Wr,am),e(He,rm),e(He,Is),e(Is,im),e(He,lm),e(H,dm),e(H,ft),e(ft,cm),e(ft,Vr),e(Vr,pm),e(ft,mm),e(ft,Zr),e(Zr,hm),e(ft,fm),e(H,um),M(yo,H,null),e(H,gm),e(H,To),M($s,To,null),e(To,_m),e(To,Ps),e(Ps,bm),e(Ps,Br),e(Br,ym),e(Ps,Tm),b(t,oc,g),b(t,ut,g),e(ut,vo),e(vo,Yi),M(Cs,Yi,null),e(ut,vm),e(ut,Hi),e(Hi,Mm),b(t,nc,g),b(t,ie,g),M(ks,ie,null),e(ie,wm),e(ie,gt),e(gt,Im),e(gt,Nr),e(Nr,$m),e(gt,Pm),e(gt,xs),e(xs,Cm),e(gt,km),e(ie,xm),e(ie,_t),e(_t,Lm),e(_t,Gr),e(Gr,jm),e(_t,Jm),e(_t,Rr),e(Rr,Em),e(_t,zm),e(ie,Um),M(Mo,ie,null),b(t,sc,g),b(t,bt,g),e(bt,wo),e(wo,Qi),M(Ls,Qi,null),e(bt,Fm),e(bt,Oi),e(Oi,Wm),b(t,ac,g),b(t,le,g),M(js,le,null),e(le,Vm),e(le,yt),e(yt,Zm),e(yt,qr),e(qr,Bm),e(yt,Nm),e(yt,Js),e(Js,Gm),e(yt,Rm),e(le,qm),e(le,Tt),e(Tt,Xm),e(Tt,Xr),e(Xr,Am),e(Tt,Sm),e(Tt,Ar),e(Ar,Dm),e(Tt,Ym),e(le,Hm),M(Io,le,null),b(t,rc,g),b(t,vt,g),e(vt,$o),e($o,Ki),M(Es,Ki,null),e(vt,Qm),e(vt,el),e(el,Om),b(t,ic,g),b(t,Z,g),M(zs,Z,null),e(Z,Km),e(Z,tl),e(tl,eh),e(Z,th),e(Z,Us),e(Us,oh),e(Us,Sr),e(Sr,nh),e(Us,sh),e(Z,ah),e(Z,_e),M(Fs,_e,null),e(_e,rh),e(_e,ol),e(ol,ih),e(_e,lh),e(_e,nl),e(nl,Dr),e(Dr,dh),e(Dr,sl),e(sl,ch),e(_e,ph),e(_e,al),e(al,mh),e(Z,hh),e(Z,Po),M(Ws,Po,null),e(Po,fh),e(Po,Vs),e(Vs,uh),e(Vs,rl),e(rl,gh),e(Vs,_h),e(Z,bh),e(Z,Co),M(Zs,Co,null),e(Co,yh),e(Co,il),e(il,Th),e(Z,vh),e(Z,Yr),M(Bs,Yr,null),b(t,lc,g),b(t,Mt,g),e(Mt,ko),e(ko,ll),M(Ns,ll,null),e(Mt,Mh),e(Mt,dl),e(dl,wh),b(t,dc,g),b(t,Q,g),M(Gs,Q,null),e(Q,Ih),e(Q,Rs),e(Rs,$h),e(Rs,cl),e(cl,Ph),e(Rs,Ch),e(Q,kh),e(Q,qs),e(qs,xh),e(qs,Hr),e(Hr,Lh),e(qs,jh),e(Q,Jh),e(Q,be),M(Xs,be,null),e(be,Eh),e(be,pl),e(pl,zh),e(be,Uh),e(be,ml),e(ml,Qr),e(Qr,Fh),e(Qr,hl),e(hl,Wh),e(be,Vh),e(be,fl),e(fl,Zh),e(Q,Bh),e(Q,xo),M(As,xo,null),e(xo,Nh),e(xo,ul),e(ul,Gh),b(t,cc,g),b(t,wt,g),e(wt,Lo),e(Lo,gl),M(Ss,gl,null),e(wt,Rh),e(wt,_l),e(_l,qh),b(t,pc,g),b(t,Be,g),M(Ds,Be,null),e(Be,Xh),e(Be,bl),e(bl,Ah),e(Be,Sh),e(Be,jo),M(Ys,jo,null),e(jo,Dh),e(jo,yl),e(yl,Yh),b(t,mc,g),b(t,It,g),e(It,Jo),e(Jo,Tl),M(Hs,Tl,null),e(It,Hh),e(It,vl),e(vl,Qh),b(t,hc,g),b(t,Qs,g),M(Os,Qs,null),b(t,fc,g),b(t,$t,g),e($t,Eo),e(Eo,Ml),M(Ks,Ml,null),e($t,Oh),e($t,wl),e(wl,Kh),b(t,uc,g),b(t,O,g),M(ea,O,null),e(O,ef),e(O,Il),e(Il,tf),e(O,of),e(O,ne),e(ne,Or),e(Or,nf),e(ne,sf),e(ne,Kr),e(Kr,af),e(ne,rf),e(ne,ei),e(ei,lf),e(ne,df),e(ne,$l),e($l,cf),e(ne,pf),e(ne,ti),e(ti,mf),e(ne,hf),e(O,ff),e(O,zo),M(ta,zo,null),e(zo,uf),e(zo,oa),e(oa,gf),e(oa,oi),e(oi,_f),e(oa,bf),e(O,yf),e(O,Uo),M(na,Uo,null),e(Uo,Tf),e(Uo,sa),e(sa,vf),e(sa,ni),e(ni,Mf),e(sa,wf),b(t,gc,g),b(t,Pt,g),e(Pt,Fo),e(Fo,Pl),M(aa,Pl,null),e(Pt,If),e(Pt,Cl),e(Cl,$f),b(t,_c,g),b(t,G,g),M(ra,G,null),e(G,Pf),e(G,ia),e(ia,Cf),e(ia,si),e(si,kf),e(ia,xf),e(G,Lf),e(G,la),e(la,jf),e(la,da),e(da,Jf),e(la,Ef),e(G,zf),e(G,ye),M(ca,ye,null),e(ye,Uf),e(ye,Ct),e(Ct,Ff),e(Ct,ai),e(ai,Wf),e(Ct,Vf),e(Ct,kl),e(kl,Zf),e(Ct,Bf),e(ye,Nf),M(Wo,ye,null),e(ye,Gf),M(Vo,ye,null),e(G,Rf),e(G,Te),M(pa,Te,null),e(Te,qf),e(Te,kt),e(kt,Xf),e(kt,ri),e(ri,Af),e(kt,Sf),e(kt,xl),e(xl,Df),e(kt,Yf),e(Te,Hf),M(Zo,Te,null),e(Te,Qf),M(Bo,Te,null),e(G,Of),e(G,ve),M(ma,ve,null),e(ve,Kf),e(ve,xt),e(xt,eu),e(xt,ii),e(ii,tu),e(xt,ou),e(xt,Ll),e(Ll,nu),e(xt,su),e(ve,au),M(No,ve,null),e(ve,ru),M(Go,ve,null),b(t,bc,g),b(t,Lt,g),e(Lt,Ro),e(Ro,jl),M(ha,jl,null),e(Lt,iu),e(Lt,Jl),e(Jl,lu),b(t,yc,g),b(t,de,g),M(fa,de,null),e(de,du),e(de,ua),e(ua,cu),e(ua,li),e(li,pu),e(ua,mu),e(de,hu),e(de,ga),e(ga,fu),e(ga,_a),e(_a,uu),e(ga,gu),e(de,_u),e(de,Me),M(ba,Me,null),e(Me,bu),e(Me,jt),e(jt,yu),e(jt,di),e(di,Tu),e(jt,vu),e(jt,El),e(El,Mu),e(jt,wu),e(Me,Iu),M(qo,Me,null),e(Me,$u),M(Xo,Me,null),b(t,Tc,g),b(t,Jt,g),e(Jt,Ao),e(Ao,zl),M(ya,zl,null),e(Jt,Pu),e(Jt,Ul),e(Ul,Cu),b(t,vc,g),b(t,K,g),M(Ta,K,null),e(K,ku),e(K,Fl),e(Fl,xu),e(K,Lu),e(K,va),e(va,ju),e(va,ci),e(ci,Ju),e(va,Eu),e(K,zu),e(K,Ma),e(Ma,Uu),e(Ma,wa),e(wa,Fu),e(Ma,Wu),e(K,Vu),e(K,we),M(Ia,we,null),e(we,Zu),e(we,Et),e(Et,Bu),e(Et,pi),e(pi,Nu),e(Et,Gu),e(Et,Wl),e(Wl,Ru),e(Et,qu),e(we,Xu),M(So,we,null),e(we,Au),M(Do,we,null),b(t,Mc,g),b(t,zt,g),e(zt,Yo),e(Yo,Vl),M($a,Vl,null),e(zt,Su),e(zt,Zl),e(Zl,Du),b(t,wc,g),b(t,ee,g),M(Pa,ee,null),e(ee,Yu),e(ee,Bl),e(Bl,Hu),e(ee,Qu),e(ee,Ca),e(Ca,Ou),e(Ca,mi),e(mi,Ku),e(Ca,eg),e(ee,tg),e(ee,ka),e(ka,og),e(ka,xa),e(xa,ng),e(ka,sg),e(ee,ag),e(ee,Ie),M(La,Ie,null),e(Ie,rg),e(Ie,Ut),e(Ut,ig),e(Ut,hi),e(hi,lg),e(Ut,dg),e(Ut,Nl),e(Nl,cg),e(Ut,pg),e(Ie,mg),M(Ho,Ie,null),e(Ie,hg),M(Qo,Ie,null),b(t,Ic,g),b(t,Ft,g),e(Ft,Oo),e(Oo,Gl),M(ja,Gl,null),e(Ft,fg),e(Ft,Rl),e(Rl,ug),b(t,$c,g),b(t,ce,g),M(Ja,ce,null),e(ce,gg),e(ce,Ea),e(Ea,_g),e(Ea,fi),e(fi,bg),e(Ea,yg),e(ce,Tg),e(ce,za),e(za,vg),e(za,Ua),e(Ua,Mg),e(za,wg),e(ce,Ig),e(ce,$e),M(Fa,$e,null),e($e,$g),e($e,Wt),e(Wt,Pg),e(Wt,ui),e(ui,Cg),e(Wt,kg),e(Wt,ql),e(ql,xg),e(Wt,Lg),e($e,jg),M(Ko,$e,null),e($e,Jg),M(en,$e,null),b(t,Pc,g),b(t,Vt,g),e(Vt,tn),e(tn,Xl),M(Wa,Xl,null),e(Vt,Eg),e(Vt,Al),e(Al,zg),b(t,Cc,g),b(t,B,g),M(Va,B,null),e(B,Ug),e(B,Za),e(Za,Fg),e(Za,gi),e(gi,Wg),e(Za,Vg),e(B,Zg),e(B,Ba),e(Ba,Bg),e(Ba,Na),e(Na,Ng),e(Ba,Gg),e(B,Rg),M(on,B,null),e(B,qg),e(B,Pe),M(Ga,Pe,null),e(Pe,Xg),e(Pe,Zt),e(Zt,Ag),e(Zt,_i),e(_i,Sg),e(Zt,Dg),e(Zt,Sl),e(Sl,Yg),e(Zt,Hg),e(Pe,Qg),M(nn,Pe,null),e(Pe,Og),M(sn,Pe,null),e(B,Kg),e(B,Ce),M(Ra,Ce,null),e(Ce,e_),e(Ce,Bt),e(Bt,t_),e(Bt,bi),e(bi,o_),e(Bt,n_),e(Bt,Dl),e(Dl,s_),e(Bt,a_),e(Ce,r_),M(an,Ce,null),e(Ce,i_),M(rn,Ce,null),e(B,l_),e(B,ke),M(qa,ke,null),e(ke,d_),e(ke,Nt),e(Nt,c_),e(Nt,yi),e(yi,p_),e(Nt,m_),e(Nt,Yl),e(Yl,h_),e(Nt,f_),e(ke,u_),M(ln,ke,null),e(ke,g_),M(dn,ke,null),b(t,kc,g),b(t,Gt,g),e(Gt,cn),e(cn,Hl),M(Xa,Hl,null),e(Gt,__),e(Gt,Ql),e(Ql,b_),b(t,xc,g),b(t,Rt,g),M(Aa,Rt,null),e(Rt,y_),e(Rt,xe),M(Sa,xe,null),e(xe,T_),e(xe,qt),e(qt,v_),e(qt,Ti),e(Ti,M_),e(qt,w_),e(qt,Ol),e(Ol,I_),e(qt,$_),e(xe,P_),M(pn,xe,null),e(xe,C_),M(mn,xe,null),b(t,Lc,g),b(t,Xt,g),e(Xt,hn),e(hn,Kl),M(Da,Kl,null),e(Xt,k_),e(Xt,ed),e(ed,x_),b(t,jc,g),b(t,At,g),M(Ya,At,null),e(At,L_),e(At,Le),M(Ha,Le,null),e(Le,j_),e(Le,St),e(St,J_),e(St,vi),e(vi,E_),e(St,z_),e(St,td),e(td,U_),e(St,F_),e(Le,W_),M(fn,Le,null),e(Le,V_),M(un,Le,null),b(t,Jc,g),b(t,Dt,g),e(Dt,gn),e(gn,od),M(Qa,od,null),e(Dt,Z_),e(Dt,nd),e(nd,B_),b(t,Ec,g),b(t,U,g),M(Oa,U,null),e(U,N_),e(U,Ka),e(Ka,G_),e(Ka,Mi),e(Mi,R_),e(Ka,q_),e(U,X_),e(U,er),e(er,A_),e(er,tr),e(tr,S_),e(er,D_),e(U,Y_),e(U,sd),e(sd,H_),e(U,Q_),e(U,Ne),e(Ne,ad),e(ad,or),e(or,O_),e(Ne,K_),e(Ne,rd),e(rd,nr),e(nr,eb),e(Ne,tb),e(Ne,id),e(id,sr),e(sr,ob),e(Ne,nb),e(Ne,ld),e(ld,ar),e(ar,sb),e(U,ab),e(U,je),M(rr,je,null),e(je,rb),e(je,Yt),e(Yt,ib),e(Yt,dd),e(dd,lb),e(Yt,db),e(Yt,cd),e(cd,cb),e(Yt,pb),e(je,mb),M(_n,je,null),e(je,hb),M(bn,je,null),e(U,fb),e(U,yn),M(ir,yn,null),e(yn,ub),M(Tn,yn,null),e(U,gb),e(U,vn),M(lr,vn,null),e(vn,_b),M(Mn,vn,null),b(t,zc,g),b(t,Ht,g),e(Ht,wn),e(wn,pd),M(dr,pd,null),e(Ht,bb),e(Ht,md),e(md,yb),b(t,Uc,g),b(t,Qt,g),M(cr,Qt,null),e(Qt,Tb),e(Qt,Je),M(pr,Je,null),e(Je,vb),e(Je,Ot),e(Ot,Mb),e(Ot,hd),e(hd,wb),e(Ot,Ib),e(Ot,fd),e(fd,$b),e(Ot,Pb),e(Je,Cb),M(In,Je,null),e(Je,kb),M($n,Je,null),b(t,Fc,g),b(t,Kt,g),e(Kt,Pn),e(Pn,ud),M(mr,ud,null),e(Kt,xb),e(Kt,gd),e(gd,Lb),b(t,Wc,g),b(t,eo,g),M(hr,eo,null),e(eo,jb),e(eo,Ee),M(fr,Ee,null),e(Ee,Jb),e(Ee,to),e(to,Eb),e(to,_d),e(_d,zb),e(to,Ub),e(to,bd),e(bd,Fb),e(to,Wb),e(Ee,Vb),M(Cn,Ee,null),e(Ee,Zb),M(kn,Ee,null),b(t,Vc,g),b(t,oo,g),e(oo,xn),e(xn,yd),M(ur,yd,null),e(oo,Bb),e(oo,Td),e(Td,Nb),b(t,Zc,g),b(t,no,g),M(gr,no,null),e(no,Gb),e(no,ze),M(_r,ze,null),e(ze,Rb),e(ze,so),e(so,qb),e(so,vd),e(vd,Xb),e(so,Ab),e(so,Md),e(Md,Sb),e(so,Db),e(ze,Yb),M(Ln,ze,null),e(ze,Hb),M(jn,ze,null),Bc=!0},p(t,[g]){const br={};g&2&&(br.$$scope={dirty:g,ctx:t}),yo.$set(br);const wd={};g&2&&(wd.$$scope={dirty:g,ctx:t}),Mo.$set(wd);const Id={};g&2&&(Id.$$scope={dirty:g,ctx:t}),Io.$set(Id);const $d={};g&2&&($d.$$scope={dirty:g,ctx:t}),Wo.$set($d);const yr={};g&2&&(yr.$$scope={dirty:g,ctx:t}),Vo.$set(yr);const Pd={};g&2&&(Pd.$$scope={dirty:g,ctx:t}),Zo.$set(Pd);const Cd={};g&2&&(Cd.$$scope={dirty:g,ctx:t}),Bo.$set(Cd);const kd={};g&2&&(kd.$$scope={dirty:g,ctx:t}),No.$set(kd);const Tr={};g&2&&(Tr.$$scope={dirty:g,ctx:t}),Go.$set(Tr);const xd={};g&2&&(xd.$$scope={dirty:g,ctx:t}),qo.$set(xd);const Ld={};g&2&&(Ld.$$scope={dirty:g,ctx:t}),Xo.$set(Ld);const jd={};g&2&&(jd.$$scope={dirty:g,ctx:t}),So.$set(jd);const Jd={};g&2&&(Jd.$$scope={dirty:g,ctx:t}),Do.$set(Jd);const vr={};g&2&&(vr.$$scope={dirty:g,ctx:t}),Ho.$set(vr);const Ed={};g&2&&(Ed.$$scope={dirty:g,ctx:t}),Qo.$set(Ed);const zd={};g&2&&(zd.$$scope={dirty:g,ctx:t}),Ko.$set(zd);const Ud={};g&2&&(Ud.$$scope={dirty:g,ctx:t}),en.$set(Ud);const Fd={};g&2&&(Fd.$$scope={dirty:g,ctx:t}),on.$set(Fd);const Mr={};g&2&&(Mr.$$scope={dirty:g,ctx:t}),nn.$set(Mr);const Wd={};g&2&&(Wd.$$scope={dirty:g,ctx:t}),sn.$set(Wd);const R={};g&2&&(R.$$scope={dirty:g,ctx:t}),an.$set(R);const Vd={};g&2&&(Vd.$$scope={dirty:g,ctx:t}),rn.$set(Vd);const Zd={};g&2&&(Zd.$$scope={dirty:g,ctx:t}),ln.$set(Zd);const Bd={};g&2&&(Bd.$$scope={dirty:g,ctx:t}),dn.$set(Bd);const Nd={};g&2&&(Nd.$$scope={dirty:g,ctx:t}),pn.$set(Nd);const Gd={};g&2&&(Gd.$$scope={dirty:g,ctx:t}),mn.$set(Gd);const Rd={};g&2&&(Rd.$$scope={dirty:g,ctx:t}),fn.$set(Rd);const ao={};g&2&&(ao.$$scope={dirty:g,ctx:t}),un.$set(ao);const qd={};g&2&&(qd.$$scope={dirty:g,ctx:t}),_n.$set(qd);const Xd={};g&2&&(Xd.$$scope={dirty:g,ctx:t}),bn.$set(Xd);const wr={};g&2&&(wr.$$scope={dirty:g,ctx:t}),Tn.$set(wr);const Ad={};g&2&&(Ad.$$scope={dirty:g,ctx:t}),Mn.$set(Ad);const Sd={};g&2&&(Sd.$$scope={dirty:g,ctx:t}),In.$set(Sd);const Dd={};g&2&&(Dd.$$scope={dirty:g,ctx:t}),$n.$set(Dd);const Yd={};g&2&&(Yd.$$scope={dirty:g,ctx:t}),Cn.$set(Yd);const Ir={};g&2&&(Ir.$$scope={dirty:g,ctx:t}),kn.$set(Ir);const $r={};g&2&&($r.$$scope={dirty:g,ctx:t}),Ln.$set($r);const Hd={};g&2&&(Hd.$$scope={dirty:g,ctx:t}),jn.$set(Hd)},i(t){Bc||(w(n.$$.fragment,t),w(j.$$.fragment,t),w(re.$$.fragment,t),w(Se.$$.fragment,t),w(_s.$$.fragment,t),w(Ms.$$.fragment,t),w(ws.$$.fragment,t),w(yo.$$.fragment,t),w($s.$$.fragment,t),w(Cs.$$.fragment,t),w(ks.$$.fragment,t),w(Mo.$$.fragment,t),w(Ls.$$.fragment,t),w(js.$$.fragment,t),w(Io.$$.fragment,t),w(Es.$$.fragment,t),w(zs.$$.fragment,t),w(Fs.$$.fragment,t),w(Ws.$$.fragment,t),w(Zs.$$.fragment,t),w(Bs.$$.fragment,t),w(Ns.$$.fragment,t),w(Gs.$$.fragment,t),w(Xs.$$.fragment,t),w(As.$$.fragment,t),w(Ss.$$.fragment,t),w(Ds.$$.fragment,t),w(Ys.$$.fragment,t),w(Hs.$$.fragment,t),w(Os.$$.fragment,t),w(Ks.$$.fragment,t),w(ea.$$.fragment,t),w(ta.$$.fragment,t),w(na.$$.fragment,t),w(aa.$$.fragment,t),w(ra.$$.fragment,t),w(ca.$$.fragment,t),w(Wo.$$.fragment,t),w(Vo.$$.fragment,t),w(pa.$$.fragment,t),w(Zo.$$.fragment,t),w(Bo.$$.fragment,t),w(ma.$$.fragment,t),w(No.$$.fragment,t),w(Go.$$.fragment,t),w(ha.$$.fragment,t),w(fa.$$.fragment,t),w(ba.$$.fragment,t),w(qo.$$.fragment,t),w(Xo.$$.fragment,t),w(ya.$$.fragment,t),w(Ta.$$.fragment,t),w(Ia.$$.fragment,t),w(So.$$.fragment,t),w(Do.$$.fragment,t),w($a.$$.fragment,t),w(Pa.$$.fragment,t),w(La.$$.fragment,t),w(Ho.$$.fragment,t),w(Qo.$$.fragment,t),w(ja.$$.fragment,t),w(Ja.$$.fragment,t),w(Fa.$$.fragment,t),w(Ko.$$.fragment,t),w(en.$$.fragment,t),w(Wa.$$.fragment,t),w(Va.$$.fragment,t),w(on.$$.fragment,t),w(Ga.$$.fragment,t),w(nn.$$.fragment,t),w(sn.$$.fragment,t),w(Ra.$$.fragment,t),w(an.$$.fragment,t),w(rn.$$.fragment,t),w(qa.$$.fragment,t),w(ln.$$.fragment,t),w(dn.$$.fragment,t),w(Xa.$$.fragment,t),w(Aa.$$.fragment,t),w(Sa.$$.fragment,t),w(pn.$$.fragment,t),w(mn.$$.fragment,t),w(Da.$$.fragment,t),w(Ya.$$.fragment,t),w(Ha.$$.fragment,t),w(fn.$$.fragment,t),w(un.$$.fragment,t),w(Qa.$$.fragment,t),w(Oa.$$.fragment,t),w(rr.$$.fragment,t),w(_n.$$.fragment,t),w(bn.$$.fragment,t),w(ir.$$.fragment,t),w(Tn.$$.fragment,t),w(lr.$$.fragment,t),w(Mn.$$.fragment,t),w(dr.$$.fragment,t),w(cr.$$.fragment,t),w(pr.$$.fragment,t),w(In.$$.fragment,t),w($n.$$.fragment,t),w(mr.$$.fragment,t),w(hr.$$.fragment,t),w(fr.$$.fragment,t),w(Cn.$$.fragment,t),w(kn.$$.fragment,t),w(ur.$$.fragment,t),w(gr.$$.fragment,t),w(_r.$$.fragment,t),w(Ln.$$.fragment,t),w(jn.$$.fragment,t),Bc=!0)},o(t){I(n.$$.fragment,t),I(j.$$.fragment,t),I(re.$$.fragment,t),I(Se.$$.fragment,t),I(_s.$$.fragment,t),I(Ms.$$.fragment,t),I(ws.$$.fragment,t),I(yo.$$.fragment,t),I($s.$$.fragment,t),I(Cs.$$.fragment,t),I(ks.$$.fragment,t),I(Mo.$$.fragment,t),I(Ls.$$.fragment,t),I(js.$$.fragment,t),I(Io.$$.fragment,t),I(Es.$$.fragment,t),I(zs.$$.fragment,t),I(Fs.$$.fragment,t),I(Ws.$$.fragment,t),I(Zs.$$.fragment,t),I(Bs.$$.fragment,t),I(Ns.$$.fragment,t),I(Gs.$$.fragment,t),I(Xs.$$.fragment,t),I(As.$$.fragment,t),I(Ss.$$.fragment,t),I(Ds.$$.fragment,t),I(Ys.$$.fragment,t),I(Hs.$$.fragment,t),I(Os.$$.fragment,t),I(Ks.$$.fragment,t),I(ea.$$.fragment,t),I(ta.$$.fragment,t),I(na.$$.fragment,t),I(aa.$$.fragment,t),I(ra.$$.fragment,t),I(ca.$$.fragment,t),I(Wo.$$.fragment,t),I(Vo.$$.fragment,t),I(pa.$$.fragment,t),I(Zo.$$.fragment,t),I(Bo.$$.fragment,t),I(ma.$$.fragment,t),I(No.$$.fragment,t),I(Go.$$.fragment,t),I(ha.$$.fragment,t),I(fa.$$.fragment,t),I(ba.$$.fragment,t),I(qo.$$.fragment,t),I(Xo.$$.fragment,t),I(ya.$$.fragment,t),I(Ta.$$.fragment,t),I(Ia.$$.fragment,t),I(So.$$.fragment,t),I(Do.$$.fragment,t),I($a.$$.fragment,t),I(Pa.$$.fragment,t),I(La.$$.fragment,t),I(Ho.$$.fragment,t),I(Qo.$$.fragment,t),I(ja.$$.fragment,t),I(Ja.$$.fragment,t),I(Fa.$$.fragment,t),I(Ko.$$.fragment,t),I(en.$$.fragment,t),I(Wa.$$.fragment,t),I(Va.$$.fragment,t),I(on.$$.fragment,t),I(Ga.$$.fragment,t),I(nn.$$.fragment,t),I(sn.$$.fragment,t),I(Ra.$$.fragment,t),I(an.$$.fragment,t),I(rn.$$.fragment,t),I(qa.$$.fragment,t),I(ln.$$.fragment,t),I(dn.$$.fragment,t),I(Xa.$$.fragment,t),I(Aa.$$.fragment,t),I(Sa.$$.fragment,t),I(pn.$$.fragment,t),I(mn.$$.fragment,t),I(Da.$$.fragment,t),I(Ya.$$.fragment,t),I(Ha.$$.fragment,t),I(fn.$$.fragment,t),I(un.$$.fragment,t),I(Qa.$$.fragment,t),I(Oa.$$.fragment,t),I(rr.$$.fragment,t),I(_n.$$.fragment,t),I(bn.$$.fragment,t),I(ir.$$.fragment,t),I(Tn.$$.fragment,t),I(lr.$$.fragment,t),I(Mn.$$.fragment,t),I(dr.$$.fragment,t),I(cr.$$.fragment,t),I(pr.$$.fragment,t),I(In.$$.fragment,t),I($n.$$.fragment,t),I(mr.$$.fragment,t),I(hr.$$.fragment,t),I(fr.$$.fragment,t),I(Cn.$$.fragment,t),I(kn.$$.fragment,t),I(ur.$$.fragment,t),I(gr.$$.fragment,t),I(_r.$$.fragment,t),I(Ln.$$.fragment,t),I(jn.$$.fragment,t),Bc=!1},d(t){o(d),t&&o(y),t&&o(u),$(n),t&&o(ro),t&&o(D),$(j),t&&o(io),t&&o(te),t&&o(lo),t&&o(me),t&&o(co),t&&o(he),t&&o(st),t&&o(V),$(re),t&&o(po),t&&o(qe),t&&o(mo),t&&o(oe),t&&o(ho),t&&o(L),t&&o(us),$(Se,t),t&&o(Ze),t&&o(A),t&&o(mt),t&&o(ge),$(_s),t&&o(Qd),t&&o(zr),t&&o(Od),t&&o(_o),t&&o(Kd),t&&o(Ur),t&&o(ec),t&&o(ht),$(Ms),t&&o(tc),t&&o(H),$(ws),$(yo),$($s),t&&o(oc),t&&o(ut),$(Cs),t&&o(nc),t&&o(ie),$(ks),$(Mo),t&&o(sc),t&&o(bt),$(Ls),t&&o(ac),t&&o(le),$(js),$(Io),t&&o(rc),t&&o(vt),$(Es),t&&o(ic),t&&o(Z),$(zs),$(Fs),$(Ws),$(Zs),$(Bs),t&&o(lc),t&&o(Mt),$(Ns),t&&o(dc),t&&o(Q),$(Gs),$(Xs),$(As),t&&o(cc),t&&o(wt),$(Ss),t&&o(pc),t&&o(Be),$(Ds),$(Ys),t&&o(mc),t&&o(It),$(Hs),t&&o(hc),t&&o(Qs),$(Os),t&&o(fc),t&&o($t),$(Ks),t&&o(uc),t&&o(O),$(ea),$(ta),$(na),t&&o(gc),t&&o(Pt),$(aa),t&&o(_c),t&&o(G),$(ra),$(ca),$(Wo),$(Vo),$(pa),$(Zo),$(Bo),$(ma),$(No),$(Go),t&&o(bc),t&&o(Lt),$(ha),t&&o(yc),t&&o(de),$(fa),$(ba),$(qo),$(Xo),t&&o(Tc),t&&o(Jt),$(ya),t&&o(vc),t&&o(K),$(Ta),$(Ia),$(So),$(Do),t&&o(Mc),t&&o(zt),$($a),t&&o(wc),t&&o(ee),$(Pa),$(La),$(Ho),$(Qo),t&&o(Ic),t&&o(Ft),$(ja),t&&o($c),t&&o(ce),$(Ja),$(Fa),$(Ko),$(en),t&&o(Pc),t&&o(Vt),$(Wa),t&&o(Cc),t&&o(B),$(Va),$(on),$(Ga),$(nn),$(sn),$(Ra),$(an),$(rn),$(qa),$(ln),$(dn),t&&o(kc),t&&o(Gt),$(Xa),t&&o(xc),t&&o(Rt),$(Aa),$(Sa),$(pn),$(mn),t&&o(Lc),t&&o(Xt),$(Da),t&&o(jc),t&&o(At),$(Ya),$(Ha),$(fn),$(un),t&&o(Jc),t&&o(Dt),$(Qa),t&&o(Ec),t&&o(U),$(Oa),$(rr),$(_n),$(bn),$(ir),$(Tn),$(lr),$(Mn),t&&o(zc),t&&o(Ht),$(dr),t&&o(Uc),t&&o(Qt),$(cr),$(pr),$(In),$($n),t&&o(Fc),t&&o(Kt),$(mr),t&&o(Wc),t&&o(eo),$(hr),$(fr),$(Cn),$(kn),t&&o(Vc),t&&o(oo),$(ur),t&&o(Zc),t&&o(no),$(gr),$(_r),$(Ln),$(jn)}}}const NM={local:"clip",sections:[{local:"overview",title:"Overview"},{local:"usage",title:"Usage"},{local:"resources",title:"Resources"},{local:"transformers.CLIPConfig",title:"CLIPConfig"},{local:"transformers.CLIPTextConfig",title:"CLIPTextConfig"},{local:"transformers.CLIPVisionConfig",title:"CLIPVisionConfig"},{local:"transformers.CLIPTokenizer",title:"CLIPTokenizer"},{local:"transformers.CLIPTokenizerFast",title:"CLIPTokenizerFast"},{local:"transformers.CLIPImageProcessor",title:"CLIPImageProcessor"},{local:"transformers.CLIPFeatureExtractor",title:"CLIPFeatureExtractor"},{local:"transformers.CLIPProcessor",title:"CLIPProcessor"},{local:"transformers.CLIPModel",title:"CLIPModel"},{local:"transformers.CLIPTextModel",title:"CLIPTextModel"},{local:"transformers.CLIPTextModelWithProjection",title:"CLIPTextModelWithProjection"},{local:"transformers.CLIPVisionModelWithProjection",title:"CLIPVisionModelWithProjection"},{local:"transformers.CLIPVisionModel",title:"CLIPVisionModel"},{local:"transformers.TFCLIPModel",title:"TFCLIPModel"},{local:"transformers.TFCLIPTextModel",title:"TFCLIPTextModel"},{local:"transformers.TFCLIPVisionModel",title:"TFCLIPVisionModel"},{local:"transformers.FlaxCLIPModel",title:"FlaxCLIPModel"},{local:"transformers.FlaxCLIPTextModel",title:"FlaxCLIPTextModel"},{local:"transformers.FlaxCLIPTextModelWithProjection",title:"FlaxCLIPTextModelWithProjection"},{local:"transformers.FlaxCLIPVisionModel",title:"FlaxCLIPVisionModel"}],title:"CLIP"};function GM(P){return tM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class YM extends Qv{constructor(d){super();Ov(this,d,GM,BM,Kv,{})}}export{YM as default,NM as metadata};
