import{S as ja,i as Ja,s as Ua,e as o,k as h,w,t as l,M as Ia,c as n,d as t,m as f,a as r,x as _,h as i,b as c,G as s,g as M,y as b,q as T,o as j,B as J,v as Va,L as Xt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ta}from"../../chunks/Tip-hf-doc-builder.js";import{D as Ie}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ft}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Fe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Nt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ca(I){let d,v,g,m,y;return m=new Ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdml0Q29uZmlnJTJDJTIwVml2aXRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBWaVZpVCUyMGdvb2dsZSUyRnZpdml0LWItMTZ4Mi1raW5ldGljczQwMCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBWaXZpdENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBnb29nbGUlMkZ2aXZpdC1iLTE2eDIta2luZXRpY3M0MDAlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpdml0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VivitConfig, VivitModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ViViT google/vivit-b-16x2-kinetics400 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VivitConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the google/vivit-b-16x2-kinetics400 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VivitModel(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=o("p"),v=l("Example:"),g=h(),w(m.$$.fragment)},l(a){d=n(a,"P",{});var u=r(d);v=i(u,"Example:"),u.forEach(t),g=f(a),_(m.$$.fragment,a)},m(a,u){M(a,d,u),s(d,v),M(a,g,u),b(m,a,u),y=!0},p:Xt,i(a){y||(T(m.$$.fragment,a),y=!0)},o(a){j(m.$$.fragment,a),y=!1},d(a){a&&t(d),a&&t(g),J(m,a)}}}function Za(I){let d,v,g,m,y;return{c(){d=o("p"),v=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=o("code"),m=l("Module"),y=l(`
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(a){d=n(a,"P",{});var u=r(d);v=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n(u,"CODE",{});var Z=r(g);m=i(Z,"Module"),Z.forEach(t),y=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(a,u){M(a,d,u),s(d,v),s(d,g),s(g,m),s(d,y)},d(a){a&&t(d)}}}function Ba(I){let d,v,g,m,y;return m=new Ft({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VivitImageProcessor, VivitModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Sample a given number of frame indices from the video.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        clip_len (\`int\`): Total number of frames to sample.
<span class="hljs-meta">... </span>        frame_sample_rate (\`int\`): Sample every n-th frame.
<span class="hljs-meta">... </span>        seg_len (\`int\`): Maximum allowed index of sample&#x27;s last frame.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of sampled frame indices
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 32 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">32</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container=container, indices=indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = VivitImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vivit-b-16x2-kinetics400&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VivitModel.from_pretrained(<span class="hljs-string">&quot;google/vivit-b-16x2-kinetics400&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare video for the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">3137</span>, <span class="hljs-number">768</span>]`}}),{c(){d=o("p"),v=l("Examples:"),g=h(),w(m.$$.fragment)},l(a){d=n(a,"P",{});var u=r(d);v=i(u,"Examples:"),u.forEach(t),g=f(a),_(m.$$.fragment,a)},m(a,u){M(a,d,u),s(d,v),M(a,g,u),b(m,a,u),y=!0},p:Xt,i(a){y||(T(m.$$.fragment,a),y=!0)},o(a){j(m.$$.fragment,a),y=!1},d(a){a&&t(d),a&&t(g),J(m,a)}}}function Wa(I){let d,v,g,m,y;return{c(){d=o("p"),v=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=o("code"),m=l("Module"),y=l(`
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(a){d=n(a,"P",{});var u=r(d);v=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n(u,"CODE",{});var Z=r(g);m=i(Z,"Module"),Z.forEach(t),y=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(a,u){M(a,d,u),s(d,v),s(d,g),s(g,m),s(d,y)},d(a){a&&t(d)}}}function Ga(I){let d,v,g,m,y;return m=new Ft({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VivitImageProcessor, VivitForVideoClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Sample a given number of frame indices from the video.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        clip_len (\`int\`): Total number of frames to sample.
<span class="hljs-meta">... </span>        frame_sample_rate (\`int\`): Sample every n-th frame.
<span class="hljs-meta">... </span>        seg_len (\`int\`): Maximum allowed index of sample&#x27;s last frame.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of sampled frame indices
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 32 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">32</span>, frame_sample_rate=<span class="hljs-number">4</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container=container, indices=indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = VivitImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vivit-b-16x2-kinetics400&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VivitForVideoClassification.from_pretrained(<span class="hljs-string">&quot;google/vivit-b-16x2-kinetics400&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)
<span class="hljs-meta">... </span>    logits = outputs.logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 400 Kinetics-400 classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
LABEL_116`}}),{c(){d=o("p"),v=l("Examples:"),g=h(),w(m.$$.fragment)},l(a){d=n(a,"P",{});var u=r(d);v=i(u,"Examples:"),u.forEach(t),g=f(a),_(m.$$.fragment,a)},m(a,u){M(a,d,u),s(d,v),M(a,g,u),b(m,a,u),y=!0},p:Xt,i(a){y||(T(m.$$.fragment,a),y=!0)},o(a){j(m.$$.fragment,a),y=!1},d(a){a&&t(d),a&&t(g),J(m,a)}}}function ka(I){let d,v,g,m,y,a,u,Z,Zs,is,E,S,Se,ne,Bs,Ye,Ws,cs,Y,Gs,re,ks,Es,ds,Ve,zs,ps,Ce,Qe,As,ms,k,xs,le,Rs,$s,ie,Ns,Xs,hs,z,Q,Pe,ce,Fs,De,Ss,fs,U,de,Ys,A,Qs,Ze,Ps,Ds,pe,Ls,qs,Hs,x,Ks,Be,Os,et,We,st,tt,at,P,us,R,D,Le,me,ot,qe,nt,gs,B,he,rt,He,lt,it,L,fe,ct,Ke,dt,Ms,$,q,Oe,ue,pt,es,mt,ys,W,ge,ht,Me,ft,ye,ut,gt,Mt,V,ve,yt,N,vt,Ge,wt,_t,ss,bt,Tt,jt,H,Jt,K,vs,X,O,ts,we,Ut,as,It,ws,G,_e,Vt,be,Ct,Te,Zt,Bt,Wt,C,je,Gt,F,kt,ke,Et,zt,os,At,xt,Rt,ee,$t,se,_s;return a=new Fe({}),ne=new Fe({}),ce=new Fe({}),de=new Ie({props:{name:"class transformers.VivitConfig",anchor:"transformers.VivitConfig",parameters:[{name:"image_size",val:" = 224"},{name:"num_frames",val:" = 32"},{name:"tubelet_size",val:" = [2, 16, 16]"},{name:"num_channels",val:" = 3"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu_fast'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VivitConfig.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.VivitConfig.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of frames in each video.`,name:"num_frames"},{anchor:"transformers.VivitConfig.tubelet_size",description:`<strong>tubelet_size</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 16, 16]</code>) &#x2014;
The size (resolution) of each tubelet.`,name:"tubelet_size"},{anchor:"transformers.VivitConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.VivitConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.VivitConfig.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.VivitConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.VivitConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.VivitConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_fast&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>, <code>&quot;gelu_fast&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.VivitConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</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:"hidden_dropout_prob"},{anchor:"transformers.VivitConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.VivitConfig.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.VivitConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VivitConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/vivit/configuration_vivit.py#L31"}}),P=new Nt({props:{anchor:"transformers.VivitConfig.example",$$slots:{default:[Ca]},$$scope:{ctx:I}}}),me=new Fe({}),he=new Ie({props:{name:"class transformers.VivitImageProcessor",anchor:"transformers.VivitImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00784313725490196"},{name:"offset",val:": bool = True"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VivitImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.VivitImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 256}</code>):
Size of the output image after resizing. The shortest edge of the image will be resized to
<code>size[&quot;shortest_edge&quot;]</code> while maintaining the aspect ratio of the original image. Can be overriden by
<code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.VivitImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.VivitImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by the <code>do_center_crop</code>
parameter in the <code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.VivitImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after applying the center crop. Can be overridden by the <code>crop_size</code> parameter in the
<code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.VivitImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.VivitImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 1/127.5) &#x2014;
Defines the scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter
in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.VivitImageProcessor.offset",description:`<strong>offset</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to scale the image in both negative and positive directions. Can be overriden by the <code>offset</code> in
the <code>preprocess</code> method.`,name:"offset"},{anchor:"transformers.VivitImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.VivitImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.VivitImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/vivit/image_processing_vivit.py#L64"}}),fe=new Ie({props:{name:"preprocess",anchor:"transformers.VivitImageProcessor.preprocess",parameters:[{name:"videos",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"offset",val:": bool = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VivitImageProcessor.preprocess.videos",description:`<strong>videos</strong> (<code>ImageInput</code>) &#x2014;
Video frames to preprocess. Expects a single or batch of video frames with pixel values ranging from 0
to 255. If passing in frames with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"videos"},{anchor:"transformers.VivitImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.VivitImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after applying resize.`,name:"size"},{anchor:"transformers.VivitImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>, Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.VivitImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_centre_crop</code>) &#x2014;
Whether to centre crop the image.`,name:"do_center_crop"},{anchor:"transformers.VivitImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the image after applying the centre crop.`,name:"crop_size"},{anchor:"transformers.VivitImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between <code>[-1 - 1]</code> if <code>offset</code> is <code>True</code>, <code>[0, 1]</code> otherwise.`,name:"do_rescale"},{anchor:"transformers.VivitImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.VivitImageProcessor.preprocess.offset",description:`<strong>offset</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.offset</code>) &#x2014;
Whether to scale the image in both negative and positive directions.`,name:"offset"},{anchor:"transformers.VivitImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.VivitImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.VivitImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.VivitImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.VivitImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the inferred channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.VivitImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/vivit/image_processing_vivit.py#L285"}}),ue=new Fe({}),ge=new Ie({props:{name:"class transformers.VivitModel",anchor:"transformers.VivitModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.VivitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitConfig">VivitConfig</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.33.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.33.0/src/transformers/models/vivit/modeling_vivit.py#L460"}}),ve=new Ie({props:{name:"forward",anchor:"transformers.VivitModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",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.VivitModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitImageProcessor">VivitImageProcessor</a>. See
<a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitImageProcessor.preprocess">VivitImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VivitModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VivitModel.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.VivitModel.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.VivitModel.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.33.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.33.0/src/transformers/models/vivit/modeling_vivit.py#L488",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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 (<a
  href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitConfig"
>VivitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \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.33.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),H=new Ta({props:{$$slots:{default:[Za]},$$scope:{ctx:I}}}),K=new Nt({props:{anchor:"transformers.VivitModel.forward.example",$$slots:{default:[Ba]},$$scope:{ctx:I}}}),we=new Fe({}),_e=new Ie({props:{name:"class transformers.VivitForVideoClassification",anchor:"transformers.VivitForVideoClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VivitForVideoClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitConfig">VivitConfig</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.33.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.33.0/src/transformers/models/vivit/modeling_vivit.py#L614"}}),je=new Ie({props:{name:"forward",anchor:"transformers.VivitForVideoClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.VivitForVideoClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitImageProcessor">VivitImageProcessor</a>. See
<a href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitImageProcessor.preprocess">VivitImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VivitForVideoClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VivitForVideoClassification.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.VivitForVideoClassification.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.VivitForVideoClassification.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.VivitForVideoClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/vivit/modeling_vivit.py#L627",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitConfig"
>VivitConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</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 stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</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, patch_size, 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.33.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new Ta({props:{$$slots:{default:[Wa]},$$scope:{ctx:I}}}),se=new Nt({props:{anchor:"transformers.VivitForVideoClassification.forward.example",$$slots:{default:[Ga]},$$scope:{ctx:I}}}),{c(){d=o("meta"),v=h(),g=o("h1"),m=o("a"),y=o("span"),w(a.$$.fragment),u=h(),Z=o("span"),Zs=l("Video Vision Transformer (ViViT)"),is=h(),E=o("h2"),S=o("a"),Se=o("span"),w(ne.$$.fragment),Bs=h(),Ye=o("span"),Ws=l("Overview"),cs=h(),Y=o("p"),Gs=l("The Vivit model was proposed in "),re=o("a"),ks=l("ViViT: A Video Vision Transformer"),Es=l(` by Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Lu\u010Di\u0107, Cordelia Schmid.
The paper proposes one of the first successful pure-transformer based set of models for video understanding.`),ds=h(),Ve=o("p"),zs=l("The abstract from the paper is the following:"),ps=h(),Ce=o("p"),Qe=o("em"),As=l("We present pure-transformer based models for video classification, drawing upon the recent success of such models in image classification. Our model extracts spatio-temporal tokens from the input video, which are then encoded by a series of transformer layers. In order to handle the long sequences of tokens encountered in video, we propose several, efficient variants of our model which factorise the spatial- and temporal-dimensions of the input. Although transformer-based models are known to only be effective when large training datasets are available, we show how we can effectively regularise the model during training and leverage pretrained image models to be able to train on comparatively small datasets. We conduct thorough ablation studies, and achieve state-of-the-art results on multiple video classification benchmarks including Kinetics 400 and 600, Epic Kitchens, Something-Something v2 and Moments in Time, outperforming prior methods based on deep 3D convolutional networks."),ms=h(),k=o("p"),xs=l("This model was contributed by "),le=o("a"),Rs=l("jegormeister"),$s=l(". The original code (written in JAX) can be found "),ie=o("a"),Ns=l("here"),Xs=l("."),hs=h(),z=o("h2"),Q=o("a"),Pe=o("span"),w(ce.$$.fragment),Fs=h(),De=o("span"),Ss=l("VivitConfig"),fs=h(),U=o("div"),w(de.$$.fragment),Ys=h(),A=o("p"),Qs=l("This is the configuration class to store the configuration of a "),Ze=o("a"),Ps=l("VivitModel"),Ds=l(`. It is used to instantiate a ViViT
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 ViViT
`),pe=o("a"),Ls=l("google/vivit-b-16x2-kinetics400"),qs=l(" architecture."),Hs=h(),x=o("p"),Ks=l("Configuration objects inherit from "),Be=o("a"),Os=l("PretrainedConfig"),et=l(` and can be used to control the model outputs. Read the
documentation from `),We=o("a"),st=l("PretrainedConfig"),tt=l(" for more information."),at=h(),w(P.$$.fragment),us=h(),R=o("h2"),D=o("a"),Le=o("span"),w(me.$$.fragment),ot=h(),qe=o("span"),nt=l("VivitImageProcessor"),gs=h(),B=o("div"),w(he.$$.fragment),rt=h(),He=o("p"),lt=l("Constructs a Vivit image processor."),it=h(),L=o("div"),w(fe.$$.fragment),ct=h(),Ke=o("p"),dt=l("Preprocess an image or batch of images."),Ms=h(),$=o("h2"),q=o("a"),Oe=o("span"),w(ue.$$.fragment),pt=h(),es=o("span"),mt=l("VivitModel"),ys=h(),W=o("div"),w(ge.$$.fragment),ht=h(),Me=o("p"),ft=l(`The bare ViViT Transformer model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ye=o("a"),ut=l("torch.nn.Module"),gt=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Mt=h(),V=o("div"),w(ve.$$.fragment),yt=h(),N=o("p"),vt=l("The "),Ge=o("a"),wt=l("VivitModel"),_t=l(" forward method, overrides the "),ss=o("code"),bt=l("__call__"),Tt=l(" special method."),jt=h(),w(H.$$.fragment),Jt=h(),w(K.$$.fragment),vs=h(),X=o("h2"),O=o("a"),ts=o("span"),w(we.$$.fragment),Ut=h(),as=o("span"),It=l("VivitForVideoClassification"),ws=h(),G=o("div"),w(_e.$$.fragment),Vt=h(),be=o("p"),Ct=l(`ViViT Transformer model with a video classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for Kinetics-400.
This model is a PyTorch `),Te=o("a"),Zt=l("torch.nn.Module"),Bt=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wt=h(),C=o("div"),w(je.$$.fragment),Gt=h(),F=o("p"),kt=l("The "),ke=o("a"),Et=l("VivitForVideoClassification"),zt=l(" forward method, overrides the "),os=o("code"),At=l("__call__"),xt=l(" special method."),Rt=h(),w(ee.$$.fragment),$t=h(),w(se.$$.fragment),this.h()},l(e){const p=Ia('[data-svelte="svelte-1phssyn"]',document.head);d=n(p,"META",{name:!0,content:!0}),p.forEach(t),v=f(e),g=n(e,"H1",{class:!0});var Je=r(g);m=n(Je,"A",{id:!0,class:!0,href:!0});var ns=r(m);y=n(ns,"SPAN",{});var rs=r(y);_(a.$$.fragment,rs),rs.forEach(t),ns.forEach(t),u=f(Je),Z=n(Je,"SPAN",{});var ls=r(Z);Zs=i(ls,"Video Vision Transformer (ViViT)"),ls.forEach(t),Je.forEach(t),is=f(e),E=n(e,"H2",{class:!0});var Ue=r(E);S=n(Ue,"A",{id:!0,class:!0,href:!0});var St=r(S);Se=n(St,"SPAN",{});var Yt=r(Se);_(ne.$$.fragment,Yt),Yt.forEach(t),St.forEach(t),Bs=f(Ue),Ye=n(Ue,"SPAN",{});var Qt=r(Ye);Ws=i(Qt,"Overview"),Qt.forEach(t),Ue.forEach(t),cs=f(e),Y=n(e,"P",{});var bs=r(Y);Gs=i(bs,"The Vivit model was proposed in "),re=n(bs,"A",{href:!0,rel:!0});var Pt=r(re);ks=i(Pt,"ViViT: A Video Vision Transformer"),Pt.forEach(t),Es=i(bs,` by Anurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun, Mario Lu\u010Di\u0107, Cordelia Schmid.
The paper proposes one of the first successful pure-transformer based set of models for video understanding.`),bs.forEach(t),ds=f(e),Ve=n(e,"P",{});var Dt=r(Ve);zs=i(Dt,"The abstract from the paper is the following:"),Dt.forEach(t),ps=f(e),Ce=n(e,"P",{});var Lt=r(Ce);Qe=n(Lt,"EM",{});var qt=r(Qe);As=i(qt,"We present pure-transformer based models for video classification, drawing upon the recent success of such models in image classification. Our model extracts spatio-temporal tokens from the input video, which are then encoded by a series of transformer layers. In order to handle the long sequences of tokens encountered in video, we propose several, efficient variants of our model which factorise the spatial- and temporal-dimensions of the input. Although transformer-based models are known to only be effective when large training datasets are available, we show how we can effectively regularise the model during training and leverage pretrained image models to be able to train on comparatively small datasets. We conduct thorough ablation studies, and achieve state-of-the-art results on multiple video classification benchmarks including Kinetics 400 and 600, Epic Kitchens, Something-Something v2 and Moments in Time, outperforming prior methods based on deep 3D convolutional networks."),qt.forEach(t),Lt.forEach(t),ms=f(e),k=n(e,"P",{});var Ee=r(k);xs=i(Ee,"This model was contributed by "),le=n(Ee,"A",{href:!0,rel:!0});var Ht=r(le);Rs=i(Ht,"jegormeister"),Ht.forEach(t),$s=i(Ee,". The original code (written in JAX) can be found "),ie=n(Ee,"A",{href:!0,rel:!0});var Kt=r(ie);Ns=i(Kt,"here"),Kt.forEach(t),Xs=i(Ee,"."),Ee.forEach(t),hs=f(e),z=n(e,"H2",{class:!0});var Ts=r(z);Q=n(Ts,"A",{id:!0,class:!0,href:!0});var Ot=r(Q);Pe=n(Ot,"SPAN",{});var ea=r(Pe);_(ce.$$.fragment,ea),ea.forEach(t),Ot.forEach(t),Fs=f(Ts),De=n(Ts,"SPAN",{});var sa=r(De);Ss=i(sa,"VivitConfig"),sa.forEach(t),Ts.forEach(t),fs=f(e),U=n(e,"DIV",{class:!0});var te=r(U);_(de.$$.fragment,te),Ys=f(te),A=n(te,"P",{});var ze=r(A);Qs=i(ze,"This is the configuration class to store the configuration of a "),Ze=n(ze,"A",{href:!0});var ta=r(Ze);Ps=i(ta,"VivitModel"),ta.forEach(t),Ds=i(ze,`. It is used to instantiate a ViViT
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 ViViT
`),pe=n(ze,"A",{href:!0,rel:!0});var aa=r(pe);Ls=i(aa,"google/vivit-b-16x2-kinetics400"),aa.forEach(t),qs=i(ze," architecture."),ze.forEach(t),Hs=f(te),x=n(te,"P",{});var Ae=r(x);Ks=i(Ae,"Configuration objects inherit from "),Be=n(Ae,"A",{href:!0});var oa=r(Be);Os=i(oa,"PretrainedConfig"),oa.forEach(t),et=i(Ae,` and can be used to control the model outputs. Read the
documentation from `),We=n(Ae,"A",{href:!0});var na=r(We);st=i(na,"PretrainedConfig"),na.forEach(t),tt=i(Ae," for more information."),Ae.forEach(t),at=f(te),_(P.$$.fragment,te),te.forEach(t),us=f(e),R=n(e,"H2",{class:!0});var js=r(R);D=n(js,"A",{id:!0,class:!0,href:!0});var ra=r(D);Le=n(ra,"SPAN",{});var la=r(Le);_(me.$$.fragment,la),la.forEach(t),ra.forEach(t),ot=f(js),qe=n(js,"SPAN",{});var ia=r(qe);nt=i(ia,"VivitImageProcessor"),ia.forEach(t),js.forEach(t),gs=f(e),B=n(e,"DIV",{class:!0});var xe=r(B);_(he.$$.fragment,xe),rt=f(xe),He=n(xe,"P",{});var ca=r(He);lt=i(ca,"Constructs a Vivit image processor."),ca.forEach(t),it=f(xe),L=n(xe,"DIV",{class:!0});var Js=r(L);_(fe.$$.fragment,Js),ct=f(Js),Ke=n(Js,"P",{});var da=r(Ke);dt=i(da,"Preprocess an image or batch of images."),da.forEach(t),Js.forEach(t),xe.forEach(t),Ms=f(e),$=n(e,"H2",{class:!0});var Us=r($);q=n(Us,"A",{id:!0,class:!0,href:!0});var pa=r(q);Oe=n(pa,"SPAN",{});var ma=r(Oe);_(ue.$$.fragment,ma),ma.forEach(t),pa.forEach(t),pt=f(Us),es=n(Us,"SPAN",{});var ha=r(es);mt=i(ha,"VivitModel"),ha.forEach(t),Us.forEach(t),ys=f(e),W=n(e,"DIV",{class:!0});var Re=r(W);_(ge.$$.fragment,Re),ht=f(Re),Me=n(Re,"P",{});var Is=r(Me);ft=i(Is,`The bare ViViT Transformer model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ye=n(Is,"A",{href:!0,rel:!0});var fa=r(ye);ut=i(fa,"torch.nn.Module"),fa.forEach(t),gt=i(Is,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Is.forEach(t),Mt=f(Re),V=n(Re,"DIV",{class:!0});var ae=r(V);_(ve.$$.fragment,ae),yt=f(ae),N=n(ae,"P",{});var $e=r(N);vt=i($e,"The "),Ge=n($e,"A",{href:!0});var ua=r(Ge);wt=i(ua,"VivitModel"),ua.forEach(t),_t=i($e," forward method, overrides the "),ss=n($e,"CODE",{});var ga=r(ss);bt=i(ga,"__call__"),ga.forEach(t),Tt=i($e," special method."),$e.forEach(t),jt=f(ae),_(H.$$.fragment,ae),Jt=f(ae),_(K.$$.fragment,ae),ae.forEach(t),Re.forEach(t),vs=f(e),X=n(e,"H2",{class:!0});var Vs=r(X);O=n(Vs,"A",{id:!0,class:!0,href:!0});var Ma=r(O);ts=n(Ma,"SPAN",{});var ya=r(ts);_(we.$$.fragment,ya),ya.forEach(t),Ma.forEach(t),Ut=f(Vs),as=n(Vs,"SPAN",{});var va=r(as);It=i(va,"VivitForVideoClassification"),va.forEach(t),Vs.forEach(t),ws=f(e),G=n(e,"DIV",{class:!0});var Ne=r(G);_(_e.$$.fragment,Ne),Vt=f(Ne),be=n(Ne,"P",{});var Cs=r(be);Ct=i(Cs,`ViViT Transformer model with a video classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for Kinetics-400.
This model is a PyTorch `),Te=n(Cs,"A",{href:!0,rel:!0});var wa=r(Te);Zt=i(wa,"torch.nn.Module"),wa.forEach(t),Bt=i(Cs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cs.forEach(t),Wt=f(Ne),C=n(Ne,"DIV",{class:!0});var oe=r(C);_(je.$$.fragment,oe),Gt=f(oe),F=n(oe,"P",{});var Xe=r(F);kt=i(Xe,"The "),ke=n(Xe,"A",{href:!0});var _a=r(ke);Et=i(_a,"VivitForVideoClassification"),_a.forEach(t),zt=i(Xe," forward method, overrides the "),os=n(Xe,"CODE",{});var ba=r(os);At=i(ba,"__call__"),ba.forEach(t),xt=i(Xe," special method."),Xe.forEach(t),Rt=f(oe),_(ee.$$.fragment,oe),$t=f(oe),_(se.$$.fragment,oe),oe.forEach(t),Ne.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Ea)),c(m,"id","video-vision-transformer-vivit"),c(m,"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"),c(m,"href","#video-vision-transformer-vivit"),c(g,"class","relative group"),c(S,"id","overview"),c(S,"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"),c(S,"href","#overview"),c(E,"class","relative group"),c(re,"href","https://arxiv.org/abs/2103.15691"),c(re,"rel","nofollow"),c(le,"href","https://huggingface.co/jegormeister"),c(le,"rel","nofollow"),c(ie,"href","https://github.com/google-research/scenic/tree/main/scenic/projects/vivit"),c(ie,"rel","nofollow"),c(Q,"id","transformers.VivitConfig"),c(Q,"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"),c(Q,"href","#transformers.VivitConfig"),c(z,"class","relative group"),c(Ze,"href","/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitModel"),c(pe,"href","https://huggingface.co/google/vivit-b-16x2-kinetics400"),c(pe,"rel","nofollow"),c(Be,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(We,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"id","transformers.VivitImageProcessor"),c(D,"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"),c(D,"href","#transformers.VivitImageProcessor"),c(R,"class","relative group"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"id","transformers.VivitModel"),c(q,"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"),c(q,"href","#transformers.VivitModel"),c($,"class","relative group"),c(ye,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ye,"rel","nofollow"),c(Ge,"href","/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitModel"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(O,"id","transformers.VivitForVideoClassification"),c(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(O,"href","#transformers.VivitForVideoClassification"),c(X,"class","relative group"),c(Te,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Te,"rel","nofollow"),c(ke,"href","/docs/transformers/v4.33.0/en/model_doc/vivit#transformers.VivitForVideoClassification"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,p){s(document.head,d),M(e,v,p),M(e,g,p),s(g,m),s(m,y),b(a,y,null),s(g,u),s(g,Z),s(Z,Zs),M(e,is,p),M(e,E,p),s(E,S),s(S,Se),b(ne,Se,null),s(E,Bs),s(E,Ye),s(Ye,Ws),M(e,cs,p),M(e,Y,p),s(Y,Gs),s(Y,re),s(re,ks),s(Y,Es),M(e,ds,p),M(e,Ve,p),s(Ve,zs),M(e,ps,p),M(e,Ce,p),s(Ce,Qe),s(Qe,As),M(e,ms,p),M(e,k,p),s(k,xs),s(k,le),s(le,Rs),s(k,$s),s(k,ie),s(ie,Ns),s(k,Xs),M(e,hs,p),M(e,z,p),s(z,Q),s(Q,Pe),b(ce,Pe,null),s(z,Fs),s(z,De),s(De,Ss),M(e,fs,p),M(e,U,p),b(de,U,null),s(U,Ys),s(U,A),s(A,Qs),s(A,Ze),s(Ze,Ps),s(A,Ds),s(A,pe),s(pe,Ls),s(A,qs),s(U,Hs),s(U,x),s(x,Ks),s(x,Be),s(Be,Os),s(x,et),s(x,We),s(We,st),s(x,tt),s(U,at),b(P,U,null),M(e,us,p),M(e,R,p),s(R,D),s(D,Le),b(me,Le,null),s(R,ot),s(R,qe),s(qe,nt),M(e,gs,p),M(e,B,p),b(he,B,null),s(B,rt),s(B,He),s(He,lt),s(B,it),s(B,L),b(fe,L,null),s(L,ct),s(L,Ke),s(Ke,dt),M(e,Ms,p),M(e,$,p),s($,q),s(q,Oe),b(ue,Oe,null),s($,pt),s($,es),s(es,mt),M(e,ys,p),M(e,W,p),b(ge,W,null),s(W,ht),s(W,Me),s(Me,ft),s(Me,ye),s(ye,ut),s(Me,gt),s(W,Mt),s(W,V),b(ve,V,null),s(V,yt),s(V,N),s(N,vt),s(N,Ge),s(Ge,wt),s(N,_t),s(N,ss),s(ss,bt),s(N,Tt),s(V,jt),b(H,V,null),s(V,Jt),b(K,V,null),M(e,vs,p),M(e,X,p),s(X,O),s(O,ts),b(we,ts,null),s(X,Ut),s(X,as),s(as,It),M(e,ws,p),M(e,G,p),b(_e,G,null),s(G,Vt),s(G,be),s(be,Ct),s(be,Te),s(Te,Zt),s(be,Bt),s(G,Wt),s(G,C),b(je,C,null),s(C,Gt),s(C,F),s(F,kt),s(F,ke),s(ke,Et),s(F,zt),s(F,os),s(os,At),s(F,xt),s(C,Rt),b(ee,C,null),s(C,$t),b(se,C,null),_s=!0},p(e,[p]){const Je={};p&2&&(Je.$$scope={dirty:p,ctx:e}),P.$set(Je);const ns={};p&2&&(ns.$$scope={dirty:p,ctx:e}),H.$set(ns);const rs={};p&2&&(rs.$$scope={dirty:p,ctx:e}),K.$set(rs);const ls={};p&2&&(ls.$$scope={dirty:p,ctx:e}),ee.$set(ls);const Ue={};p&2&&(Ue.$$scope={dirty:p,ctx:e}),se.$set(Ue)},i(e){_s||(T(a.$$.fragment,e),T(ne.$$.fragment,e),T(ce.$$.fragment,e),T(de.$$.fragment,e),T(P.$$.fragment,e),T(me.$$.fragment,e),T(he.$$.fragment,e),T(fe.$$.fragment,e),T(ue.$$.fragment,e),T(ge.$$.fragment,e),T(ve.$$.fragment,e),T(H.$$.fragment,e),T(K.$$.fragment,e),T(we.$$.fragment,e),T(_e.$$.fragment,e),T(je.$$.fragment,e),T(ee.$$.fragment,e),T(se.$$.fragment,e),_s=!0)},o(e){j(a.$$.fragment,e),j(ne.$$.fragment,e),j(ce.$$.fragment,e),j(de.$$.fragment,e),j(P.$$.fragment,e),j(me.$$.fragment,e),j(he.$$.fragment,e),j(fe.$$.fragment,e),j(ue.$$.fragment,e),j(ge.$$.fragment,e),j(ve.$$.fragment,e),j(H.$$.fragment,e),j(K.$$.fragment,e),j(we.$$.fragment,e),j(_e.$$.fragment,e),j(je.$$.fragment,e),j(ee.$$.fragment,e),j(se.$$.fragment,e),_s=!1},d(e){t(d),e&&t(v),e&&t(g),J(a),e&&t(is),e&&t(E),J(ne),e&&t(cs),e&&t(Y),e&&t(ds),e&&t(Ve),e&&t(ps),e&&t(Ce),e&&t(ms),e&&t(k),e&&t(hs),e&&t(z),J(ce),e&&t(fs),e&&t(U),J(de),J(P),e&&t(us),e&&t(R),J(me),e&&t(gs),e&&t(B),J(he),J(fe),e&&t(Ms),e&&t($),J(ue),e&&t(ys),e&&t(W),J(ge),J(ve),J(H),J(K),e&&t(vs),e&&t(X),J(we),e&&t(ws),e&&t(G),J(_e),J(je),J(ee),J(se)}}}const Ea={local:"video-vision-transformer-vivit",sections:[{local:"overview",title:"Overview"},{local:"transformers.VivitConfig",title:"VivitConfig"},{local:"transformers.VivitImageProcessor",title:"VivitImageProcessor"},{local:"transformers.VivitModel",title:"VivitModel"},{local:"transformers.VivitForVideoClassification",title:"VivitForVideoClassification"}],title:"Video Vision Transformer (ViViT)"};function za(I){return Va(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fa extends ja{constructor(d){super();Ja(this,d,za,ka,Ua,{})}}export{Fa as default,Ea as metadata};
