import{S as wc,i as Vc,s as $c,e as r,k as h,w as y,t as a,M as Gc,c as s,d as o,m as f,a as l,x as b,h as i,b as m,G as e,g as T,y as M,q as w,o as V,B as $,v as kc,L as se}from"../../chunks/vendor-hf-doc-builder.js";import{T as pe}from"../../chunks/Tip-hf-doc-builder.js";import{D as J}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ae}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as re}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function jc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdyb3VwVmlUVGV4dENvbmZpZyUyQyUyMEdyb3VwVmlUVGV4dE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEdyb3VwVmlUVGV4dE1vZGVsJTIwd2l0aCUyMG52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEdyb3VwVmlUVGV4dENvbmZpZygpJTBBJTBBbW9kZWwlMjAlM0QlMjBHcm91cFZpVFRleHRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GroupViTTextConfig, GroupViTTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a GroupViTTextModel with nvidia/groupvit-gcc-yfcc style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = GroupViTTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTTextModel(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=r("p"),v=a("Example:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Example:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function xc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdyb3VwVmlUVmlzaW9uQ29uZmlnJTJDJTIwR3JvdXBWaVRWaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBHcm91cFZpVFZpc2lvbk1vZGVsJTIwd2l0aCUyMG52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEdyb3VwVmlUVmlzaW9uQ29uZmlnKCklMEElMEFtb2RlbCUyMCUzRCUyMEdyb3VwVmlUVmlzaW9uTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GroupViTVisionConfig, GroupViTVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a GroupViTVisionModel with nvidia/groupvit-gcc-yfcc style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = GroupViTVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTVisionModel(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=r("p"),v=a("Example:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Example:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Ec(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Jc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEdyb3VwVmlUTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEdyb3VwVmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",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, GroupViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Uc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Cc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUb2tlbml6ZXIlMkMlMjBHcm91cFZpVE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBHcm91cFZpVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBDTElQVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTokenizer, GroupViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CLIPTokenizer.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Ic(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function zc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEdyb3VwVmlUTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEdyb3VwVmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",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, GroupViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Wc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Fc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUb2tlbml6ZXIlMkMlMjBHcm91cFZpVFRleHRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMENMSVBUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQW1vZGVsJTIwJTNEJTIwR3JvdXBWaVRUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjAoRU9TJTIwdG9rZW4pJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTokenizer, GroupViTTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CLIPTokenizer.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTTextModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Zc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Bc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEdyb3VwVmlUVmlzaW9uTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEFtb2RlbCUyMCUzRCUyMEdyb3VwVmlUVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwQ0xTJTIwc3RhdGVz",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, GroupViTVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GroupViTVisionModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Rc(G){let d,v,u,p,g,n,c,k,co,Ge,E,H,ie,le,po,de,uo,ct,z,ue,ce,pt,Z,W,mo,ke,ut,me,je,mt,he,B,ho,fe,ge,fo,_e,Te,P,ve,xe,Ee,go;return{c(){d=r("p"),v=a("TF 2.0 models accepts two formats as inputs:"),u=h(),p=r("ul"),g=r("li"),n=a("having all inputs as keyword arguments (like PyTorch models), or"),c=h(),k=r("li"),co=a("having all inputs as a list, tuple or dict in the first positional arguments."),Ge=h(),E=r("p"),H=a("This second option is useful when using "),ie=r("code"),le=a("tf.keras.Model.fit"),po=a(` method which currently requires having all the
tensors in the first argument of the model call function: `),de=r("code"),uo=a("model(inputs)"),ct=a("."),z=h(),ue=r("p"),ce=a(`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),pt=h(),Z=r("ul"),W=r("li"),mo=a("a single Tensor with "),ke=r("code"),ut=a("input_ids"),me=a(" only and nothing else: "),je=r("code"),mt=a("model(input_ids)"),he=h(),B=r("li"),ho=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),fe=r("code"),ge=a("model([input_ids, attention_mask])"),fo=a(" or "),_e=r("code"),Te=a("model([input_ids, attention_mask, token_type_ids])"),P=h(),ve=r("li"),xe=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Ee=r("code"),go=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})')},l(j){d=s(j,"P",{});var I=l(d);v=i(I,"TF 2.0 models accepts two formats as inputs:"),I.forEach(o),u=f(j),p=s(j,"UL",{});var ht=l(p);g=s(ht,"LI",{});var _o=l(g);n=i(_o,"having all inputs as keyword arguments (like PyTorch models), or"),_o.forEach(o),c=f(ht),k=s(ht,"LI",{});var x=l(k);co=i(x,"having all inputs as a list, tuple or dict in the first positional arguments."),x.forEach(o),ht.forEach(o),Ge=f(j),E=s(j,"P",{});var ye=l(E);H=i(ye,"This second option is useful when using "),ie=s(ye,"CODE",{});var be=l(ie);le=i(be,"tf.keras.Model.fit"),be.forEach(o),po=i(ye,` method which currently requires having all the
tensors in the first argument of the model call function: `),de=s(ye,"CODE",{});var hn=l(de);uo=i(hn,"model(inputs)"),hn.forEach(o),ct=i(ye,"."),ye.forEach(o),z=f(j),ue=s(j,"P",{});var fn=l(ue);ce=i(fn,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),fn.forEach(o),pt=f(j),Z=s(j,"UL",{});var R=l(Z);W=s(R,"LI",{});var Je=l(W);mo=i(Je,"a single Tensor with "),ke=s(Je,"CODE",{});var gn=l(ke);ut=i(gn,"input_ids"),gn.forEach(o),me=i(Je," only and nothing else: "),je=s(Je,"CODE",{});var Me=l(je);mt=i(Me,"model(input_ids)"),Me.forEach(o),Je.forEach(o),he=f(R),B=s(R,"LI",{});var Ue=l(B);ho=i(Ue,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),fe=s(Ue,"CODE",{});var _n=l(fe);ge=i(_n,"model([input_ids, attention_mask])"),_n.forEach(o),fo=i(Ue," or "),_e=s(Ue,"CODE",{});var we=l(_e);Te=i(we,"model([input_ids, attention_mask, token_type_ids])"),we.forEach(o),Ue.forEach(o),P=f(R),ve=s(R,"LI",{});var To=l(ve);xe=i(To,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Ee=s(To,"CODE",{});var Tn=l(Ee);go=i(Tn,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Tn.forEach(o),To.forEach(o),R.forEach(o)},m(j,I){T(j,d,I),e(d,v),T(j,u,I),T(j,p,I),e(p,g),e(g,n),e(p,c),e(p,k),e(k,co),T(j,Ge,I),T(j,E,I),e(E,H),e(E,ie),e(ie,le),e(E,po),e(E,de),e(de,uo),e(E,ct),T(j,z,I),T(j,ue,I),e(ue,ce),T(j,pt,I),T(j,Z,I),e(Z,W),e(W,mo),e(W,ke),e(ke,ut),e(W,me),e(W,je),e(je,mt),e(Z,he),e(Z,B),e(B,ho),e(B,fe),e(fe,ge),e(B,fo),e(B,_e),e(_e,Te),e(Z,P),e(Z,ve),e(ve,xe),e(ve,Ee),e(Ee,go)},d(j){j&&o(d),j&&o(u),j&&o(p),j&&o(Ge),j&&o(E),j&&o(z),j&&o(ue),j&&o(pt),j&&o(Z)}}}function Nc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Pc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGR3JvdXBWaVRNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBbW9kZWwlMjAlM0QlMjBURkdyb3VwVmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwdGYubWF0aC5zb2Z0bWF4KGxvZ2l0c19wZXJfaW1hZ2UlMkMlMjBheGlzJTNEMSklMjAlMjAlMjMlMjB3ZSUyMGNhbiUyMHRha2UlMjB0aGUlMjBzb2Z0bWF4JTIwdG8lMjBnZXQlMjB0aGUlMjBsYWJlbCUyMHByb2JhYmlsaXRpZXM=",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, TFGroupViTModel
<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>model = TFGroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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.math.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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function qc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Ac(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUb2tlbml6ZXIlMkMlMjBURkdyb3VwVmlUTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFRGR3JvdXBWaVRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGZ3JvdXB2aXQtZ2NjLXlmY2MlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQ0xJUFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGZ3JvdXB2aXQtZ2NjLXlmY2MlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEF0ZXh0X2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X3RleHRfZmVhdHVyZXMoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTokenizer, TFGroupViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFGroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CLIPTokenizer.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Sc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Hc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGR3JvdXBWaVRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZHcm91cFZpVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",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, TFGroupViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFGroupViTModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Xc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Yc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUb2tlbml6ZXIlMkMlMjBURkdyb3VwVmlUVGV4dE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQ0xJUFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGZ3JvdXB2aXQtZ2NjLXlmY2MlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkdyb3VwVmlUVGV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwKEVPUyUyMHRva2VuKSUyMHN0YXRlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTokenizer, TFGroupViTTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CLIPTokenizer.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFGroupViTTextModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Lc(G){let d,v,u,p,g;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r("code"),p=a("Module"),g=a(`
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=s(n,"P",{});var c=l(d);v=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(c,"CODE",{});var k=l(u);p=i(k,"Module"),k.forEach(o),g=i(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){T(n,d,c),e(d,v),e(d,u),e(u,p),e(d,g)},d(n){n&&o(d)}}}function Dc(G){let d,v,u,p,g;return p=new ae({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGR3JvdXBWaVRWaXNpb25Nb2RlbCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRmdyb3Vwdml0LWdjYy15ZmNjJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZHcm91cFZpVFZpc2lvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZncm91cHZpdC1nY2MteWZjYyUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVkX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMENMUyUyMHN0YXRlcw==",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, TFGroupViTVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFGroupViTVisionModel.from_pretrained(<span class="hljs-string">&quot;nvidia/groupvit-gcc-yfcc&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=r("p"),v=a("Examples:"),u=h(),y(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);v=i(c,"Examples:"),c.forEach(o),u=f(n),b(p.$$.fragment,n)},m(n,c){T(n,d,c),e(d,v),T(n,u,c),M(p,n,c),g=!0},p:se,i(n){g||(w(p.$$.fragment,n),g=!0)},o(n){V(p.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),$(p,n)}}}function Oc(G){let d,v,u,p,g,n,c,k,co,Ge,E,H,ie,le,po,de,uo,ct,z,ue,ce,pt,Z,W,mo,ke,ut,me,je,mt,he,B,ho,fe,ge,fo,_e,Te,P,ve,xe,Ee,go,j,I,ht,_o,x,ye,be,hn,fn,R,Je,gn,Me,Ue,_n,we,To,Tn,vo,Ns,Ps,yo,qs,As,Or,Ce,ft,nr,bo,Ss,rr,Hs,Qr,vn,Xs,Kr,gt,Mo,Ys,wo,Ls,Ds,Os,Vo,Qs,$o,Ks,ea,es,Ie,_t,sr,Go,ta,ar,oa,ts,q,ko,na,Ve,yn,ra,sa,bn,aa,ia,jo,la,da,ca,ze,pa,Mn,ua,ma,wn,ha,fa,ga,Tt,xo,_a,Eo,Ta,Vn,va,ya,os,We,vt,ir,Jo,ba,lr,Ma,ns,A,Uo,wa,Fe,Va,$n,$a,Ga,Co,ka,ja,xa,Ze,Ea,Gn,Ja,Ua,kn,Ca,Ia,za,yt,rs,Be,bt,dr,Io,Wa,cr,Fa,ss,S,zo,Za,Re,Ba,jn,Ra,Na,Wo,Pa,qa,Aa,Ne,Sa,xn,Ha,Xa,En,Ya,La,Da,Mt,as,Pe,wt,pr,Fo,Oa,ur,Qa,is,F,Zo,Ka,Bo,ei,Ro,ti,oi,ni,X,No,ri,qe,si,Jn,ai,ii,mr,li,di,ci,Vt,pi,$t,ui,Y,Po,mi,Ae,hi,Un,fi,gi,hr,_i,Ti,vi,Gt,yi,kt,bi,L,qo,Mi,Se,wi,Cn,Vi,$i,fr,Gi,ki,ji,jt,xi,xt,ls,He,Et,gr,Ao,Ei,_r,Ji,ds,Xe,So,Ui,D,Ho,Ci,Ye,Ii,In,zi,Wi,Tr,Fi,Zi,Bi,Jt,Ri,Ut,cs,Le,Ct,vr,Xo,Ni,yr,Pi,ps,De,Yo,qi,O,Lo,Ai,Oe,Si,zn,Hi,Xi,br,Yi,Li,Di,It,Oi,zt,us,Qe,Wt,Mr,Do,Qi,wr,Ki,ms,U,Oo,el,Qo,tl,Wn,ol,nl,rl,Ko,sl,en,al,il,ll,Ft,dl,Q,tn,cl,Ke,pl,Fn,ul,ml,Vr,hl,fl,gl,Zt,_l,Bt,Tl,K,on,vl,et,yl,Zn,bl,Ml,$r,wl,Vl,$l,Rt,Gl,Nt,kl,ee,nn,jl,tt,xl,Bn,El,Jl,Gr,Ul,Cl,Il,Pt,zl,qt,hs,ot,At,kr,rn,Wl,jr,Fl,fs,nt,sn,Zl,te,an,Bl,rt,Rl,Rn,Nl,Pl,xr,ql,Al,Sl,St,Hl,Ht,gs,st,Xt,Er,ln,Xl,Jr,Yl,_s,at,dn,Ll,oe,cn,Dl,it,Ol,Nn,Ql,Kl,Ur,ed,td,od,Yt,nd,Lt,Ts;return n=new ne({}),le=new ne({}),bo=new ne({}),Go=new ne({}),ko=new J({props:{name:"class transformers.GroupViTConfig",anchor:"transformers.GroupViTConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 256"},{name:"projection_intermediate_dim",val:" = 4096"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GroupViTConfig.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/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextConfig">GroupViTTextConfig</a>.`,name:"text_config"},{anchor:"transformers.GroupViTConfig.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/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionConfig">GroupViTVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.GroupViTConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.GroupViTConfig.projection_intermediate_dim",description:`<strong>projection_intermediate_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimentionality of intermediate layer of text and vision projection layers.`,name:"projection_intermediate_dim"},{anchor:"transformers.GroupViTConfig.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> parameter. Default is used as per the original GroupViT
implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.GroupViTConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/configuration_groupvit.py#L268"}}),xo=new J({props:{name:"from_text_vision_configs",anchor:"transformers.GroupViTConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": GroupViTTextConfig"},{name:"vision_config",val:": GroupViTVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/configuration_groupvit.py#L394",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTConfig"
>GroupViTConfig</a></p>
`}}),Jo=new ne({}),Uo=new J({props:{name:"class transformers.GroupViTTextConfig",anchor:"transformers.GroupViTTextConfig",parameters:[{name:"vocab_size",val:" = 49408"},{name:"hidden_size",val:" = 256"},{name:"intermediate_size",val:" = 1024"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 4"},{name:"max_position_embeddings",val:" = 77"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"dropout",val:" = 0.0"},{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:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GroupViTTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 49408) &#x2014;
Vocabulary size of the GroupViT 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/v4.30.0/en/model_doc/groupvit#transformers.GroupViTModel">GroupViTModel</a>.`,name:"vocab_size"},{anchor:"transformers.GroupViTTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.GroupViTTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.GroupViTTextConfig.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.GroupViTTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.GroupViTTextConfig.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.GroupViTTextConfig.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.GroupViTTextConfig.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.GroupViTTextConfig.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.GroupViTTextConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.GroupViTTextConfig.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.GroupViTTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/configuration_groupvit.py#L39"}}),yt=new re({props:{anchor:"transformers.GroupViTTextConfig.example",$$slots:{default:[jc]},$$scope:{ctx:G}}}),Io=new ne({}),zo=new J({props:{name:"class transformers.GroupViTVisionConfig",anchor:"transformers.GroupViTVisionConfig",parameters:[{name:"hidden_size",val:" = 384"},{name:"intermediate_size",val:" = 1536"},{name:"depths",val:" = [6, 3, 3]"},{name:"num_hidden_layers",val:" = 12"},{name:"num_group_tokens",val:" = [64, 8, 0]"},{name:"num_output_groups",val:" = [64, 8, 8]"},{name:"num_attention_heads",val:" = 6"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"assign_eps",val:" = 1.0"},{name:"assign_mlp_ratio",val:" = [0.5, 4]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GroupViTVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.GroupViTVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.GroupViTVisionConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [6, 3, 3]) &#x2014;
The number of layers in each encoder block.`,name:"depths"},{anchor:"transformers.GroupViTVisionConfig.num_group_tokens",description:`<strong>num_group_tokens</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [64, 8, 0]) &#x2014;
The number of group tokens for each stage.`,name:"num_group_tokens"},{anchor:"transformers.GroupViTVisionConfig.num_output_groups",description:`<strong>num_output_groups</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [64, 8, 8]) &#x2014;
The number of output groups for each stage, 0 means no group.`,name:"num_output_groups"},{anchor:"transformers.GroupViTVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.GroupViTVisionConfig.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.GroupViTVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.GroupViTVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.GroupViTVisionConfig.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.GroupViTVisionConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.GroupViTVisionConfig.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.GroupViTVisionConfig.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.GroupViTVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/configuration_groupvit.py#L145"}}),Mt=new re({props:{anchor:"transformers.GroupViTVisionConfig.example",$$slots:{default:[xc]},$$scope:{ctx:G}}}),Fo=new ne({}),Zo=new J({props:{name:"class transformers.GroupViTModel",anchor:"transformers.GroupViTModel",parameters:[{name:"config",val:": GroupViTConfig"}],parametersDescription:[{anchor:"transformers.GroupViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTConfig">GroupViTConfig</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/v4.30.0/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/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1329"}}),No=new J({props:{name:"forward",anchor:"transformers.GroupViTModel.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:"output_segmentation",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GroupViTModel.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/v4.30.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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. Pixel values can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1471",returnDescription:`
<p>A <code>transformers.models.groupvit.modeling_groupvit.GroupViTModelOutput</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.groupvit.configuration_groupvit.GroupViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><strong>logits_per_image</strong> (<code>torch.FloatTensor</code> 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.</p>
</li>
<li>
<p><strong>logits_per_text</strong> (<code>torch.FloatTensor</code> 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.</p>
</li>
<li>
<p><strong>segmentation_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>text_embeds</strong> (<code>torch.FloatTensor</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/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextModel"
>GroupViTTextModel</a>.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> 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/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"
>GroupViTVisionModel</a>.</p>
</li>
<li>
<p><strong>text_model_output</strong> (<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextModel"
>GroupViTTextModel</a>.</p>
</li>
<li>
<p><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"
>GroupViTVisionModel</a>.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.groupvit.modeling_groupvit.GroupViTModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new pe({props:{$$slots:{default:[Ec]},$$scope:{ctx:G}}}),$t=new re({props:{anchor:"transformers.GroupViTModel.forward.example",$$slots:{default:[Jc]},$$scope:{ctx:G}}}),Po=new J({props:{name:"get_text_features",anchor:"transformers.GroupViTModel.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.GroupViTModel.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/v4.30.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1375",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextModel"
>GroupViTTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Gt=new pe({props:{$$slots:{default:[Uc]},$$scope:{ctx:G}}}),kt=new re({props:{anchor:"transformers.GroupViTModel.get_text_features.example",$$slots:{default:[Cc]},$$scope:{ctx:G}}}),qo=new J({props:{name:"get_image_features",anchor:"transformers.GroupViTModel.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.GroupViTModel.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/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.GroupViTModel.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.GroupViTModel.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.GroupViTModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1422",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"
>GroupViTVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),jt=new pe({props:{$$slots:{default:[Ic]},$$scope:{ctx:G}}}),xt=new re({props:{anchor:"transformers.GroupViTModel.get_image_features.example",$$slots:{default:[zc]},$$scope:{ctx:G}}}),Ao=new ne({}),So=new J({props:{name:"class transformers.GroupViTTextModel",anchor:"transformers.GroupViTTextModel",parameters:[{name:"config",val:": GroupViTTextConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1165"}}),Ho=new J({props:{name:"forward",anchor:"transformers.GroupViTTextModel.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.GroupViTTextModel.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/v4.30.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.GroupViTTextModel.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.GroupViTTextModel.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.GroupViTTextModel.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.GroupViTTextModel.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.GroupViTTextModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1180",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.groupvit.configuration_groupvit.GroupViTTextConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jt=new pe({props:{$$slots:{default:[Wc]},$$scope:{ctx:G}}}),Ut=new re({props:{anchor:"transformers.GroupViTTextModel.forward.example",$$slots:{default:[Fc]},$$scope:{ctx:G}}}),Xo=new ne({}),Yo=new J({props:{name:"class transformers.GroupViTVisionModel",anchor:"transformers.GroupViTVisionModel",parameters:[{name:"config",val:": GroupViTVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1276"}}),Lo=new J({props:{name:"forward",anchor:"transformers.GroupViTVisionModel.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.GroupViTVisionModel.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/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.GroupViTVisionModel.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.GroupViTVisionModel.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.GroupViTVisionModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_groupvit.py#L1289",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.groupvit.configuration_groupvit.GroupViTVisionConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),It=new pe({props:{$$slots:{default:[Zc]},$$scope:{ctx:G}}}),zt=new re({props:{anchor:"transformers.GroupViTVisionModel.forward.example",$$slots:{default:[Bc]},$$scope:{ctx:G}}}),Do=new ne({}),Oo=new J({props:{name:"class transformers.TFGroupViTModel",anchor:"transformers.TFGroupViTModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFGroupViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTConfig">GroupViTConfig</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/v4.30.0/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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1709"}}),Ft=new pe({props:{$$slots:{default:[Rc]},$$scope:{ctx:G}}}),tn=new J({props:{name:"call",anchor:"transformers.TFGroupViTModel.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:"output_segmentation",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFGroupViTModel.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/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/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.TFGroupViTModel.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/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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/v4.30.0/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.TFGroupViTModel.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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1801",returnDescription:`
<p>A <code>transformers.models.groupvit.modeling_tf_groupvit.TFGroupViTModelOutput</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.groupvit.configuration_groupvit.GroupViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><strong>logits_per_image</strong> (<code>tf.Tensor</code> 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.</p>
</li>
<li>
<p><strong>logits_per_text</strong> (<code>tf.Tensor</code> 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.</p>
</li>
<li>
<p><strong>segmentation_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>text_embeds</strong> (<code>tf.Tensor</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/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTTextModel"
>TFGroupViTTextModel</a>.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> 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/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTVisionModel"
>TFGroupViTVisionModel</a>.</p>
</li>
<li>
<p><strong>text_model_output</strong> (<code>TFBaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTTextModel"
>TFGroupViTTextModel</a>.</p>
</li>
<li>
<p><strong>vision_model_output</strong> (<code>TFBaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTVisionModel"
>TFGroupViTVisionModel</a>.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.groupvit.modeling_tf_groupvit.TFGroupViTModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Zt=new pe({props:{$$slots:{default:[Nc]},$$scope:{ctx:G}}}),Bt=new re({props:{anchor:"transformers.TFGroupViTModel.call.example",$$slots:{default:[Pc]},$$scope:{ctx:G}}}),on=new J({props:{name:"get_text_features",anchor:"transformers.TFGroupViTModel.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.TFGroupViTModel.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/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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.TFGroupViTModel.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/v4.30.0/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.TFGroupViTModel.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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1717",returnDescription:`
<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTTextModel"
>TFGroupViTTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Rt=new pe({props:{$$slots:{default:[qc]},$$scope:{ctx:G}}}),Nt=new re({props:{anchor:"transformers.TFGroupViTModel.get_text_features.example",$$slots:{default:[Ac]},$$scope:{ctx:G}}}),nn=new J({props:{name:"get_image_features",anchor:"transformers.TFGroupViTModel.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.TFGroupViTModel.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/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFGroupViTModel.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. 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.TFGroupViTModel.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.TFGroupViTModel.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/v4.30.0/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.TFGroupViTModel.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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1758",returnDescription:`
<p>The image embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTVisionModel"
>TFGroupViTVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Pt=new pe({props:{$$slots:{default:[Sc]},$$scope:{ctx:G}}}),qt=new re({props:{anchor:"transformers.TFGroupViTModel.get_image_features.example",$$slots:{default:[Hc]},$$scope:{ctx:G}}}),rn=new ne({}),sn=new J({props:{name:"class transformers.TFGroupViTTextModel",anchor:"transformers.TFGroupViTTextModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1601"}}),an=new J({props:{name:"call",anchor:"transformers.TFGroupViTTextModel.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:": bool = False"}],parametersDescription:[{anchor:"transformers.TFGroupViTTextModel.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/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/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.TFGroupViTTextModel.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.TFGroupViTTextModel.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.TFGroupViTTextModel.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.TFGroupViTTextModel.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.TFGroupViTTextModel.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/v4.30.0/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.TFGroupViTTextModel.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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1610",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.groupvit.configuration_groupvit.GroupViTTextConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),St=new pe({props:{$$slots:{default:[Xc]},$$scope:{ctx:G}}}),Ht=new re({props:{anchor:"transformers.TFGroupViTTextModel.call.example",$$slots:{default:[Yc]},$$scope:{ctx:G}}}),ln=new ne({}),dn=new J({props:{name:"class transformers.TFGroupViTVisionModel",anchor:"transformers.TFGroupViTVisionModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1654"}}),cn=new J({props:{name:"call",anchor:"transformers.TFGroupViTVisionModel.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:": bool = False"}],parametersDescription:[{anchor:"transformers.TFGroupViTVisionModel.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/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFGroupViTVisionModel.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.TFGroupViTVisionModel.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.TFGroupViTVisionModel.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/v4.30.0/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.TFGroupViTVisionModel.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/v4.30.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1663",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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.groupvit.configuration_groupvit.GroupViTVisionConfig'&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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Yt=new pe({props:{$$slots:{default:[Lc]},$$scope:{ctx:G}}}),Lt=new re({props:{anchor:"transformers.TFGroupViTVisionModel.call.example",$$slots:{default:[Dc]},$$scope:{ctx:G}}}),{c(){d=r("meta"),v=h(),u=r("h1"),p=r("a"),g=r("span"),y(n.$$.fragment),c=h(),k=r("span"),co=a("GroupViT"),Ge=h(),E=r("h2"),H=r("a"),ie=r("span"),y(le.$$.fragment),po=h(),de=r("span"),uo=a("Overview"),ct=h(),z=r("p"),ue=a("The GroupViT model was proposed in "),ce=r("a"),pt=a("GroupViT: Semantic Segmentation Emerges from Text Supervision"),Z=a(` by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
Inspired by `),W=r("a"),mo=a("CLIP"),ke=a(", GroupViT is a vision-language model that can perform zero-shot semantic segmentation on any given vocabulary categories."),ut=h(),me=r("p"),je=a("The abstract from the paper is the following:"),mt=h(),he=r("p"),B=r("em"),ho=a("Grouping and recognition are important components of visual scene understanding, e.g., for object detection and semantic segmentation. With end-to-end deep learning systems, grouping of image regions usually happens implicitly via top-down supervision from pixel-level recognition labels. Instead, in this paper, we propose to bring back the grouping mechanism into deep networks, which allows semantic segments to emerge automatically with only text supervision. We propose a hierarchical Grouping Vision Transformer (GroupViT), which goes beyond the regular grid structure representation and learns to group image regions into progressively larger arbitrary-shaped segments. We train GroupViT jointly with a text encoder on a large-scale image-text dataset via contrastive losses. With only text supervision and without any pixel-level annotations, GroupViT learns to group together semantic regions and successfully transfers to the task of semantic segmentation in a zero-shot manner, i.e., without any further fine-tuning. It achieves a zero-shot accuracy of 52.3% mIoU on the PASCAL VOC 2012 and 22.4% mIoU on PASCAL Context datasets, and performs competitively to state-of-the-art transfer-learning methods requiring greater levels of supervision."),fe=h(),ge=r("p"),fo=a("Tips:"),_e=h(),Te=r("ul"),P=r("li"),ve=a("You may specify "),xe=r("code"),Ee=a("output_segmentation=True"),go=a(" in the forward of "),j=r("code"),I=a("GroupViTModel"),ht=a(" to get the segmentation logits of input texts."),_o=h(),x=r("p"),ye=a("This model was contributed by "),be=r("a"),hn=a("xvjiarui"),fn=a(". The TensorFlow version was contributed by "),R=r("a"),Je=a("ariG23498"),gn=a(" with the help of "),Me=r("a"),Ue=a("Yih-Dar SHIEH"),_n=a(", "),we=r("a"),To=a("Amy Roberts"),Tn=a(", and "),vo=r("a"),Ns=a("Joao Gante"),Ps=a(`.
The original code can be found `),yo=r("a"),qs=a("here"),As=a("."),Or=h(),Ce=r("h2"),ft=r("a"),nr=r("span"),y(bo.$$.fragment),Ss=h(),rr=r("span"),Hs=a("Resources"),Qr=h(),vn=r("p"),Xs=a("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with GroupViT."),Kr=h(),gt=r("ul"),Mo=r("li"),Ys=a("The quickest way to get started with GroupViT is by checking the "),wo=r("a"),Ls=a("example notebooks"),Ds=a(" (which showcase zero-shot segmentation inference)."),Os=h(),Vo=r("li"),Qs=a("One can also check out the "),$o=r("a"),Ks=a("HuggingFace Spaces demo"),ea=a(" to play with GroupViT."),es=h(),Ie=r("h2"),_t=r("a"),sr=r("span"),y(Go.$$.fragment),ta=h(),ar=r("span"),oa=a("GroupViTConfig"),ts=h(),q=r("div"),y(ko.$$.fragment),na=h(),Ve=r("p"),yn=r("a"),ra=a("GroupViTConfig"),sa=a(" is the configuration class to store the configuration of a "),bn=r("a"),aa=a("GroupViTModel"),ia=a(`. It is used to
instantiate a GroupViT 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 GroupViT
`),jo=r("a"),la=a("nvidia/groupvit-gcc-yfcc"),da=a(" architecture."),ca=h(),ze=r("p"),pa=a("Configuration objects inherit from "),Mn=r("a"),ua=a("PretrainedConfig"),ma=a(` and can be used to control the model outputs. Read the
documentation from `),wn=r("a"),ha=a("PretrainedConfig"),fa=a(" for more information."),ga=h(),Tt=r("div"),y(xo.$$.fragment),_a=h(),Eo=r("p"),Ta=a("Instantiate a "),Vn=r("a"),va=a("GroupViTConfig"),ya=a(` (or a derived class) from groupvit text model configuration and groupvit
vision model configuration.`),os=h(),We=r("h2"),vt=r("a"),ir=r("span"),y(Jo.$$.fragment),ba=h(),lr=r("span"),Ma=a("GroupViTTextConfig"),ns=h(),A=r("div"),y(Uo.$$.fragment),wa=h(),Fe=r("p"),Va=a("This is the configuration class to store the configuration of a "),$n=r("a"),$a=a("GroupViTTextModel"),Ga=a(`. It is used to instantiate an
GroupViT model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the GroupViT
`),Co=r("a"),ka=a("nvidia/groupvit-gcc-yfcc"),ja=a(" architecture."),xa=h(),Ze=r("p"),Ea=a("Configuration objects inherit from "),Gn=r("a"),Ja=a("PretrainedConfig"),Ua=a(` and can be used to control the model outputs. Read the
documentation from `),kn=r("a"),Ca=a("PretrainedConfig"),Ia=a(" for more information."),za=h(),y(yt.$$.fragment),rs=h(),Be=r("h2"),bt=r("a"),dr=r("span"),y(Io.$$.fragment),Wa=h(),cr=r("span"),Fa=a("GroupViTVisionConfig"),ss=h(),S=r("div"),y(zo.$$.fragment),Za=h(),Re=r("p"),Ba=a("This is the configuration class to store the configuration of a "),jn=r("a"),Ra=a("GroupViTVisionModel"),Na=a(`. It is used to instantiate
an GroupViT model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the GroupViT
`),Wo=r("a"),Pa=a("nvidia/groupvit-gcc-yfcc"),qa=a(" architecture."),Aa=h(),Ne=r("p"),Sa=a("Configuration objects inherit from "),xn=r("a"),Ha=a("PretrainedConfig"),Xa=a(` and can be used to control the model outputs. Read the
documentation from `),En=r("a"),Ya=a("PretrainedConfig"),La=a(" for more information."),Da=h(),y(Mt.$$.fragment),as=h(),Pe=r("h2"),wt=r("a"),pr=r("span"),y(Fo.$$.fragment),Oa=h(),ur=r("span"),Qa=a("GroupViTModel"),is=h(),F=r("div"),y(Zo.$$.fragment),Ka=h(),Bo=r("p"),ei=a("This model is a PyTorch "),Ro=r("a"),ti=a("torch.nn.Module"),oi=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ni=h(),X=r("div"),y(No.$$.fragment),ri=h(),qe=r("p"),si=a("The "),Jn=r("a"),ai=a("GroupViTModel"),ii=a(" forward method, overrides the "),mr=r("code"),li=a("__call__"),di=a(" special method."),ci=h(),y(Vt.$$.fragment),pi=h(),y($t.$$.fragment),ui=h(),Y=r("div"),y(Po.$$.fragment),mi=h(),Ae=r("p"),hi=a("The "),Un=r("a"),fi=a("GroupViTModel"),gi=a(" forward method, overrides the "),hr=r("code"),_i=a("__call__"),Ti=a(" special method."),vi=h(),y(Gt.$$.fragment),yi=h(),y(kt.$$.fragment),bi=h(),L=r("div"),y(qo.$$.fragment),Mi=h(),Se=r("p"),wi=a("The "),Cn=r("a"),Vi=a("GroupViTModel"),$i=a(" forward method, overrides the "),fr=r("code"),Gi=a("__call__"),ki=a(" special method."),ji=h(),y(jt.$$.fragment),xi=h(),y(xt.$$.fragment),ls=h(),He=r("h2"),Et=r("a"),gr=r("span"),y(Ao.$$.fragment),Ei=h(),_r=r("span"),Ji=a("GroupViTTextModel"),ds=h(),Xe=r("div"),y(So.$$.fragment),Ui=h(),D=r("div"),y(Ho.$$.fragment),Ci=h(),Ye=r("p"),Ii=a("The "),In=r("a"),zi=a("GroupViTTextModel"),Wi=a(" forward method, overrides the "),Tr=r("code"),Fi=a("__call__"),Zi=a(" special method."),Bi=h(),y(Jt.$$.fragment),Ri=h(),y(Ut.$$.fragment),cs=h(),Le=r("h2"),Ct=r("a"),vr=r("span"),y(Xo.$$.fragment),Ni=h(),yr=r("span"),Pi=a("GroupViTVisionModel"),ps=h(),De=r("div"),y(Yo.$$.fragment),qi=h(),O=r("div"),y(Lo.$$.fragment),Ai=h(),Oe=r("p"),Si=a("The "),zn=r("a"),Hi=a("GroupViTVisionModel"),Xi=a(" forward method, overrides the "),br=r("code"),Yi=a("__call__"),Li=a(" special method."),Di=h(),y(It.$$.fragment),Oi=h(),y(zt.$$.fragment),us=h(),Qe=r("h2"),Wt=r("a"),Mr=r("span"),y(Do.$$.fragment),Qi=h(),wr=r("span"),Ki=a("TFGroupViTModel"),ms=h(),U=r("div"),y(Oo.$$.fragment),el=h(),Qo=r("p"),tl=a("This model inherits from "),Wn=r("a"),ol=a("TFPreTrainedModel"),nl=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rl=h(),Ko=r("p"),sl=a("This model is also a "),en=r("a"),al=a("tf.keras.Model"),il=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ll=h(),y(Ft.$$.fragment),dl=h(),Q=r("div"),y(tn.$$.fragment),cl=h(),Ke=r("p"),pl=a("The "),Fn=r("a"),ul=a("TFGroupViTModel"),ml=a(" forward method, overrides the "),Vr=r("code"),hl=a("__call__"),fl=a(" special method."),gl=h(),y(Zt.$$.fragment),_l=h(),y(Bt.$$.fragment),Tl=h(),K=r("div"),y(on.$$.fragment),vl=h(),et=r("p"),yl=a("The "),Zn=r("a"),bl=a("TFGroupViTModel"),Ml=a(" forward method, overrides the "),$r=r("code"),wl=a("__call__"),Vl=a(" special method."),$l=h(),y(Rt.$$.fragment),Gl=h(),y(Nt.$$.fragment),kl=h(),ee=r("div"),y(nn.$$.fragment),jl=h(),tt=r("p"),xl=a("The "),Bn=r("a"),El=a("TFGroupViTModel"),Jl=a(" forward method, overrides the "),Gr=r("code"),Ul=a("__call__"),Cl=a(" special method."),Il=h(),y(Pt.$$.fragment),zl=h(),y(qt.$$.fragment),hs=h(),ot=r("h2"),At=r("a"),kr=r("span"),y(rn.$$.fragment),Wl=h(),jr=r("span"),Fl=a("TFGroupViTTextModel"),fs=h(),nt=r("div"),y(sn.$$.fragment),Zl=h(),te=r("div"),y(an.$$.fragment),Bl=h(),rt=r("p"),Rl=a("The "),Rn=r("a"),Nl=a("TFGroupViTTextModel"),Pl=a(" forward method, overrides the "),xr=r("code"),ql=a("__call__"),Al=a(" special method."),Sl=h(),y(St.$$.fragment),Hl=h(),y(Ht.$$.fragment),gs=h(),st=r("h2"),Xt=r("a"),Er=r("span"),y(ln.$$.fragment),Xl=h(),Jr=r("span"),Yl=a("TFGroupViTVisionModel"),_s=h(),at=r("div"),y(dn.$$.fragment),Ll=h(),oe=r("div"),y(cn.$$.fragment),Dl=h(),it=r("p"),Ol=a("The "),Nn=r("a"),Ql=a("TFGroupViTVisionModel"),Kl=a(" forward method, overrides the "),Ur=r("code"),ed=a("__call__"),td=a(" special method."),od=h(),y(Yt.$$.fragment),nd=h(),y(Lt.$$.fragment),this.h()},l(t){const _=Gc('[data-svelte="svelte-1phssyn"]',document.head);d=s(_,"META",{name:!0,content:!0}),_.forEach(o),v=f(t),u=s(t,"H1",{class:!0});var pn=l(u);p=s(pn,"A",{id:!0,class:!0,href:!0});var Cr=l(p);g=s(Cr,"SPAN",{});var Ir=l(g);b(n.$$.fragment,Ir),Ir.forEach(o),Cr.forEach(o),c=f(pn),k=s(pn,"SPAN",{});var zr=l(k);co=i(zr,"GroupViT"),zr.forEach(o),pn.forEach(o),Ge=f(t),E=s(t,"H2",{class:!0});var un=l(E);H=s(un,"A",{id:!0,class:!0,href:!0});var Wr=l(H);ie=s(Wr,"SPAN",{});var Fr=l(ie);b(le.$$.fragment,Fr),Fr.forEach(o),Wr.forEach(o),po=f(un),de=s(un,"SPAN",{});var Zr=l(de);uo=i(Zr,"Overview"),Zr.forEach(o),un.forEach(o),ct=f(t),z=s(t,"P",{});var lt=l(z);ue=i(lt,"The GroupViT model was proposed in "),ce=s(lt,"A",{href:!0,rel:!0});var Br=l(ce);pt=i(Br,"GroupViT: Semantic Segmentation Emerges from Text Supervision"),Br.forEach(o),Z=i(lt,` by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
Inspired by `),W=s(lt,"A",{href:!0});var Rr=l(W);mo=i(Rr,"CLIP"),Rr.forEach(o),ke=i(lt,", GroupViT is a vision-language model that can perform zero-shot semantic segmentation on any given vocabulary categories."),lt.forEach(o),ut=f(t),me=s(t,"P",{});var Nr=l(me);je=i(Nr,"The abstract from the paper is the following:"),Nr.forEach(o),mt=f(t),he=s(t,"P",{});var Pr=l(he);B=s(Pr,"EM",{});var qr=l(B);ho=i(qr,"Grouping and recognition are important components of visual scene understanding, e.g., for object detection and semantic segmentation. With end-to-end deep learning systems, grouping of image regions usually happens implicitly via top-down supervision from pixel-level recognition labels. Instead, in this paper, we propose to bring back the grouping mechanism into deep networks, which allows semantic segments to emerge automatically with only text supervision. We propose a hierarchical Grouping Vision Transformer (GroupViT), which goes beyond the regular grid structure representation and learns to group image regions into progressively larger arbitrary-shaped segments. We train GroupViT jointly with a text encoder on a large-scale image-text dataset via contrastive losses. With only text supervision and without any pixel-level annotations, GroupViT learns to group together semantic regions and successfully transfers to the task of semantic segmentation in a zero-shot manner, i.e., without any further fine-tuning. It achieves a zero-shot accuracy of 52.3% mIoU on the PASCAL VOC 2012 and 22.4% mIoU on PASCAL Context datasets, and performs competitively to state-of-the-art transfer-learning methods requiring greater levels of supervision."),qr.forEach(o),Pr.forEach(o),fe=f(t),ge=s(t,"P",{});var Ar=l(ge);fo=i(Ar,"Tips:"),Ar.forEach(o),_e=f(t),Te=s(t,"UL",{});var Sr=l(Te);P=s(Sr,"LI",{});var dt=l(P);ve=i(dt,"You may specify "),xe=s(dt,"CODE",{});var Hr=l(xe);Ee=i(Hr,"output_segmentation=True"),Hr.forEach(o),go=i(dt," in the forward of "),j=s(dt,"CODE",{});var Xr=l(j);I=i(Xr,"GroupViTModel"),Xr.forEach(o),ht=i(dt," to get the segmentation logits of input texts."),dt.forEach(o),Sr.forEach(o),_o=f(t),x=s(t,"P",{});var C=l(x);ye=i(C,"This model was contributed by "),be=s(C,"A",{href:!0,rel:!0});var Yr=l(be);hn=i(Yr,"xvjiarui"),Yr.forEach(o),fn=i(C,". The TensorFlow version was contributed by "),R=s(C,"A",{href:!0,rel:!0});var Lr=l(R);Je=i(Lr,"ariG23498"),Lr.forEach(o),gn=i(C," with the help of "),Me=s(C,"A",{href:!0,rel:!0});var Dr=l(Me);Ue=i(Dr,"Yih-Dar SHIEH"),Dr.forEach(o),_n=i(C,", "),we=s(C,"A",{href:!0,rel:!0});var rd=l(we);To=i(rd,"Amy Roberts"),rd.forEach(o),Tn=i(C,", and "),vo=s(C,"A",{href:!0,rel:!0});var sd=l(vo);Ns=i(sd,"Joao Gante"),sd.forEach(o),Ps=i(C,`.
The original code can be found `),yo=s(C,"A",{href:!0,rel:!0});var ad=l(yo);qs=i(ad,"here"),ad.forEach(o),As=i(C,"."),C.forEach(o),Or=f(t),Ce=s(t,"H2",{class:!0});var vs=l(Ce);ft=s(vs,"A",{id:!0,class:!0,href:!0});var id=l(ft);nr=s(id,"SPAN",{});var ld=l(nr);b(bo.$$.fragment,ld),ld.forEach(o),id.forEach(o),Ss=f(vs),rr=s(vs,"SPAN",{});var dd=l(rr);Hs=i(dd,"Resources"),dd.forEach(o),vs.forEach(o),Qr=f(t),vn=s(t,"P",{});var cd=l(vn);Xs=i(cd,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with GroupViT."),cd.forEach(o),Kr=f(t),gt=s(t,"UL",{});var ys=l(gt);Mo=s(ys,"LI",{});var bs=l(Mo);Ys=i(bs,"The quickest way to get started with GroupViT is by checking the "),wo=s(bs,"A",{href:!0,rel:!0});var pd=l(wo);Ls=i(pd,"example notebooks"),pd.forEach(o),Ds=i(bs," (which showcase zero-shot segmentation inference)."),bs.forEach(o),Os=f(ys),Vo=s(ys,"LI",{});var Ms=l(Vo);Qs=i(Ms,"One can also check out the "),$o=s(Ms,"A",{href:!0,rel:!0});var ud=l($o);Ks=i(ud,"HuggingFace Spaces demo"),ud.forEach(o),ea=i(Ms," to play with GroupViT."),Ms.forEach(o),ys.forEach(o),es=f(t),Ie=s(t,"H2",{class:!0});var ws=l(Ie);_t=s(ws,"A",{id:!0,class:!0,href:!0});var md=l(_t);sr=s(md,"SPAN",{});var hd=l(sr);b(Go.$$.fragment,hd),hd.forEach(o),md.forEach(o),ta=f(ws),ar=s(ws,"SPAN",{});var fd=l(ar);oa=i(fd,"GroupViTConfig"),fd.forEach(o),ws.forEach(o),ts=f(t),q=s(t,"DIV",{class:!0});var Dt=l(q);b(ko.$$.fragment,Dt),na=f(Dt),Ve=s(Dt,"P",{});var mn=l(Ve);yn=s(mn,"A",{href:!0});var gd=l(yn);ra=i(gd,"GroupViTConfig"),gd.forEach(o),sa=i(mn," is the configuration class to store the configuration of a "),bn=s(mn,"A",{href:!0});var _d=l(bn);aa=i(_d,"GroupViTModel"),_d.forEach(o),ia=i(mn,`. It is used to
instantiate a GroupViT 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 GroupViT
`),jo=s(mn,"A",{href:!0,rel:!0});var Td=l(jo);la=i(Td,"nvidia/groupvit-gcc-yfcc"),Td.forEach(o),da=i(mn," architecture."),mn.forEach(o),ca=f(Dt),ze=s(Dt,"P",{});var Pn=l(ze);pa=i(Pn,"Configuration objects inherit from "),Mn=s(Pn,"A",{href:!0});var vd=l(Mn);ua=i(vd,"PretrainedConfig"),vd.forEach(o),ma=i(Pn,` and can be used to control the model outputs. Read the
documentation from `),wn=s(Pn,"A",{href:!0});var yd=l(wn);ha=i(yd,"PretrainedConfig"),yd.forEach(o),fa=i(Pn," for more information."),Pn.forEach(o),ga=f(Dt),Tt=s(Dt,"DIV",{class:!0});var Vs=l(Tt);b(xo.$$.fragment,Vs),_a=f(Vs),Eo=s(Vs,"P",{});var $s=l(Eo);Ta=i($s,"Instantiate a "),Vn=s($s,"A",{href:!0});var bd=l(Vn);va=i(bd,"GroupViTConfig"),bd.forEach(o),ya=i($s,` (or a derived class) from groupvit text model configuration and groupvit
vision model configuration.`),$s.forEach(o),Vs.forEach(o),Dt.forEach(o),os=f(t),We=s(t,"H2",{class:!0});var Gs=l(We);vt=s(Gs,"A",{id:!0,class:!0,href:!0});var Md=l(vt);ir=s(Md,"SPAN",{});var wd=l(ir);b(Jo.$$.fragment,wd),wd.forEach(o),Md.forEach(o),ba=f(Gs),lr=s(Gs,"SPAN",{});var Vd=l(lr);Ma=i(Vd,"GroupViTTextConfig"),Vd.forEach(o),Gs.forEach(o),ns=f(t),A=s(t,"DIV",{class:!0});var Ot=l(A);b(Uo.$$.fragment,Ot),wa=f(Ot),Fe=s(Ot,"P",{});var qn=l(Fe);Va=i(qn,"This is the configuration class to store the configuration of a "),$n=s(qn,"A",{href:!0});var $d=l($n);$a=i($d,"GroupViTTextModel"),$d.forEach(o),Ga=i(qn,`. It is used to instantiate an
GroupViT model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the GroupViT
`),Co=s(qn,"A",{href:!0,rel:!0});var Gd=l(Co);ka=i(Gd,"nvidia/groupvit-gcc-yfcc"),Gd.forEach(o),ja=i(qn," architecture."),qn.forEach(o),xa=f(Ot),Ze=s(Ot,"P",{});var An=l(Ze);Ea=i(An,"Configuration objects inherit from "),Gn=s(An,"A",{href:!0});var kd=l(Gn);Ja=i(kd,"PretrainedConfig"),kd.forEach(o),Ua=i(An,` and can be used to control the model outputs. Read the
documentation from `),kn=s(An,"A",{href:!0});var jd=l(kn);Ca=i(jd,"PretrainedConfig"),jd.forEach(o),Ia=i(An," for more information."),An.forEach(o),za=f(Ot),b(yt.$$.fragment,Ot),Ot.forEach(o),rs=f(t),Be=s(t,"H2",{class:!0});var ks=l(Be);bt=s(ks,"A",{id:!0,class:!0,href:!0});var xd=l(bt);dr=s(xd,"SPAN",{});var Ed=l(dr);b(Io.$$.fragment,Ed),Ed.forEach(o),xd.forEach(o),Wa=f(ks),cr=s(ks,"SPAN",{});var Jd=l(cr);Fa=i(Jd,"GroupViTVisionConfig"),Jd.forEach(o),ks.forEach(o),ss=f(t),S=s(t,"DIV",{class:!0});var Qt=l(S);b(zo.$$.fragment,Qt),Za=f(Qt),Re=s(Qt,"P",{});var Sn=l(Re);Ba=i(Sn,"This is the configuration class to store the configuration of a "),jn=s(Sn,"A",{href:!0});var Ud=l(jn);Ra=i(Ud,"GroupViTVisionModel"),Ud.forEach(o),Na=i(Sn,`. It is used to instantiate
an GroupViT model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the GroupViT
`),Wo=s(Sn,"A",{href:!0,rel:!0});var Cd=l(Wo);Pa=i(Cd,"nvidia/groupvit-gcc-yfcc"),Cd.forEach(o),qa=i(Sn," architecture."),Sn.forEach(o),Aa=f(Qt),Ne=s(Qt,"P",{});var Hn=l(Ne);Sa=i(Hn,"Configuration objects inherit from "),xn=s(Hn,"A",{href:!0});var Id=l(xn);Ha=i(Id,"PretrainedConfig"),Id.forEach(o),Xa=i(Hn,` and can be used to control the model outputs. Read the
documentation from `),En=s(Hn,"A",{href:!0});var zd=l(En);Ya=i(zd,"PretrainedConfig"),zd.forEach(o),La=i(Hn," for more information."),Hn.forEach(o),Da=f(Qt),b(Mt.$$.fragment,Qt),Qt.forEach(o),as=f(t),Pe=s(t,"H2",{class:!0});var js=l(Pe);wt=s(js,"A",{id:!0,class:!0,href:!0});var Wd=l(wt);pr=s(Wd,"SPAN",{});var Fd=l(pr);b(Fo.$$.fragment,Fd),Fd.forEach(o),Wd.forEach(o),Oa=f(js),ur=s(js,"SPAN",{});var Zd=l(ur);Qa=i(Zd,"GroupViTModel"),Zd.forEach(o),js.forEach(o),is=f(t),F=s(t,"DIV",{class:!0});var $e=l(F);b(Zo.$$.fragment,$e),Ka=f($e),Bo=s($e,"P",{});var xs=l(Bo);ei=i(xs,"This model is a PyTorch "),Ro=s(xs,"A",{href:!0,rel:!0});var Bd=l(Ro);ti=i(Bd,"torch.nn.Module"),Bd.forEach(o),oi=i(xs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),xs.forEach(o),ni=f($e),X=s($e,"DIV",{class:!0});var Kt=l(X);b(No.$$.fragment,Kt),ri=f(Kt),qe=s(Kt,"P",{});var Xn=l(qe);si=i(Xn,"The "),Jn=s(Xn,"A",{href:!0});var Rd=l(Jn);ai=i(Rd,"GroupViTModel"),Rd.forEach(o),ii=i(Xn," forward method, overrides the "),mr=s(Xn,"CODE",{});var Nd=l(mr);li=i(Nd,"__call__"),Nd.forEach(o),di=i(Xn," special method."),Xn.forEach(o),ci=f(Kt),b(Vt.$$.fragment,Kt),pi=f(Kt),b($t.$$.fragment,Kt),Kt.forEach(o),ui=f($e),Y=s($e,"DIV",{class:!0});var eo=l(Y);b(Po.$$.fragment,eo),mi=f(eo),Ae=s(eo,"P",{});var Yn=l(Ae);hi=i(Yn,"The "),Un=s(Yn,"A",{href:!0});var Pd=l(Un);fi=i(Pd,"GroupViTModel"),Pd.forEach(o),gi=i(Yn," forward method, overrides the "),hr=s(Yn,"CODE",{});var qd=l(hr);_i=i(qd,"__call__"),qd.forEach(o),Ti=i(Yn," special method."),Yn.forEach(o),vi=f(eo),b(Gt.$$.fragment,eo),yi=f(eo),b(kt.$$.fragment,eo),eo.forEach(o),bi=f($e),L=s($e,"DIV",{class:!0});var to=l(L);b(qo.$$.fragment,to),Mi=f(to),Se=s(to,"P",{});var Ln=l(Se);wi=i(Ln,"The "),Cn=s(Ln,"A",{href:!0});var Ad=l(Cn);Vi=i(Ad,"GroupViTModel"),Ad.forEach(o),$i=i(Ln," forward method, overrides the "),fr=s(Ln,"CODE",{});var Sd=l(fr);Gi=i(Sd,"__call__"),Sd.forEach(o),ki=i(Ln," special method."),Ln.forEach(o),ji=f(to),b(jt.$$.fragment,to),xi=f(to),b(xt.$$.fragment,to),to.forEach(o),$e.forEach(o),ls=f(t),He=s(t,"H2",{class:!0});var Es=l(He);Et=s(Es,"A",{id:!0,class:!0,href:!0});var Hd=l(Et);gr=s(Hd,"SPAN",{});var Xd=l(gr);b(Ao.$$.fragment,Xd),Xd.forEach(o),Hd.forEach(o),Ei=f(Es),_r=s(Es,"SPAN",{});var Yd=l(_r);Ji=i(Yd,"GroupViTTextModel"),Yd.forEach(o),Es.forEach(o),ds=f(t),Xe=s(t,"DIV",{class:!0});var Js=l(Xe);b(So.$$.fragment,Js),Ui=f(Js),D=s(Js,"DIV",{class:!0});var oo=l(D);b(Ho.$$.fragment,oo),Ci=f(oo),Ye=s(oo,"P",{});var Dn=l(Ye);Ii=i(Dn,"The "),In=s(Dn,"A",{href:!0});var Ld=l(In);zi=i(Ld,"GroupViTTextModel"),Ld.forEach(o),Wi=i(Dn," forward method, overrides the "),Tr=s(Dn,"CODE",{});var Dd=l(Tr);Fi=i(Dd,"__call__"),Dd.forEach(o),Zi=i(Dn," special method."),Dn.forEach(o),Bi=f(oo),b(Jt.$$.fragment,oo),Ri=f(oo),b(Ut.$$.fragment,oo),oo.forEach(o),Js.forEach(o),cs=f(t),Le=s(t,"H2",{class:!0});var Us=l(Le);Ct=s(Us,"A",{id:!0,class:!0,href:!0});var Od=l(Ct);vr=s(Od,"SPAN",{});var Qd=l(vr);b(Xo.$$.fragment,Qd),Qd.forEach(o),Od.forEach(o),Ni=f(Us),yr=s(Us,"SPAN",{});var Kd=l(yr);Pi=i(Kd,"GroupViTVisionModel"),Kd.forEach(o),Us.forEach(o),ps=f(t),De=s(t,"DIV",{class:!0});var Cs=l(De);b(Yo.$$.fragment,Cs),qi=f(Cs),O=s(Cs,"DIV",{class:!0});var no=l(O);b(Lo.$$.fragment,no),Ai=f(no),Oe=s(no,"P",{});var On=l(Oe);Si=i(On,"The "),zn=s(On,"A",{href:!0});var ec=l(zn);Hi=i(ec,"GroupViTVisionModel"),ec.forEach(o),Xi=i(On," forward method, overrides the "),br=s(On,"CODE",{});var tc=l(br);Yi=i(tc,"__call__"),tc.forEach(o),Li=i(On," special method."),On.forEach(o),Di=f(no),b(It.$$.fragment,no),Oi=f(no),b(zt.$$.fragment,no),no.forEach(o),Cs.forEach(o),us=f(t),Qe=s(t,"H2",{class:!0});var Is=l(Qe);Wt=s(Is,"A",{id:!0,class:!0,href:!0});var oc=l(Wt);Mr=s(oc,"SPAN",{});var nc=l(Mr);b(Do.$$.fragment,nc),nc.forEach(o),oc.forEach(o),Qi=f(Is),wr=s(Is,"SPAN",{});var rc=l(wr);Ki=i(rc,"TFGroupViTModel"),rc.forEach(o),Is.forEach(o),ms=f(t),U=s(t,"DIV",{class:!0});var N=l(U);b(Oo.$$.fragment,N),el=f(N),Qo=s(N,"P",{});var zs=l(Qo);tl=i(zs,"This model inherits from "),Wn=s(zs,"A",{href:!0});var sc=l(Wn);ol=i(sc,"TFPreTrainedModel"),sc.forEach(o),nl=i(zs,`. 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.)`),zs.forEach(o),rl=f(N),Ko=s(N,"P",{});var Ws=l(Ko);sl=i(Ws,"This model is also a "),en=s(Ws,"A",{href:!0,rel:!0});var ac=l(en);al=i(ac,"tf.keras.Model"),ac.forEach(o),il=i(Ws,` 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.`),Ws.forEach(o),ll=f(N),b(Ft.$$.fragment,N),dl=f(N),Q=s(N,"DIV",{class:!0});var ro=l(Q);b(tn.$$.fragment,ro),cl=f(ro),Ke=s(ro,"P",{});var Qn=l(Ke);pl=i(Qn,"The "),Fn=s(Qn,"A",{href:!0});var ic=l(Fn);ul=i(ic,"TFGroupViTModel"),ic.forEach(o),ml=i(Qn," forward method, overrides the "),Vr=s(Qn,"CODE",{});var lc=l(Vr);hl=i(lc,"__call__"),lc.forEach(o),fl=i(Qn," special method."),Qn.forEach(o),gl=f(ro),b(Zt.$$.fragment,ro),_l=f(ro),b(Bt.$$.fragment,ro),ro.forEach(o),Tl=f(N),K=s(N,"DIV",{class:!0});var so=l(K);b(on.$$.fragment,so),vl=f(so),et=s(so,"P",{});var Kn=l(et);yl=i(Kn,"The "),Zn=s(Kn,"A",{href:!0});var dc=l(Zn);bl=i(dc,"TFGroupViTModel"),dc.forEach(o),Ml=i(Kn," forward method, overrides the "),$r=s(Kn,"CODE",{});var cc=l($r);wl=i(cc,"__call__"),cc.forEach(o),Vl=i(Kn," special method."),Kn.forEach(o),$l=f(so),b(Rt.$$.fragment,so),Gl=f(so),b(Nt.$$.fragment,so),so.forEach(o),kl=f(N),ee=s(N,"DIV",{class:!0});var ao=l(ee);b(nn.$$.fragment,ao),jl=f(ao),tt=s(ao,"P",{});var er=l(tt);xl=i(er,"The "),Bn=s(er,"A",{href:!0});var pc=l(Bn);El=i(pc,"TFGroupViTModel"),pc.forEach(o),Jl=i(er," forward method, overrides the "),Gr=s(er,"CODE",{});var uc=l(Gr);Ul=i(uc,"__call__"),uc.forEach(o),Cl=i(er," special method."),er.forEach(o),Il=f(ao),b(Pt.$$.fragment,ao),zl=f(ao),b(qt.$$.fragment,ao),ao.forEach(o),N.forEach(o),hs=f(t),ot=s(t,"H2",{class:!0});var Fs=l(ot);At=s(Fs,"A",{id:!0,class:!0,href:!0});var mc=l(At);kr=s(mc,"SPAN",{});var hc=l(kr);b(rn.$$.fragment,hc),hc.forEach(o),mc.forEach(o),Wl=f(Fs),jr=s(Fs,"SPAN",{});var fc=l(jr);Fl=i(fc,"TFGroupViTTextModel"),fc.forEach(o),Fs.forEach(o),fs=f(t),nt=s(t,"DIV",{class:!0});var Zs=l(nt);b(sn.$$.fragment,Zs),Zl=f(Zs),te=s(Zs,"DIV",{class:!0});var io=l(te);b(an.$$.fragment,io),Bl=f(io),rt=s(io,"P",{});var tr=l(rt);Rl=i(tr,"The "),Rn=s(tr,"A",{href:!0});var gc=l(Rn);Nl=i(gc,"TFGroupViTTextModel"),gc.forEach(o),Pl=i(tr," forward method, overrides the "),xr=s(tr,"CODE",{});var _c=l(xr);ql=i(_c,"__call__"),_c.forEach(o),Al=i(tr," special method."),tr.forEach(o),Sl=f(io),b(St.$$.fragment,io),Hl=f(io),b(Ht.$$.fragment,io),io.forEach(o),Zs.forEach(o),gs=f(t),st=s(t,"H2",{class:!0});var Bs=l(st);Xt=s(Bs,"A",{id:!0,class:!0,href:!0});var Tc=l(Xt);Er=s(Tc,"SPAN",{});var vc=l(Er);b(ln.$$.fragment,vc),vc.forEach(o),Tc.forEach(o),Xl=f(Bs),Jr=s(Bs,"SPAN",{});var yc=l(Jr);Yl=i(yc,"TFGroupViTVisionModel"),yc.forEach(o),Bs.forEach(o),_s=f(t),at=s(t,"DIV",{class:!0});var Rs=l(at);b(dn.$$.fragment,Rs),Ll=f(Rs),oe=s(Rs,"DIV",{class:!0});var lo=l(oe);b(cn.$$.fragment,lo),Dl=f(lo),it=s(lo,"P",{});var or=l(it);Ol=i(or,"The "),Nn=s(or,"A",{href:!0});var bc=l(Nn);Ql=i(bc,"TFGroupViTVisionModel"),bc.forEach(o),Kl=i(or," forward method, overrides the "),Ur=s(or,"CODE",{});var Mc=l(Ur);ed=i(Mc,"__call__"),Mc.forEach(o),td=i(or," special method."),or.forEach(o),od=f(lo),b(Yt.$$.fragment,lo),nd=f(lo),b(Lt.$$.fragment,lo),lo.forEach(o),Rs.forEach(o),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Qc)),m(p,"id","groupvit"),m(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"),m(p,"href","#groupvit"),m(u,"class","relative group"),m(H,"id","overview"),m(H,"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"),m(H,"href","#overview"),m(E,"class","relative group"),m(ce,"href","https://arxiv.org/abs/2202.11094"),m(ce,"rel","nofollow"),m(W,"href","clip"),m(be,"href","https://huggingface.co/xvjiarui"),m(be,"rel","nofollow"),m(R,"href","https://huggingface.co/ariG23498"),m(R,"rel","nofollow"),m(Me,"href","https://huggingface.co/ydshieh"),m(Me,"rel","nofollow"),m(we,"href","https://huggingface.co/amyeroberts"),m(we,"rel","nofollow"),m(vo,"href","https://huggingface.co/joaogante"),m(vo,"rel","nofollow"),m(yo,"href","https://github.com/NVlabs/GroupViT"),m(yo,"rel","nofollow"),m(ft,"id","resources"),m(ft,"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"),m(ft,"href","#resources"),m(Ce,"class","relative group"),m(wo,"href","https://github.com/xvjiarui/GroupViT/blob/main/demo/GroupViT_hf_inference_notebook.ipynb"),m(wo,"rel","nofollow"),m($o,"href","https://huggingface.co/spaces/xvjiarui/GroupViT"),m($o,"rel","nofollow"),m(_t,"id","transformers.GroupViTConfig"),m(_t,"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"),m(_t,"href","#transformers.GroupViTConfig"),m(Ie,"class","relative group"),m(yn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTConfig"),m(bn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTModel"),m(jo,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),m(jo,"rel","nofollow"),m(Mn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(wn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(Vn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTConfig"),m(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(vt,"id","transformers.GroupViTTextConfig"),m(vt,"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"),m(vt,"href","#transformers.GroupViTTextConfig"),m(We,"class","relative group"),m($n,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextModel"),m(Co,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),m(Co,"rel","nofollow"),m(Gn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(kn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(bt,"id","transformers.GroupViTVisionConfig"),m(bt,"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"),m(bt,"href","#transformers.GroupViTVisionConfig"),m(Be,"class","relative group"),m(jn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"),m(Wo,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),m(Wo,"rel","nofollow"),m(xn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(En,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wt,"id","transformers.GroupViTModel"),m(wt,"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"),m(wt,"href","#transformers.GroupViTModel"),m(Pe,"class","relative group"),m(Ro,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ro,"rel","nofollow"),m(Jn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTModel"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Un,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTModel"),m(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Cn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTModel"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Et,"id","transformers.GroupViTTextModel"),m(Et,"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"),m(Et,"href","#transformers.GroupViTTextModel"),m(He,"class","relative group"),m(In,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTTextModel"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ct,"id","transformers.GroupViTVisionModel"),m(Ct,"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"),m(Ct,"href","#transformers.GroupViTVisionModel"),m(Le,"class","relative group"),m(zn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"),m(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Wt,"id","transformers.TFGroupViTModel"),m(Wt,"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"),m(Wt,"href","#transformers.TFGroupViTModel"),m(Qe,"class","relative group"),m(Wn,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),m(en,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(en,"rel","nofollow"),m(Fn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Zn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Bn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),m(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(At,"id","transformers.TFGroupViTTextModel"),m(At,"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"),m(At,"href","#transformers.TFGroupViTTextModel"),m(ot,"class","relative group"),m(Rn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTTextModel"),m(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xt,"id","transformers.TFGroupViTVisionModel"),m(Xt,"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"),m(Xt,"href","#transformers.TFGroupViTVisionModel"),m(st,"class","relative group"),m(Nn,"href","/docs/transformers/v4.30.0/en/model_doc/groupvit#transformers.TFGroupViTVisionModel"),m(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(at,"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,_){e(document.head,d),T(t,v,_),T(t,u,_),e(u,p),e(p,g),M(n,g,null),e(u,c),e(u,k),e(k,co),T(t,Ge,_),T(t,E,_),e(E,H),e(H,ie),M(le,ie,null),e(E,po),e(E,de),e(de,uo),T(t,ct,_),T(t,z,_),e(z,ue),e(z,ce),e(ce,pt),e(z,Z),e(z,W),e(W,mo),e(z,ke),T(t,ut,_),T(t,me,_),e(me,je),T(t,mt,_),T(t,he,_),e(he,B),e(B,ho),T(t,fe,_),T(t,ge,_),e(ge,fo),T(t,_e,_),T(t,Te,_),e(Te,P),e(P,ve),e(P,xe),e(xe,Ee),e(P,go),e(P,j),e(j,I),e(P,ht),T(t,_o,_),T(t,x,_),e(x,ye),e(x,be),e(be,hn),e(x,fn),e(x,R),e(R,Je),e(x,gn),e(x,Me),e(Me,Ue),e(x,_n),e(x,we),e(we,To),e(x,Tn),e(x,vo),e(vo,Ns),e(x,Ps),e(x,yo),e(yo,qs),e(x,As),T(t,Or,_),T(t,Ce,_),e(Ce,ft),e(ft,nr),M(bo,nr,null),e(Ce,Ss),e(Ce,rr),e(rr,Hs),T(t,Qr,_),T(t,vn,_),e(vn,Xs),T(t,Kr,_),T(t,gt,_),e(gt,Mo),e(Mo,Ys),e(Mo,wo),e(wo,Ls),e(Mo,Ds),e(gt,Os),e(gt,Vo),e(Vo,Qs),e(Vo,$o),e($o,Ks),e(Vo,ea),T(t,es,_),T(t,Ie,_),e(Ie,_t),e(_t,sr),M(Go,sr,null),e(Ie,ta),e(Ie,ar),e(ar,oa),T(t,ts,_),T(t,q,_),M(ko,q,null),e(q,na),e(q,Ve),e(Ve,yn),e(yn,ra),e(Ve,sa),e(Ve,bn),e(bn,aa),e(Ve,ia),e(Ve,jo),e(jo,la),e(Ve,da),e(q,ca),e(q,ze),e(ze,pa),e(ze,Mn),e(Mn,ua),e(ze,ma),e(ze,wn),e(wn,ha),e(ze,fa),e(q,ga),e(q,Tt),M(xo,Tt,null),e(Tt,_a),e(Tt,Eo),e(Eo,Ta),e(Eo,Vn),e(Vn,va),e(Eo,ya),T(t,os,_),T(t,We,_),e(We,vt),e(vt,ir),M(Jo,ir,null),e(We,ba),e(We,lr),e(lr,Ma),T(t,ns,_),T(t,A,_),M(Uo,A,null),e(A,wa),e(A,Fe),e(Fe,Va),e(Fe,$n),e($n,$a),e(Fe,Ga),e(Fe,Co),e(Co,ka),e(Fe,ja),e(A,xa),e(A,Ze),e(Ze,Ea),e(Ze,Gn),e(Gn,Ja),e(Ze,Ua),e(Ze,kn),e(kn,Ca),e(Ze,Ia),e(A,za),M(yt,A,null),T(t,rs,_),T(t,Be,_),e(Be,bt),e(bt,dr),M(Io,dr,null),e(Be,Wa),e(Be,cr),e(cr,Fa),T(t,ss,_),T(t,S,_),M(zo,S,null),e(S,Za),e(S,Re),e(Re,Ba),e(Re,jn),e(jn,Ra),e(Re,Na),e(Re,Wo),e(Wo,Pa),e(Re,qa),e(S,Aa),e(S,Ne),e(Ne,Sa),e(Ne,xn),e(xn,Ha),e(Ne,Xa),e(Ne,En),e(En,Ya),e(Ne,La),e(S,Da),M(Mt,S,null),T(t,as,_),T(t,Pe,_),e(Pe,wt),e(wt,pr),M(Fo,pr,null),e(Pe,Oa),e(Pe,ur),e(ur,Qa),T(t,is,_),T(t,F,_),M(Zo,F,null),e(F,Ka),e(F,Bo),e(Bo,ei),e(Bo,Ro),e(Ro,ti),e(Bo,oi),e(F,ni),e(F,X),M(No,X,null),e(X,ri),e(X,qe),e(qe,si),e(qe,Jn),e(Jn,ai),e(qe,ii),e(qe,mr),e(mr,li),e(qe,di),e(X,ci),M(Vt,X,null),e(X,pi),M($t,X,null),e(F,ui),e(F,Y),M(Po,Y,null),e(Y,mi),e(Y,Ae),e(Ae,hi),e(Ae,Un),e(Un,fi),e(Ae,gi),e(Ae,hr),e(hr,_i),e(Ae,Ti),e(Y,vi),M(Gt,Y,null),e(Y,yi),M(kt,Y,null),e(F,bi),e(F,L),M(qo,L,null),e(L,Mi),e(L,Se),e(Se,wi),e(Se,Cn),e(Cn,Vi),e(Se,$i),e(Se,fr),e(fr,Gi),e(Se,ki),e(L,ji),M(jt,L,null),e(L,xi),M(xt,L,null),T(t,ls,_),T(t,He,_),e(He,Et),e(Et,gr),M(Ao,gr,null),e(He,Ei),e(He,_r),e(_r,Ji),T(t,ds,_),T(t,Xe,_),M(So,Xe,null),e(Xe,Ui),e(Xe,D),M(Ho,D,null),e(D,Ci),e(D,Ye),e(Ye,Ii),e(Ye,In),e(In,zi),e(Ye,Wi),e(Ye,Tr),e(Tr,Fi),e(Ye,Zi),e(D,Bi),M(Jt,D,null),e(D,Ri),M(Ut,D,null),T(t,cs,_),T(t,Le,_),e(Le,Ct),e(Ct,vr),M(Xo,vr,null),e(Le,Ni),e(Le,yr),e(yr,Pi),T(t,ps,_),T(t,De,_),M(Yo,De,null),e(De,qi),e(De,O),M(Lo,O,null),e(O,Ai),e(O,Oe),e(Oe,Si),e(Oe,zn),e(zn,Hi),e(Oe,Xi),e(Oe,br),e(br,Yi),e(Oe,Li),e(O,Di),M(It,O,null),e(O,Oi),M(zt,O,null),T(t,us,_),T(t,Qe,_),e(Qe,Wt),e(Wt,Mr),M(Do,Mr,null),e(Qe,Qi),e(Qe,wr),e(wr,Ki),T(t,ms,_),T(t,U,_),M(Oo,U,null),e(U,el),e(U,Qo),e(Qo,tl),e(Qo,Wn),e(Wn,ol),e(Qo,nl),e(U,rl),e(U,Ko),e(Ko,sl),e(Ko,en),e(en,al),e(Ko,il),e(U,ll),M(Ft,U,null),e(U,dl),e(U,Q),M(tn,Q,null),e(Q,cl),e(Q,Ke),e(Ke,pl),e(Ke,Fn),e(Fn,ul),e(Ke,ml),e(Ke,Vr),e(Vr,hl),e(Ke,fl),e(Q,gl),M(Zt,Q,null),e(Q,_l),M(Bt,Q,null),e(U,Tl),e(U,K),M(on,K,null),e(K,vl),e(K,et),e(et,yl),e(et,Zn),e(Zn,bl),e(et,Ml),e(et,$r),e($r,wl),e(et,Vl),e(K,$l),M(Rt,K,null),e(K,Gl),M(Nt,K,null),e(U,kl),e(U,ee),M(nn,ee,null),e(ee,jl),e(ee,tt),e(tt,xl),e(tt,Bn),e(Bn,El),e(tt,Jl),e(tt,Gr),e(Gr,Ul),e(tt,Cl),e(ee,Il),M(Pt,ee,null),e(ee,zl),M(qt,ee,null),T(t,hs,_),T(t,ot,_),e(ot,At),e(At,kr),M(rn,kr,null),e(ot,Wl),e(ot,jr),e(jr,Fl),T(t,fs,_),T(t,nt,_),M(sn,nt,null),e(nt,Zl),e(nt,te),M(an,te,null),e(te,Bl),e(te,rt),e(rt,Rl),e(rt,Rn),e(Rn,Nl),e(rt,Pl),e(rt,xr),e(xr,ql),e(rt,Al),e(te,Sl),M(St,te,null),e(te,Hl),M(Ht,te,null),T(t,gs,_),T(t,st,_),e(st,Xt),e(Xt,Er),M(ln,Er,null),e(st,Xl),e(st,Jr),e(Jr,Yl),T(t,_s,_),T(t,at,_),M(dn,at,null),e(at,Ll),e(at,oe),M(cn,oe,null),e(oe,Dl),e(oe,it),e(it,Ol),e(it,Nn),e(Nn,Ql),e(it,Kl),e(it,Ur),e(Ur,ed),e(it,td),e(oe,od),M(Yt,oe,null),e(oe,nd),M(Lt,oe,null),Ts=!0},p(t,[_]){const pn={};_&2&&(pn.$$scope={dirty:_,ctx:t}),yt.$set(pn);const Cr={};_&2&&(Cr.$$scope={dirty:_,ctx:t}),Mt.$set(Cr);const Ir={};_&2&&(Ir.$$scope={dirty:_,ctx:t}),Vt.$set(Ir);const zr={};_&2&&(zr.$$scope={dirty:_,ctx:t}),$t.$set(zr);const un={};_&2&&(un.$$scope={dirty:_,ctx:t}),Gt.$set(un);const Wr={};_&2&&(Wr.$$scope={dirty:_,ctx:t}),kt.$set(Wr);const Fr={};_&2&&(Fr.$$scope={dirty:_,ctx:t}),jt.$set(Fr);const Zr={};_&2&&(Zr.$$scope={dirty:_,ctx:t}),xt.$set(Zr);const lt={};_&2&&(lt.$$scope={dirty:_,ctx:t}),Jt.$set(lt);const Br={};_&2&&(Br.$$scope={dirty:_,ctx:t}),Ut.$set(Br);const Rr={};_&2&&(Rr.$$scope={dirty:_,ctx:t}),It.$set(Rr);const Nr={};_&2&&(Nr.$$scope={dirty:_,ctx:t}),zt.$set(Nr);const Pr={};_&2&&(Pr.$$scope={dirty:_,ctx:t}),Ft.$set(Pr);const qr={};_&2&&(qr.$$scope={dirty:_,ctx:t}),Zt.$set(qr);const Ar={};_&2&&(Ar.$$scope={dirty:_,ctx:t}),Bt.$set(Ar);const Sr={};_&2&&(Sr.$$scope={dirty:_,ctx:t}),Rt.$set(Sr);const dt={};_&2&&(dt.$$scope={dirty:_,ctx:t}),Nt.$set(dt);const Hr={};_&2&&(Hr.$$scope={dirty:_,ctx:t}),Pt.$set(Hr);const Xr={};_&2&&(Xr.$$scope={dirty:_,ctx:t}),qt.$set(Xr);const C={};_&2&&(C.$$scope={dirty:_,ctx:t}),St.$set(C);const Yr={};_&2&&(Yr.$$scope={dirty:_,ctx:t}),Ht.$set(Yr);const Lr={};_&2&&(Lr.$$scope={dirty:_,ctx:t}),Yt.$set(Lr);const Dr={};_&2&&(Dr.$$scope={dirty:_,ctx:t}),Lt.$set(Dr)},i(t){Ts||(w(n.$$.fragment,t),w(le.$$.fragment,t),w(bo.$$.fragment,t),w(Go.$$.fragment,t),w(ko.$$.fragment,t),w(xo.$$.fragment,t),w(Jo.$$.fragment,t),w(Uo.$$.fragment,t),w(yt.$$.fragment,t),w(Io.$$.fragment,t),w(zo.$$.fragment,t),w(Mt.$$.fragment,t),w(Fo.$$.fragment,t),w(Zo.$$.fragment,t),w(No.$$.fragment,t),w(Vt.$$.fragment,t),w($t.$$.fragment,t),w(Po.$$.fragment,t),w(Gt.$$.fragment,t),w(kt.$$.fragment,t),w(qo.$$.fragment,t),w(jt.$$.fragment,t),w(xt.$$.fragment,t),w(Ao.$$.fragment,t),w(So.$$.fragment,t),w(Ho.$$.fragment,t),w(Jt.$$.fragment,t),w(Ut.$$.fragment,t),w(Xo.$$.fragment,t),w(Yo.$$.fragment,t),w(Lo.$$.fragment,t),w(It.$$.fragment,t),w(zt.$$.fragment,t),w(Do.$$.fragment,t),w(Oo.$$.fragment,t),w(Ft.$$.fragment,t),w(tn.$$.fragment,t),w(Zt.$$.fragment,t),w(Bt.$$.fragment,t),w(on.$$.fragment,t),w(Rt.$$.fragment,t),w(Nt.$$.fragment,t),w(nn.$$.fragment,t),w(Pt.$$.fragment,t),w(qt.$$.fragment,t),w(rn.$$.fragment,t),w(sn.$$.fragment,t),w(an.$$.fragment,t),w(St.$$.fragment,t),w(Ht.$$.fragment,t),w(ln.$$.fragment,t),w(dn.$$.fragment,t),w(cn.$$.fragment,t),w(Yt.$$.fragment,t),w(Lt.$$.fragment,t),Ts=!0)},o(t){V(n.$$.fragment,t),V(le.$$.fragment,t),V(bo.$$.fragment,t),V(Go.$$.fragment,t),V(ko.$$.fragment,t),V(xo.$$.fragment,t),V(Jo.$$.fragment,t),V(Uo.$$.fragment,t),V(yt.$$.fragment,t),V(Io.$$.fragment,t),V(zo.$$.fragment,t),V(Mt.$$.fragment,t),V(Fo.$$.fragment,t),V(Zo.$$.fragment,t),V(No.$$.fragment,t),V(Vt.$$.fragment,t),V($t.$$.fragment,t),V(Po.$$.fragment,t),V(Gt.$$.fragment,t),V(kt.$$.fragment,t),V(qo.$$.fragment,t),V(jt.$$.fragment,t),V(xt.$$.fragment,t),V(Ao.$$.fragment,t),V(So.$$.fragment,t),V(Ho.$$.fragment,t),V(Jt.$$.fragment,t),V(Ut.$$.fragment,t),V(Xo.$$.fragment,t),V(Yo.$$.fragment,t),V(Lo.$$.fragment,t),V(It.$$.fragment,t),V(zt.$$.fragment,t),V(Do.$$.fragment,t),V(Oo.$$.fragment,t),V(Ft.$$.fragment,t),V(tn.$$.fragment,t),V(Zt.$$.fragment,t),V(Bt.$$.fragment,t),V(on.$$.fragment,t),V(Rt.$$.fragment,t),V(Nt.$$.fragment,t),V(nn.$$.fragment,t),V(Pt.$$.fragment,t),V(qt.$$.fragment,t),V(rn.$$.fragment,t),V(sn.$$.fragment,t),V(an.$$.fragment,t),V(St.$$.fragment,t),V(Ht.$$.fragment,t),V(ln.$$.fragment,t),V(dn.$$.fragment,t),V(cn.$$.fragment,t),V(Yt.$$.fragment,t),V(Lt.$$.fragment,t),Ts=!1},d(t){o(d),t&&o(v),t&&o(u),$(n),t&&o(Ge),t&&o(E),$(le),t&&o(ct),t&&o(z),t&&o(ut),t&&o(me),t&&o(mt),t&&o(he),t&&o(fe),t&&o(ge),t&&o(_e),t&&o(Te),t&&o(_o),t&&o(x),t&&o(Or),t&&o(Ce),$(bo),t&&o(Qr),t&&o(vn),t&&o(Kr),t&&o(gt),t&&o(es),t&&o(Ie),$(Go),t&&o(ts),t&&o(q),$(ko),$(xo),t&&o(os),t&&o(We),$(Jo),t&&o(ns),t&&o(A),$(Uo),$(yt),t&&o(rs),t&&o(Be),$(Io),t&&o(ss),t&&o(S),$(zo),$(Mt),t&&o(as),t&&o(Pe),$(Fo),t&&o(is),t&&o(F),$(Zo),$(No),$(Vt),$($t),$(Po),$(Gt),$(kt),$(qo),$(jt),$(xt),t&&o(ls),t&&o(He),$(Ao),t&&o(ds),t&&o(Xe),$(So),$(Ho),$(Jt),$(Ut),t&&o(cs),t&&o(Le),$(Xo),t&&o(ps),t&&o(De),$(Yo),$(Lo),$(It),$(zt),t&&o(us),t&&o(Qe),$(Do),t&&o(ms),t&&o(U),$(Oo),$(Ft),$(tn),$(Zt),$(Bt),$(on),$(Rt),$(Nt),$(nn),$(Pt),$(qt),t&&o(hs),t&&o(ot),$(rn),t&&o(fs),t&&o(nt),$(sn),$(an),$(St),$(Ht),t&&o(gs),t&&o(st),$(ln),t&&o(_s),t&&o(at),$(dn),$(cn),$(Yt),$(Lt)}}}const Qc={local:"groupvit",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.GroupViTConfig",title:"GroupViTConfig"},{local:"transformers.GroupViTTextConfig",title:"GroupViTTextConfig"},{local:"transformers.GroupViTVisionConfig",title:"GroupViTVisionConfig"},{local:"transformers.GroupViTModel",title:"GroupViTModel"},{local:"transformers.GroupViTTextModel",title:"GroupViTTextModel"},{local:"transformers.GroupViTVisionModel",title:"GroupViTVisionModel"},{local:"transformers.TFGroupViTModel",title:"TFGroupViTModel"},{local:"transformers.TFGroupViTTextModel",title:"TFGroupViTTextModel"},{local:"transformers.TFGroupViTVisionModel",title:"TFGroupViTVisionModel"}],title:"GroupViT"};function Kc(G){return kc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ap extends wc{constructor(d){super();Vc(this,d,Kc,Oc,$c,{})}}export{ap as default,Qc as metadata};
