import{S as wp,i as Vp,s as xp,e as r,k as m,w as $,t as a,M as kp,c as s,d as o,m as h,a as l,x as y,h as i,b as f,G as e,g as T,y as b,q as w,o as V,B as x,v as Gp,L as se}from"../../chunks/vendor-hf-doc-builder.js";import{T as ce}from"../../chunks/Tip-hf-doc-builder.js";import{D as P}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 Mp(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import GroupViTTextConfig, GroupViTTextModel

# Initializing a GroupViTTextModel with nvidia/groupvit-gcc-yfcc style configuration
configuration = GroupViTTextConfig()

model = GroupViTTextModel(configuration)

# Accessing the model configuration
configuration = model.config`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Example:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function jp(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import GroupViTVisionConfig, GroupViTVisionModel

# Initializing a GroupViTVisionModel with nvidia/groupvit-gcc-yfcc style configuration
configuration = GroupViTVisionConfig()

model = GroupViTVisionModel(configuration)

# Accessing the model configuration
configuration = model.config`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Example:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Ep(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Pp(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, GroupViTModel

model = GroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True
)

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function zp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function qp(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import CLIPTokenizer, GroupViTModel

model = GroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
tokenizer = CLIPTokenizer.from_pretrained("nvidia/groupvit-gcc-yfcc")

inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="pt")
text_features = model.get_text_features(**inputs)`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Fp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Cp(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, GroupViTModel

model = GroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="pt")

image_features = model.get_image_features(**inputs)`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Ip(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Ap(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import CLIPTokenizer, GroupViTTextModel

tokenizer = CLIPTokenizer.from_pretrained("nvidia/groupvit-gcc-yfcc")
model = GroupViTTextModel.from_pretrained("nvidia/groupvit-gcc-yfcc")

inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled (EOS token) states`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Dp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Op(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, GroupViTVisionModel

processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")
model = GroupViTVisionModel.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled CLS states`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Lp(k){let d,v,u,c,g,n,p,G,po,ke,E,U,ie,le,co,de,uo,pt,C,ue,pe,ct,D,I,fo,Ge,ut,fe,Me,ft,me,O,mo,he,ge,ho,_e,Te,S,ve,je,Ee,go;return{c(){d=r("p"),v=a("TF 2.0 models accepts two formats as inputs:"),u=m(),c=r("ul"),g=r("li"),n=a("having all inputs as keyword arguments (like PyTorch models), or"),p=m(),G=r("li"),po=a("having all inputs as a list, tuple or dict in the first positional arguments."),ke=m(),E=r("p"),U=a("This second option is useful when using "),ie=r("code"),le=a("tf.keras.Model.fit"),co=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)"),pt=a("."),C=m(),ue=r("p"),pe=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 :`),ct=m(),D=r("ul"),I=r("li"),fo=a("a single Tensor with "),Ge=r("code"),ut=a("input_ids"),fe=a(" only and nothing else: "),Me=r("code"),ft=a("model(input_ids)"),me=m(),O=r("li"),mo=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),he=r("code"),ge=a("model([input_ids, attention_mask])"),ho=a(" or "),_e=r("code"),Te=a("model([input_ids, attention_mask, token_type_ids])"),S=m(),ve=r("li"),je=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(M){d=s(M,"P",{});var F=l(d);v=i(F,"TF 2.0 models accepts two formats as inputs:"),F.forEach(o),u=h(M),c=s(M,"UL",{});var mt=l(c);g=s(mt,"LI",{});var _o=l(g);n=i(_o,"having all inputs as keyword arguments (like PyTorch models), or"),_o.forEach(o),p=h(mt),G=s(mt,"LI",{});var j=l(G);po=i(j,"having all inputs as a list, tuple or dict in the first positional arguments."),j.forEach(o),mt.forEach(o),ke=h(M),E=s(M,"P",{});var $e=l(E);U=i($e,"This second option is useful when using "),ie=s($e,"CODE",{});var ye=l(ie);le=i(ye,"tf.keras.Model.fit"),ye.forEach(o),co=i($e,` method which currently requires having all the
tensors in the first argument of the model call function: `),de=s($e,"CODE",{});var mn=l(de);uo=i(mn,"model(inputs)"),mn.forEach(o),pt=i($e,"."),$e.forEach(o),C=h(M),ue=s(M,"P",{});var hn=l(ue);pe=i(hn,`If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :`),hn.forEach(o),ct=h(M),D=s(M,"UL",{});var L=l(D);I=s(L,"LI",{});var Pe=l(I);fo=i(Pe,"a single Tensor with "),Ge=s(Pe,"CODE",{});var gn=l(Ge);ut=i(gn,"input_ids"),gn.forEach(o),fe=i(Pe," only and nothing else: "),Me=s(Pe,"CODE",{});var be=l(Me);ft=i(be,"model(input_ids)"),be.forEach(o),Pe.forEach(o),me=h(L),O=s(L,"LI",{});var ze=l(O);mo=i(ze,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),he=s(ze,"CODE",{});var _n=l(he);ge=i(_n,"model([input_ids, attention_mask])"),_n.forEach(o),ho=i(ze," or "),_e=s(ze,"CODE",{});var we=l(_e);Te=i(we,"model([input_ids, attention_mask, token_type_ids])"),we.forEach(o),ze.forEach(o),S=h(L),ve=s(L,"LI",{});var To=l(ve);je=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),L.forEach(o)},m(M,F){T(M,d,F),e(d,v),T(M,u,F),T(M,c,F),e(c,g),e(g,n),e(c,p),e(c,G),e(G,po),T(M,ke,F),T(M,E,F),e(E,U),e(E,ie),e(ie,le),e(E,co),e(E,de),e(de,uo),e(E,pt),T(M,C,F),T(M,ue,F),e(ue,pe),T(M,ct,F),T(M,D,F),e(D,I),e(I,fo),e(I,Ge),e(Ge,ut),e(I,fe),e(I,Me),e(Me,ft),e(D,me),e(D,O),e(O,mo),e(O,he),e(he,ge),e(O,ho),e(O,_e),e(_e,Te),e(D,S),e(D,ve),e(ve,je),e(ve,Ee),e(Ee,go)},d(M){M&&o(d),M&&o(u),M&&o(c),M&&o(ke),M&&o(E),M&&o(C),M&&o(ue),M&&o(ct),M&&o(D)}}}function Np(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Sp(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, TFGroupViTModel
import tensorflow as tf

model = TFGroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="tf", padding=True
)

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = tf.math.softmax(logits_per_image, axis=1)  # we can take the softmax to get the label probabilities`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Wp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Bp(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import CLIPTokenizer, TFGroupViTModel

model = TFGroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
tokenizer = CLIPTokenizer.from_pretrained("nvidia/groupvit-gcc-yfcc")

inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="tf")
text_features = model.get_text_features(**inputs)`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Hp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Up(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, TFGroupViTModel

model = TFGroupViTModel.from_pretrained("nvidia/groupvit-gcc-yfcc")
processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="tf")

image_features = model.get_image_features(**inputs)`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Kp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Rp(k){let d,v,u,c,g;return c=new ae({props:{code:`from transformers import CLIPTokenizer, TFGroupViTTextModel

tokenizer = CLIPTokenizer.from_pretrained("nvidia/groupvit-gcc-yfcc")
model = TFGroupViTTextModel.from_pretrained("nvidia/groupvit-gcc-yfcc")

inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="tf")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled (EOS token) states`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Jp(k){let d,v,u,c,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"),c=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 p=l(d);v=i(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(p,"CODE",{});var G=l(u);c=i(G,"Module"),G.forEach(o),g=i(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){T(n,d,p),e(d,v),e(d,u),e(u,c),e(d,g)},d(n){n&&o(d)}}}function Yp(k){let d,v,u,c,g;return c=new ae({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, TFGroupViTVisionModel

processor = AutoProcessor.from_pretrained("nvidia/groupvit-gcc-yfcc")
model = TFGroupViTVisionModel.from_pretrained("nvidia/groupvit-gcc-yfcc")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="tf")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled CLS states`,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=m(),$(c.$$.fragment)},l(n){d=s(n,"P",{});var p=l(d);v=i(p,"Examples:"),p.forEach(o),u=h(n),y(c.$$.fragment,n)},m(n,p){T(n,d,p),e(d,v),T(n,u,p),b(c,n,p),g=!0},p:se,i(n){g||(w(c.$$.fragment,n),g=!0)},o(n){V(c.$$.fragment,n),g=!1},d(n){n&&o(d),n&&o(u),x(c,n)}}}function Xp(k){let d,v,u,c,g,n,p,G,po,ke,E,U,ie,le,co,de,uo,pt,C,ue,pe,ct,D,I,fo,Ge,ut,fe,Me,ft,me,O,mo,he,ge,ho,_e,Te,S,ve,je,Ee,go,M,F,mt,_o,j,$e,ye,mn,hn,L,Pe,gn,be,ze,_n,we,To,Tn,vo,Ns,Ss,$o,Ws,Bs,Xr,qe,ht,nr,yo,Hs,rr,Us,Qr,vn,Ks,Zr,gt,bo,Rs,wo,Js,Ys,Xs,Vo,Qs,xo,Zs,ea,es,Fe,_t,sr,ko,ta,ar,oa,ts,W,Go,na,Ve,$n,ra,sa,yn,aa,ia,Mo,la,da,pa,Ce,ca,bn,ua,fa,wn,ma,ha,ga,Tt,jo,_a,Eo,Ta,Vn,va,$a,os,Ie,vt,ir,Po,ya,lr,ba,ns,B,zo,wa,Ae,Va,xn,xa,ka,qo,Ga,Ma,ja,De,Ea,kn,Pa,za,Gn,qa,Fa,Ca,$t,rs,Oe,yt,dr,Fo,Ia,pr,Aa,ss,H,Co,Da,Le,Oa,Mn,La,Na,Io,Sa,Wa,Ba,Ne,Ha,jn,Ua,Ka,En,Ra,Ja,Ya,bt,as,Se,wt,cr,Ao,Xa,ur,Qa,is,A,Do,Za,Oo,ei,Lo,ti,oi,ni,K,No,ri,We,si,Pn,ai,ii,fr,li,di,pi,Vt,ci,xt,ui,R,So,fi,Be,mi,zn,hi,gi,mr,_i,Ti,vi,kt,$i,Gt,yi,J,Wo,bi,He,wi,qn,Vi,xi,hr,ki,Gi,Mi,Mt,ji,jt,ls,Ue,Et,gr,Bo,Ei,_r,Pi,ds,Ke,Ho,zi,Y,Uo,qi,Re,Fi,Fn,Ci,Ii,Tr,Ai,Di,Oi,Pt,Li,zt,ps,Je,qt,vr,Ko,Ni,$r,Si,cs,Ye,Ro,Wi,X,Jo,Bi,Xe,Hi,Cn,Ui,Ki,yr,Ri,Ji,Yi,Ft,Xi,Ct,us,Qe,It,br,Yo,Qi,wr,Zi,fs,z,Xo,el,Qo,tl,In,ol,nl,rl,Zo,sl,en,al,il,ll,At,dl,Q,tn,pl,Ze,cl,An,ul,fl,Vr,ml,hl,gl,Dt,_l,Ot,Tl,Z,on,vl,et,$l,Dn,yl,bl,xr,wl,Vl,xl,Lt,kl,Nt,Gl,ee,nn,Ml,tt,jl,On,El,Pl,kr,zl,ql,Fl,St,Cl,Wt,ms,ot,Bt,Gr,rn,Il,Mr,Al,hs,nt,sn,Dl,te,an,Ol,rt,Ll,Ln,Nl,Sl,jr,Wl,Bl,Hl,Ht,Ul,Ut,gs,st,Kt,Er,ln,Kl,Pr,Rl,_s,at,dn,Jl,oe,pn,Yl,it,Xl,Nn,Ql,Zl,zr,ed,td,od,Rt,nd,Jt,Ts;return n=new ne({}),le=new ne({}),yo=new ne({}),ko=new ne({}),Go=new P({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.29.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.29.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.29.0/src/transformers/models/groupvit/configuration_groupvit.py#L268"}}),jo=new P({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.29.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.29.0/en/model_doc/groupvit#transformers.GroupViTConfig"
>GroupViTConfig</a></p>
`}}),Po=new ne({}),zo=new P({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.29.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.29.0/src/transformers/models/groupvit/configuration_groupvit.py#L39"}}),$t=new re({props:{anchor:"transformers.GroupViTTextConfig.example",$$slots:{default:[Mp]},$$scope:{ctx:k}}}),Fo=new ne({}),Co=new P({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.29.0/src/transformers/models/groupvit/configuration_groupvit.py#L145"}}),bt=new re({props:{anchor:"transformers.GroupViTVisionConfig.example",$$slots:{default:[jp]},$$scope:{ctx:k}}}),Ao=new ne({}),Do=new P({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.29.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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1323"}}),No=new P({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.29.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1465",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.29.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.29.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.29.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.29.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 ce({props:{$$slots:{default:[Ep]},$$scope:{ctx:k}}}),xt=new re({props:{anchor:"transformers.GroupViTModel.forward.example",$$slots:{default:[Pp]},$$scope:{ctx:k}}}),So=new P({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.29.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1369",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.29.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>
`}}),kt=new ce({props:{$$slots:{default:[zp]},$$scope:{ctx:k}}}),Gt=new re({props:{anchor:"transformers.GroupViTModel.get_text_features.example",$$slots:{default:[qp]},$$scope:{ctx:k}}}),Wo=new P({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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1416",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.29.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>
`}}),Mt=new ce({props:{$$slots:{default:[Fp]},$$scope:{ctx:k}}}),jt=new re({props:{anchor:"transformers.GroupViTModel.get_image_features.example",$$slots:{default:[Cp]},$$scope:{ctx:k}}}),Bo=new ne({}),Ho=new P({props:{name:"class transformers.GroupViTTextModel",anchor:"transformers.GroupViTTextModel",parameters:[{name:"config",val:": GroupViTTextConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1159"}}),Uo=new P({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.29.0/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1174",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pt=new ce({props:{$$slots:{default:[Ip]},$$scope:{ctx:k}}}),zt=new re({props:{anchor:"transformers.GroupViTTextModel.forward.example",$$slots:{default:[Ap]},$$scope:{ctx:k}}}),Ko=new ne({}),Ro=new P({props:{name:"class transformers.GroupViTVisionModel",anchor:"transformers.GroupViTVisionModel",parameters:[{name:"config",val:": GroupViTVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1270"}}),Jo=new P({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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_groupvit.py#L1283",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ft=new ce({props:{$$slots:{default:[Dp]},$$scope:{ctx:k}}}),Ct=new re({props:{anchor:"transformers.GroupViTVisionModel.forward.example",$$slots:{default:[Op]},$$scope:{ctx:k}}}),Yo=new ne({}),Xo=new P({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.29.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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1793"}}),At=new ce({props:{$$slots:{default:[Lp]},$$scope:{ctx:k}}}),tn=new P({props:{name:"call",anchor:"transformers.TFGroupViTModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{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.29.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1923",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.29.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.29.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.29.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.29.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>
`}}),Dt=new ce({props:{$$slots:{default:[Np]},$$scope:{ctx:k}}}),Ot=new re({props:{anchor:"transformers.TFGroupViTModel.call.example",$$slots:{default:[Sp]},$$scope:{ctx:k}}}),on=new P({props:{name:"get_text_features",anchor:"transformers.TFGroupViTModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{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.29.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1839",returnDescription:`
<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/v4.29.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>
`}}),Lt=new ce({props:{$$slots:{default:[Wp]},$$scope:{ctx:k}}}),Nt=new re({props:{anchor:"transformers.TFGroupViTModel.get_text_features.example",$$slots:{default:[Bp]},$$scope:{ctx:k}}}),nn=new P({props:{name:"get_image_features",anchor:"transformers.TFGroupViTModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = 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"},{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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1880",returnDescription:`
<p>The image embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/v4.29.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>
`}}),St=new ce({props:{$$slots:{default:[Hp]},$$scope:{ctx:k}}}),Wt=new re({props:{anchor:"transformers.TFGroupViTModel.get_image_features.example",$$slots:{default:[Up]},$$scope:{ctx:k}}}),rn=new ne({}),sn=new P({props:{name:"class transformers.TFGroupViTTextModel",anchor:"transformers.TFGroupViTTextModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1609"}}),an=new P({props:{name:"call",anchor:"transformers.TFGroupViTTextModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{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.29.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1642",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ht=new ce({props:{$$slots:{default:[Kp]},$$scope:{ctx:k}}}),Ut=new re({props:{anchor:"transformers.TFGroupViTTextModel.call.example",$$slots:{default:[Rp]},$$scope:{ctx:k}}}),ln=new ne({}),dn=new P({props:{name:"class transformers.TFGroupViTVisionModel",anchor:"transformers.TFGroupViTVisionModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1697"}}),pn=new P({props:{name:"call",anchor:"transformers.TFGroupViTVisionModel.call",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = 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"},{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.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__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.29.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.29.0/src/transformers/models/groupvit/modeling_tf_groupvit.py#L1738",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Rt=new ce({props:{$$slots:{default:[Jp]},$$scope:{ctx:k}}}),Jt=new re({props:{anchor:"transformers.TFGroupViTVisionModel.call.example",$$slots:{default:[Yp]},$$scope:{ctx:k}}}),{c(){d=r("meta"),v=m(),u=r("h1"),c=r("a"),g=r("span"),$(n.$$.fragment),p=m(),G=r("span"),po=a("GroupViT"),ke=m(),E=r("h2"),U=r("a"),ie=r("span"),$(le.$$.fragment),co=m(),de=r("span"),uo=a("Overview"),pt=m(),C=r("p"),ue=a("The GroupViT model was proposed in "),pe=r("a"),ct=a("GroupViT: Semantic Segmentation Emerges from Text Supervision"),D=a(` by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
Inspired by `),I=r("a"),fo=a("CLIP"),Ge=a(", GroupViT is a vision-language model that can perform zero-shot semantic segmentation on any given vocabulary categories."),ut=m(),fe=r("p"),Me=a("The abstract from the paper is the following:"),ft=m(),me=r("p"),O=r("em"),mo=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."),he=m(),ge=r("p"),ho=a("Tips:"),_e=m(),Te=r("ul"),S=r("li"),ve=a("You may specify "),je=r("code"),Ee=a("output_segmentation=True"),go=a(" in the forward of "),M=r("code"),F=a("GroupViTModel"),mt=a(" to get the segmentation logits of input texts."),_o=m(),j=r("p"),$e=a("This model was contributed by "),ye=r("a"),mn=a("xvjiarui"),hn=a(". The TensorFlow version was contributed by "),L=r("a"),Pe=a("ariG23498"),gn=a(" with the help of "),be=r("a"),ze=a("Yih-Dar SHIEH"),_n=a(", "),we=r("a"),To=a("Amy Roberts"),Tn=a(", and "),vo=r("a"),Ns=a("Joao Gante"),Ss=a(`.
The original code can be found `),$o=r("a"),Ws=a("here"),Bs=a("."),Xr=m(),qe=r("h2"),ht=r("a"),nr=r("span"),$(yo.$$.fragment),Hs=m(),rr=r("span"),Us=a("Resources"),Qr=m(),vn=r("p"),Ks=a("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with GroupViT."),Zr=m(),gt=r("ul"),bo=r("li"),Rs=a("The quickest way to get started with GroupViT is by checking the "),wo=r("a"),Js=a("example notebooks"),Ys=a(" (which showcase zero-shot segmentation inference)."),Xs=m(),Vo=r("li"),Qs=a("One can also check out the "),xo=r("a"),Zs=a("HuggingFace Spaces demo"),ea=a(" to play with GroupViT."),es=m(),Fe=r("h2"),_t=r("a"),sr=r("span"),$(ko.$$.fragment),ta=m(),ar=r("span"),oa=a("GroupViTConfig"),ts=m(),W=r("div"),$(Go.$$.fragment),na=m(),Ve=r("p"),$n=r("a"),ra=a("GroupViTConfig"),sa=a(" is the configuration class to store the configuration of a "),yn=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
`),Mo=r("a"),la=a("nvidia/groupvit-gcc-yfcc"),da=a(" architecture."),pa=m(),Ce=r("p"),ca=a("Configuration objects inherit from "),bn=r("a"),ua=a("PretrainedConfig"),fa=a(` and can be used to control the model outputs. Read the
documentation from `),wn=r("a"),ma=a("PretrainedConfig"),ha=a(" for more information."),ga=m(),Tt=r("div"),$(jo.$$.fragment),_a=m(),Eo=r("p"),Ta=a("Instantiate a "),Vn=r("a"),va=a("GroupViTConfig"),$a=a(` (or a derived class) from groupvit text model configuration and groupvit
vision model configuration.`),os=m(),Ie=r("h2"),vt=r("a"),ir=r("span"),$(Po.$$.fragment),ya=m(),lr=r("span"),ba=a("GroupViTTextConfig"),ns=m(),B=r("div"),$(zo.$$.fragment),wa=m(),Ae=r("p"),Va=a("This is the configuration class to store the configuration of a "),xn=r("a"),xa=a("GroupViTTextModel"),ka=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
`),qo=r("a"),Ga=a("nvidia/groupvit-gcc-yfcc"),Ma=a(" architecture."),ja=m(),De=r("p"),Ea=a("Configuration objects inherit from "),kn=r("a"),Pa=a("PretrainedConfig"),za=a(` and can be used to control the model outputs. Read the
documentation from `),Gn=r("a"),qa=a("PretrainedConfig"),Fa=a(" for more information."),Ca=m(),$($t.$$.fragment),rs=m(),Oe=r("h2"),yt=r("a"),dr=r("span"),$(Fo.$$.fragment),Ia=m(),pr=r("span"),Aa=a("GroupViTVisionConfig"),ss=m(),H=r("div"),$(Co.$$.fragment),Da=m(),Le=r("p"),Oa=a("This is the configuration class to store the configuration of a "),Mn=r("a"),La=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
`),Io=r("a"),Sa=a("nvidia/groupvit-gcc-yfcc"),Wa=a(" architecture."),Ba=m(),Ne=r("p"),Ha=a("Configuration objects inherit from "),jn=r("a"),Ua=a("PretrainedConfig"),Ka=a(` and can be used to control the model outputs. Read the
documentation from `),En=r("a"),Ra=a("PretrainedConfig"),Ja=a(" for more information."),Ya=m(),$(bt.$$.fragment),as=m(),Se=r("h2"),wt=r("a"),cr=r("span"),$(Ao.$$.fragment),Xa=m(),ur=r("span"),Qa=a("GroupViTModel"),is=m(),A=r("div"),$(Do.$$.fragment),Za=m(),Oo=r("p"),ei=a("This model is a PyTorch "),Lo=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=m(),K=r("div"),$(No.$$.fragment),ri=m(),We=r("p"),si=a("The "),Pn=r("a"),ai=a("GroupViTModel"),ii=a(" forward method, overrides the "),fr=r("code"),li=a("__call__"),di=a(" special method."),pi=m(),$(Vt.$$.fragment),ci=m(),$(xt.$$.fragment),ui=m(),R=r("div"),$(So.$$.fragment),fi=m(),Be=r("p"),mi=a("The "),zn=r("a"),hi=a("GroupViTModel"),gi=a(" forward method, overrides the "),mr=r("code"),_i=a("__call__"),Ti=a(" special method."),vi=m(),$(kt.$$.fragment),$i=m(),$(Gt.$$.fragment),yi=m(),J=r("div"),$(Wo.$$.fragment),bi=m(),He=r("p"),wi=a("The "),qn=r("a"),Vi=a("GroupViTModel"),xi=a(" forward method, overrides the "),hr=r("code"),ki=a("__call__"),Gi=a(" special method."),Mi=m(),$(Mt.$$.fragment),ji=m(),$(jt.$$.fragment),ls=m(),Ue=r("h2"),Et=r("a"),gr=r("span"),$(Bo.$$.fragment),Ei=m(),_r=r("span"),Pi=a("GroupViTTextModel"),ds=m(),Ke=r("div"),$(Ho.$$.fragment),zi=m(),Y=r("div"),$(Uo.$$.fragment),qi=m(),Re=r("p"),Fi=a("The "),Fn=r("a"),Ci=a("GroupViTTextModel"),Ii=a(" forward method, overrides the "),Tr=r("code"),Ai=a("__call__"),Di=a(" special method."),Oi=m(),$(Pt.$$.fragment),Li=m(),$(zt.$$.fragment),ps=m(),Je=r("h2"),qt=r("a"),vr=r("span"),$(Ko.$$.fragment),Ni=m(),$r=r("span"),Si=a("GroupViTVisionModel"),cs=m(),Ye=r("div"),$(Ro.$$.fragment),Wi=m(),X=r("div"),$(Jo.$$.fragment),Bi=m(),Xe=r("p"),Hi=a("The "),Cn=r("a"),Ui=a("GroupViTVisionModel"),Ki=a(" forward method, overrides the "),yr=r("code"),Ri=a("__call__"),Ji=a(" special method."),Yi=m(),$(Ft.$$.fragment),Xi=m(),$(Ct.$$.fragment),us=m(),Qe=r("h2"),It=r("a"),br=r("span"),$(Yo.$$.fragment),Qi=m(),wr=r("span"),Zi=a("TFGroupViTModel"),fs=m(),z=r("div"),$(Xo.$$.fragment),el=m(),Qo=r("p"),tl=a("This model inherits from "),In=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=m(),Zo=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=m(),$(At.$$.fragment),dl=m(),Q=r("div"),$(tn.$$.fragment),pl=m(),Ze=r("p"),cl=a("The "),An=r("a"),ul=a("TFGroupViTModel"),fl=a(" forward method, overrides the "),Vr=r("code"),ml=a("__call__"),hl=a(" special method."),gl=m(),$(Dt.$$.fragment),_l=m(),$(Ot.$$.fragment),Tl=m(),Z=r("div"),$(on.$$.fragment),vl=m(),et=r("p"),$l=a("The "),Dn=r("a"),yl=a("TFGroupViTModel"),bl=a(" forward method, overrides the "),xr=r("code"),wl=a("__call__"),Vl=a(" special method."),xl=m(),$(Lt.$$.fragment),kl=m(),$(Nt.$$.fragment),Gl=m(),ee=r("div"),$(nn.$$.fragment),Ml=m(),tt=r("p"),jl=a("The "),On=r("a"),El=a("TFGroupViTModel"),Pl=a(" forward method, overrides the "),kr=r("code"),zl=a("__call__"),ql=a(" special method."),Fl=m(),$(St.$$.fragment),Cl=m(),$(Wt.$$.fragment),ms=m(),ot=r("h2"),Bt=r("a"),Gr=r("span"),$(rn.$$.fragment),Il=m(),Mr=r("span"),Al=a("TFGroupViTTextModel"),hs=m(),nt=r("div"),$(sn.$$.fragment),Dl=m(),te=r("div"),$(an.$$.fragment),Ol=m(),rt=r("p"),Ll=a("The "),Ln=r("a"),Nl=a("TFGroupViTTextModel"),Sl=a(" forward method, overrides the "),jr=r("code"),Wl=a("__call__"),Bl=a(" special method."),Hl=m(),$(Ht.$$.fragment),Ul=m(),$(Ut.$$.fragment),gs=m(),st=r("h2"),Kt=r("a"),Er=r("span"),$(ln.$$.fragment),Kl=m(),Pr=r("span"),Rl=a("TFGroupViTVisionModel"),_s=m(),at=r("div"),$(dn.$$.fragment),Jl=m(),oe=r("div"),$(pn.$$.fragment),Yl=m(),it=r("p"),Xl=a("The "),Nn=r("a"),Ql=a("TFGroupViTVisionModel"),Zl=a(" forward method, overrides the "),zr=r("code"),ed=a("__call__"),td=a(" special method."),od=m(),$(Rt.$$.fragment),nd=m(),$(Jt.$$.fragment),this.h()},l(t){const _=kp('[data-svelte="svelte-1phssyn"]',document.head);d=s(_,"META",{name:!0,content:!0}),_.forEach(o),v=h(t),u=s(t,"H1",{class:!0});var cn=l(u);c=s(cn,"A",{id:!0,class:!0,href:!0});var qr=l(c);g=s(qr,"SPAN",{});var Fr=l(g);y(n.$$.fragment,Fr),Fr.forEach(o),qr.forEach(o),p=h(cn),G=s(cn,"SPAN",{});var Cr=l(G);po=i(Cr,"GroupViT"),Cr.forEach(o),cn.forEach(o),ke=h(t),E=s(t,"H2",{class:!0});var un=l(E);U=s(un,"A",{id:!0,class:!0,href:!0});var Ir=l(U);ie=s(Ir,"SPAN",{});var Ar=l(ie);y(le.$$.fragment,Ar),Ar.forEach(o),Ir.forEach(o),co=h(un),de=s(un,"SPAN",{});var Dr=l(de);uo=i(Dr,"Overview"),Dr.forEach(o),un.forEach(o),pt=h(t),C=s(t,"P",{});var lt=l(C);ue=i(lt,"The GroupViT model was proposed in "),pe=s(lt,"A",{href:!0,rel:!0});var Or=l(pe);ct=i(Or,"GroupViT: Semantic Segmentation Emerges from Text Supervision"),Or.forEach(o),D=i(lt,` by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
Inspired by `),I=s(lt,"A",{href:!0});var Lr=l(I);fo=i(Lr,"CLIP"),Lr.forEach(o),Ge=i(lt,", GroupViT is a vision-language model that can perform zero-shot semantic segmentation on any given vocabulary categories."),lt.forEach(o),ut=h(t),fe=s(t,"P",{});var Nr=l(fe);Me=i(Nr,"The abstract from the paper is the following:"),Nr.forEach(o),ft=h(t),me=s(t,"P",{});var Sr=l(me);O=s(Sr,"EM",{});var Wr=l(O);mo=i(Wr,"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."),Wr.forEach(o),Sr.forEach(o),he=h(t),ge=s(t,"P",{});var Br=l(ge);ho=i(Br,"Tips:"),Br.forEach(o),_e=h(t),Te=s(t,"UL",{});var Hr=l(Te);S=s(Hr,"LI",{});var dt=l(S);ve=i(dt,"You may specify "),je=s(dt,"CODE",{});var Ur=l(je);Ee=i(Ur,"output_segmentation=True"),Ur.forEach(o),go=i(dt," in the forward of "),M=s(dt,"CODE",{});var Kr=l(M);F=i(Kr,"GroupViTModel"),Kr.forEach(o),mt=i(dt," to get the segmentation logits of input texts."),dt.forEach(o),Hr.forEach(o),_o=h(t),j=s(t,"P",{});var q=l(j);$e=i(q,"This model was contributed by "),ye=s(q,"A",{href:!0,rel:!0});var Rr=l(ye);mn=i(Rr,"xvjiarui"),Rr.forEach(o),hn=i(q,". The TensorFlow version was contributed by "),L=s(q,"A",{href:!0,rel:!0});var Jr=l(L);Pe=i(Jr,"ariG23498"),Jr.forEach(o),gn=i(q," with the help of "),be=s(q,"A",{href:!0,rel:!0});var Yr=l(be);ze=i(Yr,"Yih-Dar SHIEH"),Yr.forEach(o),_n=i(q,", "),we=s(q,"A",{href:!0,rel:!0});var rd=l(we);To=i(rd,"Amy Roberts"),rd.forEach(o),Tn=i(q,", and "),vo=s(q,"A",{href:!0,rel:!0});var sd=l(vo);Ns=i(sd,"Joao Gante"),sd.forEach(o),Ss=i(q,`.
The original code can be found `),$o=s(q,"A",{href:!0,rel:!0});var ad=l($o);Ws=i(ad,"here"),ad.forEach(o),Bs=i(q,"."),q.forEach(o),Xr=h(t),qe=s(t,"H2",{class:!0});var vs=l(qe);ht=s(vs,"A",{id:!0,class:!0,href:!0});var id=l(ht);nr=s(id,"SPAN",{});var ld=l(nr);y(yo.$$.fragment,ld),ld.forEach(o),id.forEach(o),Hs=h(vs),rr=s(vs,"SPAN",{});var dd=l(rr);Us=i(dd,"Resources"),dd.forEach(o),vs.forEach(o),Qr=h(t),vn=s(t,"P",{});var pd=l(vn);Ks=i(pd,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with GroupViT."),pd.forEach(o),Zr=h(t),gt=s(t,"UL",{});var $s=l(gt);bo=s($s,"LI",{});var ys=l(bo);Rs=i(ys,"The quickest way to get started with GroupViT is by checking the "),wo=s(ys,"A",{href:!0,rel:!0});var cd=l(wo);Js=i(cd,"example notebooks"),cd.forEach(o),Ys=i(ys," (which showcase zero-shot segmentation inference)."),ys.forEach(o),Xs=h($s),Vo=s($s,"LI",{});var bs=l(Vo);Qs=i(bs,"One can also check out the "),xo=s(bs,"A",{href:!0,rel:!0});var ud=l(xo);Zs=i(ud,"HuggingFace Spaces demo"),ud.forEach(o),ea=i(bs," to play with GroupViT."),bs.forEach(o),$s.forEach(o),es=h(t),Fe=s(t,"H2",{class:!0});var ws=l(Fe);_t=s(ws,"A",{id:!0,class:!0,href:!0});var fd=l(_t);sr=s(fd,"SPAN",{});var md=l(sr);y(ko.$$.fragment,md),md.forEach(o),fd.forEach(o),ta=h(ws),ar=s(ws,"SPAN",{});var hd=l(ar);oa=i(hd,"GroupViTConfig"),hd.forEach(o),ws.forEach(o),ts=h(t),W=s(t,"DIV",{class:!0});var Yt=l(W);y(Go.$$.fragment,Yt),na=h(Yt),Ve=s(Yt,"P",{});var fn=l(Ve);$n=s(fn,"A",{href:!0});var gd=l($n);ra=i(gd,"GroupViTConfig"),gd.forEach(o),sa=i(fn," is the configuration class to store the configuration of a "),yn=s(fn,"A",{href:!0});var _d=l(yn);aa=i(_d,"GroupViTModel"),_d.forEach(o),ia=i(fn,`. 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
`),Mo=s(fn,"A",{href:!0,rel:!0});var Td=l(Mo);la=i(Td,"nvidia/groupvit-gcc-yfcc"),Td.forEach(o),da=i(fn," architecture."),fn.forEach(o),pa=h(Yt),Ce=s(Yt,"P",{});var Sn=l(Ce);ca=i(Sn,"Configuration objects inherit from "),bn=s(Sn,"A",{href:!0});var vd=l(bn);ua=i(vd,"PretrainedConfig"),vd.forEach(o),fa=i(Sn,` and can be used to control the model outputs. Read the
documentation from `),wn=s(Sn,"A",{href:!0});var $d=l(wn);ma=i($d,"PretrainedConfig"),$d.forEach(o),ha=i(Sn," for more information."),Sn.forEach(o),ga=h(Yt),Tt=s(Yt,"DIV",{class:!0});var Vs=l(Tt);y(jo.$$.fragment,Vs),_a=h(Vs),Eo=s(Vs,"P",{});var xs=l(Eo);Ta=i(xs,"Instantiate a "),Vn=s(xs,"A",{href:!0});var yd=l(Vn);va=i(yd,"GroupViTConfig"),yd.forEach(o),$a=i(xs,` (or a derived class) from groupvit text model configuration and groupvit
vision model configuration.`),xs.forEach(o),Vs.forEach(o),Yt.forEach(o),os=h(t),Ie=s(t,"H2",{class:!0});var ks=l(Ie);vt=s(ks,"A",{id:!0,class:!0,href:!0});var bd=l(vt);ir=s(bd,"SPAN",{});var wd=l(ir);y(Po.$$.fragment,wd),wd.forEach(o),bd.forEach(o),ya=h(ks),lr=s(ks,"SPAN",{});var Vd=l(lr);ba=i(Vd,"GroupViTTextConfig"),Vd.forEach(o),ks.forEach(o),ns=h(t),B=s(t,"DIV",{class:!0});var Xt=l(B);y(zo.$$.fragment,Xt),wa=h(Xt),Ae=s(Xt,"P",{});var Wn=l(Ae);Va=i(Wn,"This is the configuration class to store the configuration of a "),xn=s(Wn,"A",{href:!0});var xd=l(xn);xa=i(xd,"GroupViTTextModel"),xd.forEach(o),ka=i(Wn,`. 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
`),qo=s(Wn,"A",{href:!0,rel:!0});var kd=l(qo);Ga=i(kd,"nvidia/groupvit-gcc-yfcc"),kd.forEach(o),Ma=i(Wn," architecture."),Wn.forEach(o),ja=h(Xt),De=s(Xt,"P",{});var Bn=l(De);Ea=i(Bn,"Configuration objects inherit from "),kn=s(Bn,"A",{href:!0});var Gd=l(kn);Pa=i(Gd,"PretrainedConfig"),Gd.forEach(o),za=i(Bn,` and can be used to control the model outputs. Read the
documentation from `),Gn=s(Bn,"A",{href:!0});var Md=l(Gn);qa=i(Md,"PretrainedConfig"),Md.forEach(o),Fa=i(Bn," for more information."),Bn.forEach(o),Ca=h(Xt),y($t.$$.fragment,Xt),Xt.forEach(o),rs=h(t),Oe=s(t,"H2",{class:!0});var Gs=l(Oe);yt=s(Gs,"A",{id:!0,class:!0,href:!0});var jd=l(yt);dr=s(jd,"SPAN",{});var Ed=l(dr);y(Fo.$$.fragment,Ed),Ed.forEach(o),jd.forEach(o),Ia=h(Gs),pr=s(Gs,"SPAN",{});var Pd=l(pr);Aa=i(Pd,"GroupViTVisionConfig"),Pd.forEach(o),Gs.forEach(o),ss=h(t),H=s(t,"DIV",{class:!0});var Qt=l(H);y(Co.$$.fragment,Qt),Da=h(Qt),Le=s(Qt,"P",{});var Hn=l(Le);Oa=i(Hn,"This is the configuration class to store the configuration of a "),Mn=s(Hn,"A",{href:!0});var zd=l(Mn);La=i(zd,"GroupViTVisionModel"),zd.forEach(o),Na=i(Hn,`. 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
`),Io=s(Hn,"A",{href:!0,rel:!0});var qd=l(Io);Sa=i(qd,"nvidia/groupvit-gcc-yfcc"),qd.forEach(o),Wa=i(Hn," architecture."),Hn.forEach(o),Ba=h(Qt),Ne=s(Qt,"P",{});var Un=l(Ne);Ha=i(Un,"Configuration objects inherit from "),jn=s(Un,"A",{href:!0});var Fd=l(jn);Ua=i(Fd,"PretrainedConfig"),Fd.forEach(o),Ka=i(Un,` and can be used to control the model outputs. Read the
documentation from `),En=s(Un,"A",{href:!0});var Cd=l(En);Ra=i(Cd,"PretrainedConfig"),Cd.forEach(o),Ja=i(Un," for more information."),Un.forEach(o),Ya=h(Qt),y(bt.$$.fragment,Qt),Qt.forEach(o),as=h(t),Se=s(t,"H2",{class:!0});var Ms=l(Se);wt=s(Ms,"A",{id:!0,class:!0,href:!0});var Id=l(wt);cr=s(Id,"SPAN",{});var Ad=l(cr);y(Ao.$$.fragment,Ad),Ad.forEach(o),Id.forEach(o),Xa=h(Ms),ur=s(Ms,"SPAN",{});var Dd=l(ur);Qa=i(Dd,"GroupViTModel"),Dd.forEach(o),Ms.forEach(o),is=h(t),A=s(t,"DIV",{class:!0});var xe=l(A);y(Do.$$.fragment,xe),Za=h(xe),Oo=s(xe,"P",{});var js=l(Oo);ei=i(js,"This model is a PyTorch "),Lo=s(js,"A",{href:!0,rel:!0});var Od=l(Lo);ti=i(Od,"torch.nn.Module"),Od.forEach(o),oi=i(js,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),js.forEach(o),ni=h(xe),K=s(xe,"DIV",{class:!0});var Zt=l(K);y(No.$$.fragment,Zt),ri=h(Zt),We=s(Zt,"P",{});var Kn=l(We);si=i(Kn,"The "),Pn=s(Kn,"A",{href:!0});var Ld=l(Pn);ai=i(Ld,"GroupViTModel"),Ld.forEach(o),ii=i(Kn," forward method, overrides the "),fr=s(Kn,"CODE",{});var Nd=l(fr);li=i(Nd,"__call__"),Nd.forEach(o),di=i(Kn," special method."),Kn.forEach(o),pi=h(Zt),y(Vt.$$.fragment,Zt),ci=h(Zt),y(xt.$$.fragment,Zt),Zt.forEach(o),ui=h(xe),R=s(xe,"DIV",{class:!0});var eo=l(R);y(So.$$.fragment,eo),fi=h(eo),Be=s(eo,"P",{});var Rn=l(Be);mi=i(Rn,"The "),zn=s(Rn,"A",{href:!0});var Sd=l(zn);hi=i(Sd,"GroupViTModel"),Sd.forEach(o),gi=i(Rn," forward method, overrides the "),mr=s(Rn,"CODE",{});var Wd=l(mr);_i=i(Wd,"__call__"),Wd.forEach(o),Ti=i(Rn," special method."),Rn.forEach(o),vi=h(eo),y(kt.$$.fragment,eo),$i=h(eo),y(Gt.$$.fragment,eo),eo.forEach(o),yi=h(xe),J=s(xe,"DIV",{class:!0});var to=l(J);y(Wo.$$.fragment,to),bi=h(to),He=s(to,"P",{});var Jn=l(He);wi=i(Jn,"The "),qn=s(Jn,"A",{href:!0});var Bd=l(qn);Vi=i(Bd,"GroupViTModel"),Bd.forEach(o),xi=i(Jn," forward method, overrides the "),hr=s(Jn,"CODE",{});var Hd=l(hr);ki=i(Hd,"__call__"),Hd.forEach(o),Gi=i(Jn," special method."),Jn.forEach(o),Mi=h(to),y(Mt.$$.fragment,to),ji=h(to),y(jt.$$.fragment,to),to.forEach(o),xe.forEach(o),ls=h(t),Ue=s(t,"H2",{class:!0});var Es=l(Ue);Et=s(Es,"A",{id:!0,class:!0,href:!0});var Ud=l(Et);gr=s(Ud,"SPAN",{});var Kd=l(gr);y(Bo.$$.fragment,Kd),Kd.forEach(o),Ud.forEach(o),Ei=h(Es),_r=s(Es,"SPAN",{});var Rd=l(_r);Pi=i(Rd,"GroupViTTextModel"),Rd.forEach(o),Es.forEach(o),ds=h(t),Ke=s(t,"DIV",{class:!0});var Ps=l(Ke);y(Ho.$$.fragment,Ps),zi=h(Ps),Y=s(Ps,"DIV",{class:!0});var oo=l(Y);y(Uo.$$.fragment,oo),qi=h(oo),Re=s(oo,"P",{});var Yn=l(Re);Fi=i(Yn,"The "),Fn=s(Yn,"A",{href:!0});var Jd=l(Fn);Ci=i(Jd,"GroupViTTextModel"),Jd.forEach(o),Ii=i(Yn," forward method, overrides the "),Tr=s(Yn,"CODE",{});var Yd=l(Tr);Ai=i(Yd,"__call__"),Yd.forEach(o),Di=i(Yn," special method."),Yn.forEach(o),Oi=h(oo),y(Pt.$$.fragment,oo),Li=h(oo),y(zt.$$.fragment,oo),oo.forEach(o),Ps.forEach(o),ps=h(t),Je=s(t,"H2",{class:!0});var zs=l(Je);qt=s(zs,"A",{id:!0,class:!0,href:!0});var Xd=l(qt);vr=s(Xd,"SPAN",{});var Qd=l(vr);y(Ko.$$.fragment,Qd),Qd.forEach(o),Xd.forEach(o),Ni=h(zs),$r=s(zs,"SPAN",{});var Zd=l($r);Si=i(Zd,"GroupViTVisionModel"),Zd.forEach(o),zs.forEach(o),cs=h(t),Ye=s(t,"DIV",{class:!0});var qs=l(Ye);y(Ro.$$.fragment,qs),Wi=h(qs),X=s(qs,"DIV",{class:!0});var no=l(X);y(Jo.$$.fragment,no),Bi=h(no),Xe=s(no,"P",{});var Xn=l(Xe);Hi=i(Xn,"The "),Cn=s(Xn,"A",{href:!0});var ep=l(Cn);Ui=i(ep,"GroupViTVisionModel"),ep.forEach(o),Ki=i(Xn," forward method, overrides the "),yr=s(Xn,"CODE",{});var tp=l(yr);Ri=i(tp,"__call__"),tp.forEach(o),Ji=i(Xn," special method."),Xn.forEach(o),Yi=h(no),y(Ft.$$.fragment,no),Xi=h(no),y(Ct.$$.fragment,no),no.forEach(o),qs.forEach(o),us=h(t),Qe=s(t,"H2",{class:!0});var Fs=l(Qe);It=s(Fs,"A",{id:!0,class:!0,href:!0});var op=l(It);br=s(op,"SPAN",{});var np=l(br);y(Yo.$$.fragment,np),np.forEach(o),op.forEach(o),Qi=h(Fs),wr=s(Fs,"SPAN",{});var rp=l(wr);Zi=i(rp,"TFGroupViTModel"),rp.forEach(o),Fs.forEach(o),fs=h(t),z=s(t,"DIV",{class:!0});var N=l(z);y(Xo.$$.fragment,N),el=h(N),Qo=s(N,"P",{});var Cs=l(Qo);tl=i(Cs,"This model inherits from "),In=s(Cs,"A",{href:!0});var sp=l(In);ol=i(sp,"TFPreTrainedModel"),sp.forEach(o),nl=i(Cs,`. 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.)`),Cs.forEach(o),rl=h(N),Zo=s(N,"P",{});var Is=l(Zo);sl=i(Is,"This model is also a "),en=s(Is,"A",{href:!0,rel:!0});var ap=l(en);al=i(ap,"tf.keras.Model"),ap.forEach(o),il=i(Is,` 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.`),Is.forEach(o),ll=h(N),y(At.$$.fragment,N),dl=h(N),Q=s(N,"DIV",{class:!0});var ro=l(Q);y(tn.$$.fragment,ro),pl=h(ro),Ze=s(ro,"P",{});var Qn=l(Ze);cl=i(Qn,"The "),An=s(Qn,"A",{href:!0});var ip=l(An);ul=i(ip,"TFGroupViTModel"),ip.forEach(o),fl=i(Qn," forward method, overrides the "),Vr=s(Qn,"CODE",{});var lp=l(Vr);ml=i(lp,"__call__"),lp.forEach(o),hl=i(Qn," special method."),Qn.forEach(o),gl=h(ro),y(Dt.$$.fragment,ro),_l=h(ro),y(Ot.$$.fragment,ro),ro.forEach(o),Tl=h(N),Z=s(N,"DIV",{class:!0});var so=l(Z);y(on.$$.fragment,so),vl=h(so),et=s(so,"P",{});var Zn=l(et);$l=i(Zn,"The "),Dn=s(Zn,"A",{href:!0});var dp=l(Dn);yl=i(dp,"TFGroupViTModel"),dp.forEach(o),bl=i(Zn," forward method, overrides the "),xr=s(Zn,"CODE",{});var pp=l(xr);wl=i(pp,"__call__"),pp.forEach(o),Vl=i(Zn," special method."),Zn.forEach(o),xl=h(so),y(Lt.$$.fragment,so),kl=h(so),y(Nt.$$.fragment,so),so.forEach(o),Gl=h(N),ee=s(N,"DIV",{class:!0});var ao=l(ee);y(nn.$$.fragment,ao),Ml=h(ao),tt=s(ao,"P",{});var er=l(tt);jl=i(er,"The "),On=s(er,"A",{href:!0});var cp=l(On);El=i(cp,"TFGroupViTModel"),cp.forEach(o),Pl=i(er," forward method, overrides the "),kr=s(er,"CODE",{});var up=l(kr);zl=i(up,"__call__"),up.forEach(o),ql=i(er," special method."),er.forEach(o),Fl=h(ao),y(St.$$.fragment,ao),Cl=h(ao),y(Wt.$$.fragment,ao),ao.forEach(o),N.forEach(o),ms=h(t),ot=s(t,"H2",{class:!0});var As=l(ot);Bt=s(As,"A",{id:!0,class:!0,href:!0});var fp=l(Bt);Gr=s(fp,"SPAN",{});var mp=l(Gr);y(rn.$$.fragment,mp),mp.forEach(o),fp.forEach(o),Il=h(As),Mr=s(As,"SPAN",{});var hp=l(Mr);Al=i(hp,"TFGroupViTTextModel"),hp.forEach(o),As.forEach(o),hs=h(t),nt=s(t,"DIV",{class:!0});var Ds=l(nt);y(sn.$$.fragment,Ds),Dl=h(Ds),te=s(Ds,"DIV",{class:!0});var io=l(te);y(an.$$.fragment,io),Ol=h(io),rt=s(io,"P",{});var tr=l(rt);Ll=i(tr,"The "),Ln=s(tr,"A",{href:!0});var gp=l(Ln);Nl=i(gp,"TFGroupViTTextModel"),gp.forEach(o),Sl=i(tr," forward method, overrides the "),jr=s(tr,"CODE",{});var _p=l(jr);Wl=i(_p,"__call__"),_p.forEach(o),Bl=i(tr," special method."),tr.forEach(o),Hl=h(io),y(Ht.$$.fragment,io),Ul=h(io),y(Ut.$$.fragment,io),io.forEach(o),Ds.forEach(o),gs=h(t),st=s(t,"H2",{class:!0});var Os=l(st);Kt=s(Os,"A",{id:!0,class:!0,href:!0});var Tp=l(Kt);Er=s(Tp,"SPAN",{});var vp=l(Er);y(ln.$$.fragment,vp),vp.forEach(o),Tp.forEach(o),Kl=h(Os),Pr=s(Os,"SPAN",{});var $p=l(Pr);Rl=i($p,"TFGroupViTVisionModel"),$p.forEach(o),Os.forEach(o),_s=h(t),at=s(t,"DIV",{class:!0});var Ls=l(at);y(dn.$$.fragment,Ls),Jl=h(Ls),oe=s(Ls,"DIV",{class:!0});var lo=l(oe);y(pn.$$.fragment,lo),Yl=h(lo),it=s(lo,"P",{});var or=l(it);Xl=i(or,"The "),Nn=s(or,"A",{href:!0});var yp=l(Nn);Ql=i(yp,"TFGroupViTVisionModel"),yp.forEach(o),Zl=i(or," forward method, overrides the "),zr=s(or,"CODE",{});var bp=l(zr);ed=i(bp,"__call__"),bp.forEach(o),td=i(or," special method."),or.forEach(o),od=h(lo),y(Rt.$$.fragment,lo),nd=h(lo),y(Jt.$$.fragment,lo),lo.forEach(o),Ls.forEach(o),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(Qp)),f(c,"id","groupvit"),f(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(c,"href","#groupvit"),f(u,"class","relative group"),f(U,"id","overview"),f(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(U,"href","#overview"),f(E,"class","relative group"),f(pe,"href","https://arxiv.org/abs/2202.11094"),f(pe,"rel","nofollow"),f(I,"href","clip"),f(ye,"href","https://huggingface.co/xvjiarui"),f(ye,"rel","nofollow"),f(L,"href","https://huggingface.co/ariG23498"),f(L,"rel","nofollow"),f(be,"href","https://huggingface.co/ydshieh"),f(be,"rel","nofollow"),f(we,"href","https://huggingface.co/amyeroberts"),f(we,"rel","nofollow"),f(vo,"href","https://huggingface.co/joaogante"),f(vo,"rel","nofollow"),f($o,"href","https://github.com/NVlabs/GroupViT"),f($o,"rel","nofollow"),f(ht,"id","resources"),f(ht,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ht,"href","#resources"),f(qe,"class","relative group"),f(wo,"href","https://github.com/xvjiarui/GroupViT/blob/main/demo/GroupViT_hf_inference_notebook.ipynb"),f(wo,"rel","nofollow"),f(xo,"href","https://huggingface.co/spaces/xvjiarui/GroupViT"),f(xo,"rel","nofollow"),f(_t,"id","transformers.GroupViTConfig"),f(_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"),f(_t,"href","#transformers.GroupViTConfig"),f(Fe,"class","relative group"),f($n,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTConfig"),f(yn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTModel"),f(Mo,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),f(Mo,"rel","nofollow"),f(bn,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(wn,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Vn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTConfig"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vt,"id","transformers.GroupViTTextConfig"),f(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"),f(vt,"href","#transformers.GroupViTTextConfig"),f(Ie,"class","relative group"),f(xn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTTextModel"),f(qo,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),f(qo,"rel","nofollow"),f(kn,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Gn,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(yt,"id","transformers.GroupViTVisionConfig"),f(yt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(yt,"href","#transformers.GroupViTVisionConfig"),f(Oe,"class","relative group"),f(Mn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"),f(Io,"href","https://huggingface.co/nvidia/groupvit-gcc-yfcc"),f(Io,"rel","nofollow"),f(jn,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(En,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wt,"id","transformers.GroupViTModel"),f(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"),f(wt,"href","#transformers.GroupViTModel"),f(Se,"class","relative group"),f(Lo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Lo,"rel","nofollow"),f(Pn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTModel"),f(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTModel"),f(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTModel"),f(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Et,"id","transformers.GroupViTTextModel"),f(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"),f(Et,"href","#transformers.GroupViTTextModel"),f(Ue,"class","relative group"),f(Fn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTTextModel"),f(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qt,"id","transformers.GroupViTVisionModel"),f(qt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qt,"href","#transformers.GroupViTVisionModel"),f(Je,"class","relative group"),f(Cn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.GroupViTVisionModel"),f(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(It,"id","transformers.TFGroupViTModel"),f(It,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(It,"href","#transformers.TFGroupViTModel"),f(Qe,"class","relative group"),f(In,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(en,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(en,"rel","nofollow"),f(An,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),f(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Dn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(On,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.TFGroupViTModel"),f(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Bt,"id","transformers.TFGroupViTTextModel"),f(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"),f(Bt,"href","#transformers.TFGroupViTTextModel"),f(ot,"class","relative group"),f(Ln,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.TFGroupViTTextModel"),f(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Kt,"id","transformers.TFGroupViTVisionModel"),f(Kt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Kt,"href","#transformers.TFGroupViTVisionModel"),f(st,"class","relative group"),f(Nn,"href","/docs/transformers/v4.29.0/en/model_doc/groupvit#transformers.TFGroupViTVisionModel"),f(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,_){e(document.head,d),T(t,v,_),T(t,u,_),e(u,c),e(c,g),b(n,g,null),e(u,p),e(u,G),e(G,po),T(t,ke,_),T(t,E,_),e(E,U),e(U,ie),b(le,ie,null),e(E,co),e(E,de),e(de,uo),T(t,pt,_),T(t,C,_),e(C,ue),e(C,pe),e(pe,ct),e(C,D),e(C,I),e(I,fo),e(C,Ge),T(t,ut,_),T(t,fe,_),e(fe,Me),T(t,ft,_),T(t,me,_),e(me,O),e(O,mo),T(t,he,_),T(t,ge,_),e(ge,ho),T(t,_e,_),T(t,Te,_),e(Te,S),e(S,ve),e(S,je),e(je,Ee),e(S,go),e(S,M),e(M,F),e(S,mt),T(t,_o,_),T(t,j,_),e(j,$e),e(j,ye),e(ye,mn),e(j,hn),e(j,L),e(L,Pe),e(j,gn),e(j,be),e(be,ze),e(j,_n),e(j,we),e(we,To),e(j,Tn),e(j,vo),e(vo,Ns),e(j,Ss),e(j,$o),e($o,Ws),e(j,Bs),T(t,Xr,_),T(t,qe,_),e(qe,ht),e(ht,nr),b(yo,nr,null),e(qe,Hs),e(qe,rr),e(rr,Us),T(t,Qr,_),T(t,vn,_),e(vn,Ks),T(t,Zr,_),T(t,gt,_),e(gt,bo),e(bo,Rs),e(bo,wo),e(wo,Js),e(bo,Ys),e(gt,Xs),e(gt,Vo),e(Vo,Qs),e(Vo,xo),e(xo,Zs),e(Vo,ea),T(t,es,_),T(t,Fe,_),e(Fe,_t),e(_t,sr),b(ko,sr,null),e(Fe,ta),e(Fe,ar),e(ar,oa),T(t,ts,_),T(t,W,_),b(Go,W,null),e(W,na),e(W,Ve),e(Ve,$n),e($n,ra),e(Ve,sa),e(Ve,yn),e(yn,aa),e(Ve,ia),e(Ve,Mo),e(Mo,la),e(Ve,da),e(W,pa),e(W,Ce),e(Ce,ca),e(Ce,bn),e(bn,ua),e(Ce,fa),e(Ce,wn),e(wn,ma),e(Ce,ha),e(W,ga),e(W,Tt),b(jo,Tt,null),e(Tt,_a),e(Tt,Eo),e(Eo,Ta),e(Eo,Vn),e(Vn,va),e(Eo,$a),T(t,os,_),T(t,Ie,_),e(Ie,vt),e(vt,ir),b(Po,ir,null),e(Ie,ya),e(Ie,lr),e(lr,ba),T(t,ns,_),T(t,B,_),b(zo,B,null),e(B,wa),e(B,Ae),e(Ae,Va),e(Ae,xn),e(xn,xa),e(Ae,ka),e(Ae,qo),e(qo,Ga),e(Ae,Ma),e(B,ja),e(B,De),e(De,Ea),e(De,kn),e(kn,Pa),e(De,za),e(De,Gn),e(Gn,qa),e(De,Fa),e(B,Ca),b($t,B,null),T(t,rs,_),T(t,Oe,_),e(Oe,yt),e(yt,dr),b(Fo,dr,null),e(Oe,Ia),e(Oe,pr),e(pr,Aa),T(t,ss,_),T(t,H,_),b(Co,H,null),e(H,Da),e(H,Le),e(Le,Oa),e(Le,Mn),e(Mn,La),e(Le,Na),e(Le,Io),e(Io,Sa),e(Le,Wa),e(H,Ba),e(H,Ne),e(Ne,Ha),e(Ne,jn),e(jn,Ua),e(Ne,Ka),e(Ne,En),e(En,Ra),e(Ne,Ja),e(H,Ya),b(bt,H,null),T(t,as,_),T(t,Se,_),e(Se,wt),e(wt,cr),b(Ao,cr,null),e(Se,Xa),e(Se,ur),e(ur,Qa),T(t,is,_),T(t,A,_),b(Do,A,null),e(A,Za),e(A,Oo),e(Oo,ei),e(Oo,Lo),e(Lo,ti),e(Oo,oi),e(A,ni),e(A,K),b(No,K,null),e(K,ri),e(K,We),e(We,si),e(We,Pn),e(Pn,ai),e(We,ii),e(We,fr),e(fr,li),e(We,di),e(K,pi),b(Vt,K,null),e(K,ci),b(xt,K,null),e(A,ui),e(A,R),b(So,R,null),e(R,fi),e(R,Be),e(Be,mi),e(Be,zn),e(zn,hi),e(Be,gi),e(Be,mr),e(mr,_i),e(Be,Ti),e(R,vi),b(kt,R,null),e(R,$i),b(Gt,R,null),e(A,yi),e(A,J),b(Wo,J,null),e(J,bi),e(J,He),e(He,wi),e(He,qn),e(qn,Vi),e(He,xi),e(He,hr),e(hr,ki),e(He,Gi),e(J,Mi),b(Mt,J,null),e(J,ji),b(jt,J,null),T(t,ls,_),T(t,Ue,_),e(Ue,Et),e(Et,gr),b(Bo,gr,null),e(Ue,Ei),e(Ue,_r),e(_r,Pi),T(t,ds,_),T(t,Ke,_),b(Ho,Ke,null),e(Ke,zi),e(Ke,Y),b(Uo,Y,null),e(Y,qi),e(Y,Re),e(Re,Fi),e(Re,Fn),e(Fn,Ci),e(Re,Ii),e(Re,Tr),e(Tr,Ai),e(Re,Di),e(Y,Oi),b(Pt,Y,null),e(Y,Li),b(zt,Y,null),T(t,ps,_),T(t,Je,_),e(Je,qt),e(qt,vr),b(Ko,vr,null),e(Je,Ni),e(Je,$r),e($r,Si),T(t,cs,_),T(t,Ye,_),b(Ro,Ye,null),e(Ye,Wi),e(Ye,X),b(Jo,X,null),e(X,Bi),e(X,Xe),e(Xe,Hi),e(Xe,Cn),e(Cn,Ui),e(Xe,Ki),e(Xe,yr),e(yr,Ri),e(Xe,Ji),e(X,Yi),b(Ft,X,null),e(X,Xi),b(Ct,X,null),T(t,us,_),T(t,Qe,_),e(Qe,It),e(It,br),b(Yo,br,null),e(Qe,Qi),e(Qe,wr),e(wr,Zi),T(t,fs,_),T(t,z,_),b(Xo,z,null),e(z,el),e(z,Qo),e(Qo,tl),e(Qo,In),e(In,ol),e(Qo,nl),e(z,rl),e(z,Zo),e(Zo,sl),e(Zo,en),e(en,al),e(Zo,il),e(z,ll),b(At,z,null),e(z,dl),e(z,Q),b(tn,Q,null),e(Q,pl),e(Q,Ze),e(Ze,cl),e(Ze,An),e(An,ul),e(Ze,fl),e(Ze,Vr),e(Vr,ml),e(Ze,hl),e(Q,gl),b(Dt,Q,null),e(Q,_l),b(Ot,Q,null),e(z,Tl),e(z,Z),b(on,Z,null),e(Z,vl),e(Z,et),e(et,$l),e(et,Dn),e(Dn,yl),e(et,bl),e(et,xr),e(xr,wl),e(et,Vl),e(Z,xl),b(Lt,Z,null),e(Z,kl),b(Nt,Z,null),e(z,Gl),e(z,ee),b(nn,ee,null),e(ee,Ml),e(ee,tt),e(tt,jl),e(tt,On),e(On,El),e(tt,Pl),e(tt,kr),e(kr,zl),e(tt,ql),e(ee,Fl),b(St,ee,null),e(ee,Cl),b(Wt,ee,null),T(t,ms,_),T(t,ot,_),e(ot,Bt),e(Bt,Gr),b(rn,Gr,null),e(ot,Il),e(ot,Mr),e(Mr,Al),T(t,hs,_),T(t,nt,_),b(sn,nt,null),e(nt,Dl),e(nt,te),b(an,te,null),e(te,Ol),e(te,rt),e(rt,Ll),e(rt,Ln),e(Ln,Nl),e(rt,Sl),e(rt,jr),e(jr,Wl),e(rt,Bl),e(te,Hl),b(Ht,te,null),e(te,Ul),b(Ut,te,null),T(t,gs,_),T(t,st,_),e(st,Kt),e(Kt,Er),b(ln,Er,null),e(st,Kl),e(st,Pr),e(Pr,Rl),T(t,_s,_),T(t,at,_),b(dn,at,null),e(at,Jl),e(at,oe),b(pn,oe,null),e(oe,Yl),e(oe,it),e(it,Xl),e(it,Nn),e(Nn,Ql),e(it,Zl),e(it,zr),e(zr,ed),e(it,td),e(oe,od),b(Rt,oe,null),e(oe,nd),b(Jt,oe,null),Ts=!0},p(t,[_]){const cn={};_&2&&(cn.$$scope={dirty:_,ctx:t}),$t.$set(cn);const qr={};_&2&&(qr.$$scope={dirty:_,ctx:t}),bt.$set(qr);const Fr={};_&2&&(Fr.$$scope={dirty:_,ctx:t}),Vt.$set(Fr);const Cr={};_&2&&(Cr.$$scope={dirty:_,ctx:t}),xt.$set(Cr);const un={};_&2&&(un.$$scope={dirty:_,ctx:t}),kt.$set(un);const Ir={};_&2&&(Ir.$$scope={dirty:_,ctx:t}),Gt.$set(Ir);const Ar={};_&2&&(Ar.$$scope={dirty:_,ctx:t}),Mt.$set(Ar);const Dr={};_&2&&(Dr.$$scope={dirty:_,ctx:t}),jt.$set(Dr);const lt={};_&2&&(lt.$$scope={dirty:_,ctx:t}),Pt.$set(lt);const Or={};_&2&&(Or.$$scope={dirty:_,ctx:t}),zt.$set(Or);const Lr={};_&2&&(Lr.$$scope={dirty:_,ctx:t}),Ft.$set(Lr);const Nr={};_&2&&(Nr.$$scope={dirty:_,ctx:t}),Ct.$set(Nr);const Sr={};_&2&&(Sr.$$scope={dirty:_,ctx:t}),At.$set(Sr);const Wr={};_&2&&(Wr.$$scope={dirty:_,ctx:t}),Dt.$set(Wr);const Br={};_&2&&(Br.$$scope={dirty:_,ctx:t}),Ot.$set(Br);const Hr={};_&2&&(Hr.$$scope={dirty:_,ctx:t}),Lt.$set(Hr);const dt={};_&2&&(dt.$$scope={dirty:_,ctx:t}),Nt.$set(dt);const Ur={};_&2&&(Ur.$$scope={dirty:_,ctx:t}),St.$set(Ur);const Kr={};_&2&&(Kr.$$scope={dirty:_,ctx:t}),Wt.$set(Kr);const q={};_&2&&(q.$$scope={dirty:_,ctx:t}),Ht.$set(q);const Rr={};_&2&&(Rr.$$scope={dirty:_,ctx:t}),Ut.$set(Rr);const Jr={};_&2&&(Jr.$$scope={dirty:_,ctx:t}),Rt.$set(Jr);const Yr={};_&2&&(Yr.$$scope={dirty:_,ctx:t}),Jt.$set(Yr)},i(t){Ts||(w(n.$$.fragment,t),w(le.$$.fragment,t),w(yo.$$.fragment,t),w(ko.$$.fragment,t),w(Go.$$.fragment,t),w(jo.$$.fragment,t),w(Po.$$.fragment,t),w(zo.$$.fragment,t),w($t.$$.fragment,t),w(Fo.$$.fragment,t),w(Co.$$.fragment,t),w(bt.$$.fragment,t),w(Ao.$$.fragment,t),w(Do.$$.fragment,t),w(No.$$.fragment,t),w(Vt.$$.fragment,t),w(xt.$$.fragment,t),w(So.$$.fragment,t),w(kt.$$.fragment,t),w(Gt.$$.fragment,t),w(Wo.$$.fragment,t),w(Mt.$$.fragment,t),w(jt.$$.fragment,t),w(Bo.$$.fragment,t),w(Ho.$$.fragment,t),w(Uo.$$.fragment,t),w(Pt.$$.fragment,t),w(zt.$$.fragment,t),w(Ko.$$.fragment,t),w(Ro.$$.fragment,t),w(Jo.$$.fragment,t),w(Ft.$$.fragment,t),w(Ct.$$.fragment,t),w(Yo.$$.fragment,t),w(Xo.$$.fragment,t),w(At.$$.fragment,t),w(tn.$$.fragment,t),w(Dt.$$.fragment,t),w(Ot.$$.fragment,t),w(on.$$.fragment,t),w(Lt.$$.fragment,t),w(Nt.$$.fragment,t),w(nn.$$.fragment,t),w(St.$$.fragment,t),w(Wt.$$.fragment,t),w(rn.$$.fragment,t),w(sn.$$.fragment,t),w(an.$$.fragment,t),w(Ht.$$.fragment,t),w(Ut.$$.fragment,t),w(ln.$$.fragment,t),w(dn.$$.fragment,t),w(pn.$$.fragment,t),w(Rt.$$.fragment,t),w(Jt.$$.fragment,t),Ts=!0)},o(t){V(n.$$.fragment,t),V(le.$$.fragment,t),V(yo.$$.fragment,t),V(ko.$$.fragment,t),V(Go.$$.fragment,t),V(jo.$$.fragment,t),V(Po.$$.fragment,t),V(zo.$$.fragment,t),V($t.$$.fragment,t),V(Fo.$$.fragment,t),V(Co.$$.fragment,t),V(bt.$$.fragment,t),V(Ao.$$.fragment,t),V(Do.$$.fragment,t),V(No.$$.fragment,t),V(Vt.$$.fragment,t),V(xt.$$.fragment,t),V(So.$$.fragment,t),V(kt.$$.fragment,t),V(Gt.$$.fragment,t),V(Wo.$$.fragment,t),V(Mt.$$.fragment,t),V(jt.$$.fragment,t),V(Bo.$$.fragment,t),V(Ho.$$.fragment,t),V(Uo.$$.fragment,t),V(Pt.$$.fragment,t),V(zt.$$.fragment,t),V(Ko.$$.fragment,t),V(Ro.$$.fragment,t),V(Jo.$$.fragment,t),V(Ft.$$.fragment,t),V(Ct.$$.fragment,t),V(Yo.$$.fragment,t),V(Xo.$$.fragment,t),V(At.$$.fragment,t),V(tn.$$.fragment,t),V(Dt.$$.fragment,t),V(Ot.$$.fragment,t),V(on.$$.fragment,t),V(Lt.$$.fragment,t),V(Nt.$$.fragment,t),V(nn.$$.fragment,t),V(St.$$.fragment,t),V(Wt.$$.fragment,t),V(rn.$$.fragment,t),V(sn.$$.fragment,t),V(an.$$.fragment,t),V(Ht.$$.fragment,t),V(Ut.$$.fragment,t),V(ln.$$.fragment,t),V(dn.$$.fragment,t),V(pn.$$.fragment,t),V(Rt.$$.fragment,t),V(Jt.$$.fragment,t),Ts=!1},d(t){o(d),t&&o(v),t&&o(u),x(n),t&&o(ke),t&&o(E),x(le),t&&o(pt),t&&o(C),t&&o(ut),t&&o(fe),t&&o(ft),t&&o(me),t&&o(he),t&&o(ge),t&&o(_e),t&&o(Te),t&&o(_o),t&&o(j),t&&o(Xr),t&&o(qe),x(yo),t&&o(Qr),t&&o(vn),t&&o(Zr),t&&o(gt),t&&o(es),t&&o(Fe),x(ko),t&&o(ts),t&&o(W),x(Go),x(jo),t&&o(os),t&&o(Ie),x(Po),t&&o(ns),t&&o(B),x(zo),x($t),t&&o(rs),t&&o(Oe),x(Fo),t&&o(ss),t&&o(H),x(Co),x(bt),t&&o(as),t&&o(Se),x(Ao),t&&o(is),t&&o(A),x(Do),x(No),x(Vt),x(xt),x(So),x(kt),x(Gt),x(Wo),x(Mt),x(jt),t&&o(ls),t&&o(Ue),x(Bo),t&&o(ds),t&&o(Ke),x(Ho),x(Uo),x(Pt),x(zt),t&&o(ps),t&&o(Je),x(Ko),t&&o(cs),t&&o(Ye),x(Ro),x(Jo),x(Ft),x(Ct),t&&o(us),t&&o(Qe),x(Yo),t&&o(fs),t&&o(z),x(Xo),x(At),x(tn),x(Dt),x(Ot),x(on),x(Lt),x(Nt),x(nn),x(St),x(Wt),t&&o(ms),t&&o(ot),x(rn),t&&o(hs),t&&o(nt),x(sn),x(an),x(Ht),x(Ut),t&&o(gs),t&&o(st),x(ln),t&&o(_s),t&&o(at),x(dn),x(pn),x(Rt),x(Jt)}}}const Qp={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 Zp(k){return Gp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ac extends wp{constructor(d){super();Vp(this,d,Zp,Xp,xp,{})}}export{ac as default,Qp as metadata};
