import{S as un,i as _n,s as vn,e as s,k as m,w as E,t as i,M as bn,c as a,d as t,m as p,a as r,x as M,h as d,b as l,N as En,G as o,g as f,y as A,q as y,o as w,B as V,v as Mn,L as ss}from"../../chunks/vendor-hf-doc-builder.js";import{T as cr}from"../../chunks/Tip-hf-doc-builder.js";import{D as S}from"../../chunks/Docstring-hf-doc-builder.js";import{C as as}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ts}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function An($){let h,b,_,g,v;return g=new as({props:{code:`from transformers import VideoMAEConfig, VideoMAEModel

# Initializing a VideoMAE videomae-base style configuration
configuration = VideoMAEConfig()

# Randomly initializing a model from the configuration
model = VideoMAEModel(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> VideoMAEConfig, VideoMAEModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a VideoMAE videomae-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VideoMAEConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Randomly initializing a model from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEModel(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(){h=s("p"),b=i("Example:"),_=m(),E(g.$$.fragment)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Example:"),u.forEach(t),_=p(n),M(g.$$.fragment,n)},m(n,u){f(n,h,u),o(h,b),f(n,_,u),A(g,n,u),v=!0},p:ss,i(n){v||(y(g.$$.fragment,n),v=!0)},o(n){w(g.$$.fragment,n),v=!1},d(n){n&&t(h),n&&t(_),V(g,n)}}}function yn($){let h,b,_,g,v;return{c(){h=s("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var T=r(_);g=d(T,"Module"),T.forEach(t),v=d(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(n,u){f(n,h,u),o(h,b),o(h,_),o(_,g),o(h,v)},d(n){n&&t(h)}}}function wn($){let h,b,_,g,v;return g=new as({props:{code:`from decord import VideoReader, cpu
import numpy as np

from transformers import VideoMAEImageProcessor, VideoMAEModel
from huggingface_hub import hf_hub_download


def sample_frame_indices(clip_len, frame_sample_rate, seg_len):
    converted_len = int(clip_len * frame_sample_rate)
    end_idx = np.random.randint(converted_len, seg_len)
    start_idx = end_idx - converted_len
    indices = np.linspace(start_idx, end_idx, num=clip_len)
    indices = np.clip(indices, start_idx, end_idx - 1).astype(np.int64)
    return indices


# video clip consists of 300 frames (10 seconds at 30 FPS)
file_path = hf_hub_download(
    repo_id="nielsr/video-demo", filename="eating_spaghetti.mp4", repo_type="dataset"
)
videoreader = VideoReader(file_path, num_threads=1, ctx=cpu(0))

# sample 16 frames
videoreader.seek(0)
indices = sample_frame_indices(clip_len=16, frame_sample_rate=4, seg_len=len(videoreader))
video = videoreader.get_batch(indices).asnumpy()

image_processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base")
model = VideoMAEModel.from_pretrained("MCG-NJU/videomae-base")

# prepare video for the model
inputs = image_processor(list(video), return_tensors="pt")

# forward pass
outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> decord <span class="hljs-keyword">import</span> VideoReader, cpu
<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> VideoMAEImageProcessor, VideoMAEModel
<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><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>    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>videoreader = VideoReader(file_path, num_threads=<span class="hljs-number">1</span>, ctx=cpu(<span class="hljs-number">0</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 16 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>videoreader.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">16</span>, frame_sample_rate=<span class="hljs-number">4</span>, seg_len=<span class="hljs-built_in">len</span>(videoreader))
<span class="hljs-meta">&gt;&gt;&gt; </span>video = videoreader.get_batch(indices).asnumpy()

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = VideoMAEImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEModel.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&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">1568</span>, <span class="hljs-number">768</span>]`}}),{c(){h=s("p"),b=i("Examples:"),_=m(),E(g.$$.fragment)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Examples:"),u.forEach(t),_=p(n),M(g.$$.fragment,n)},m(n,u){f(n,h,u),o(h,b),f(n,_,u),A(g,n,u),v=!0},p:ss,i(n){v||(y(g.$$.fragment,n),v=!0)},o(n){w(g.$$.fragment,n),v=!1},d(n){n&&t(h),n&&t(_),V(g,n)}}}function Vn($){let h,b,_,g,v;return{c(){h=s("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var T=r(_);g=d(T,"Module"),T.forEach(t),v=d(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(n,u){f(n,h,u),o(h,b),o(h,_),o(_,g),o(h,v)},d(n){n&&t(h)}}}function $n($){let h,b,_,g,v;return g=new as({props:{code:`from transformers import VideoMAEImageProcessor, VideoMAEForPreTraining
import numpy as np
import torch

num_frames = 16
video = list(np.random.randn(16, 3, 224, 224))

image_processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base")
model = VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-base")

pixel_values = image_processor(video, return_tensors="pt").pixel_values

num_patches_per_frame = (model.config.image_size // model.config.patch_size) ** 2
seq_length = (num_frames // model.config.tubelet_size) * num_patches_per_frame
bool_masked_pos = torch.randint(0, 2, (1, seq_length)).bool()

outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VideoMAEImageProcessor, VideoMAEForPreTraining
<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>num_frames = <span class="hljs-number">16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video = <span class="hljs-built_in">list</span>(np.random.randn(<span class="hljs-number">16</span>, <span class="hljs-number">3</span>, <span class="hljs-number">224</span>, <span class="hljs-number">224</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = VideoMAEImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEForPreTraining.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>num_patches_per_frame = (model.config.image_size // model.config.patch_size) ** <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_length = (num_frames // model.config.tubelet_size) * num_patches_per_frame
<span class="hljs-meta">&gt;&gt;&gt; </span>bool_masked_pos = torch.randint(<span class="hljs-number">0</span>, <span class="hljs-number">2</span>, (<span class="hljs-number">1</span>, seq_length)).<span class="hljs-built_in">bool</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){h=s("p"),b=i("Examples:"),_=m(),E(g.$$.fragment)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Examples:"),u.forEach(t),_=p(n),M(g.$$.fragment,n)},m(n,u){f(n,h,u),o(h,b),f(n,_,u),A(g,n,u),v=!0},p:ss,i(n){v||(y(g.$$.fragment,n),v=!0)},o(n){w(g.$$.fragment,n),v=!1},d(n){n&&t(h),n&&t(_),V(g,n)}}}function Tn($){let h,b,_,g,v;return{c(){h=s("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var T=r(_);g=d(T,"Module"),T.forEach(t),v=d(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(n,u){f(n,h,u),o(h,b),o(h,_),o(_,g),o(h,v)},d(n){n&&t(h)}}}function Pn($){let h,b,_,g,v;return g=new as({props:{code:`from decord import VideoReader, cpu
import torch
import numpy as np

from transformers import VideoMAEImageProcessor, VideoMAEForVideoClassification
from huggingface_hub import hf_hub_download

np.random.seed(0)


def sample_frame_indices(clip_len, frame_sample_rate, seg_len):
    converted_len = int(clip_len * frame_sample_rate)
    end_idx = np.random.randint(converted_len, seg_len)
    start_idx = end_idx - converted_len
    indices = np.linspace(start_idx, end_idx, num=clip_len)
    indices = np.clip(indices, start_idx, end_idx - 1).astype(np.int64)
    return indices


# video clip consists of 300 frames (10 seconds at 30 FPS)
file_path = hf_hub_download(
    repo_id="nielsr/video-demo", filename="eating_spaghetti.mp4", repo_type="dataset"
)
videoreader = VideoReader(file_path, num_threads=1, ctx=cpu(0))

# sample 16 frames
videoreader.seek(0)
indices = sample_frame_indices(clip_len=16, frame_sample_rate=4, seg_len=len(videoreader))
video = videoreader.get_batch(indices).asnumpy()

image_processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics")
model = VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics")

inputs = image_processor(list(video), return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits

# model predicts one of the 400 Kinetics-400 classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> decord <span class="hljs-keyword">import</span> VideoReader, cpu
<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">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> VideoMAEImageProcessor, VideoMAEForVideoClassification
<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_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</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>videoreader = VideoReader(file_path, num_threads=<span class="hljs-number">1</span>, ctx=cpu(<span class="hljs-number">0</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 16 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>videoreader.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">16</span>, frame_sample_rate=<span class="hljs-number">4</span>, seg_len=<span class="hljs-built_in">len</span>(videoreader))
<span class="hljs-meta">&gt;&gt;&gt; </span>video = videoreader.get_batch(indices).asnumpy()

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = VideoMAEImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base-finetuned-kinetics&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEForVideoClassification.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base-finetuned-kinetics&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])
eating spaghetti`}}),{c(){h=s("p"),b=i("Examples:"),_=m(),E(g.$$.fragment)},l(n){h=a(n,"P",{});var u=r(h);b=d(u,"Examples:"),u.forEach(t),_=p(n),M(g.$$.fragment,n)},m(n,u){f(n,h,u),o(h,b),f(n,_,u),A(g,n,u),v=!0},p:ss,i(n){v||(y(g.$$.fragment,n),v=!0)},o(n){w(g.$$.fragment,n),v=!1},d(n){n&&t(h),n&&t(_),V(g,n)}}}function xn($){let h,b,_,g,v,n,u,T,rs,gt,R,oe,qo,Ve,ns,Do,is,ut,q,ds,$e,ls,cs,no,ms,ps,_t,io,hs,vt,lo,Lo,fs,bt,co,gs,Et,te,Te,us,mo,_s,vs,bs,po,ho,Es,Ms,Mt,se,mr,At,ae,As,fo,ys,ws,yt,D,Vs,Pe,$s,Ts,xe,Ps,xs,wt,O,re,Ro,je,js,Oo,ks,Vt,go,zs,$t,uo,Uo,Is,Tt,L,_o,ke,Cs,Fs,Ns,Wo,ze,Ss,qs,vo,Ie,Ds,Ls,Pt,U,ne,Go,Ce,Rs,Jo,Os,xt,P,Fe,Us,W,Ws,bo,Gs,Js,Ne,Hs,Bs,Ks,G,Ys,Eo,Zs,Xs,Mo,Qs,ea,oa,ie,jt,J,de,Ho,Se,ta,Bo,sa,kt,z,qe,aa,Ko,ra,na,le,De,ia,Yo,da,zt,H,ce,Zo,Le,la,Xo,ca,It,I,Re,ma,Qo,pa,ha,me,Oe,fa,et,ga,Ct,B,pe,ot,Ue,ua,tt,_a,Ft,C,We,va,Ge,ba,Je,Ea,Ma,Aa,x,He,ya,K,wa,Ao,Va,$a,st,Ta,Pa,xa,he,ja,fe,Nt,Y,ge,at,Be,ka,rt,za,St,F,Ke,Ia,Ye,Ca,Ze,Fa,Na,Sa,j,Xe,qa,Z,Da,yo,La,Ra,nt,Oa,Ua,Wa,ue,Ga,_e,qt,X,ve,it,Qe,Ja,dt,Ha,Dt,N,eo,Ba,oo,Ka,to,Ya,Za,Xa,k,so,Qa,Q,er,wo,or,tr,lt,sr,ar,rr,be,nr,Ee,Lt;return n=new ee({}),Ve=new ee({}),je=new ee({}),Ce=new ee({}),Fe=new S({props:{name:"class transformers.VideoMAEConfig",anchor:"transformers.VideoMAEConfig",parameters:[{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"num_frames",val:" = 16"},{name:"tubelet_size",val:" = 2"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"qkv_bias",val:" = True"},{name:"use_mean_pooling",val:" = True"},{name:"decoder_num_attention_heads",val:" = 6"},{name:"decoder_hidden_size",val:" = 384"},{name:"decoder_num_hidden_layers",val:" = 4"},{name:"decoder_intermediate_size",val:" = 1536"},{name:"norm_pix_loss",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The number of frames in each video.`,name:"num_frames"},{anchor:"transformers.VideoMAEConfig.tubelet_size",description:`<strong>tubelet_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of tubelets.`,name:"tubelet_size"},{anchor:"transformers.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.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> are supported.`,name:"hidden_act"},{anchor:"transformers.VideoMAEConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</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:"hidden_dropout_prob"},{anchor:"transformers.VideoMAEConfig.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.VideoMAEConfig.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.VideoMAEConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VideoMAEConfig.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"},{anchor:"transformers.VideoMAEConfig.use_mean_pooling",description:`<strong>use_mean_pooling</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to mean pool the final hidden states instead of using the final hidden state of the [CLS] token.`,name:"use_mean_pooling"},{anchor:"transformers.VideoMAEConfig.decoder_num_attention_heads",description:`<strong>decoder_num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of attention heads for each attention layer in the decoder.`,name:"decoder_num_attention_heads"},{anchor:"transformers.VideoMAEConfig.decoder_hidden_size",description:`<strong>decoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
Dimensionality of the decoder.`,name:"decoder_hidden_size"},{anchor:"transformers.VideoMAEConfig.decoder_num_hidden_layers",description:`<strong>decoder_num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of hidden layers in the decoder.`,name:"decoder_num_hidden_layers"},{anchor:"transformers.VideoMAEConfig.decoder_intermediate_size",description:`<strong>decoder_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 decoder.`,name:"decoder_intermediate_size"},{anchor:"transformers.VideoMAEConfig.norm_pix_loss",description:`<strong>norm_pix_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the target patch pixels.`,name:"norm_pix_loss"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/videomae/configuration_videomae.py#L28"}}),ie=new ts({props:{anchor:"transformers.VideoMAEConfig.example",$$slots:{default:[An]},$$scope:{ctx:$}}}),Se=new ee({}),qe=new S({props:{name:"class transformers.VideoMAEImageProcessor",anchor:"transformers.VideoMAEImageProcessor",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.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEImageProcessor.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.VideoMAEImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the 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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.25.1/src/transformers/models/videomae/image_processing_videomae.py#L66"}}),De=new S({props:{name:"__call__",anchor:"transformers.VideoMAEImageProcessor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/image_processing_utils.py#L435"}}),Le=new ee({}),Re=new S({props:{name:"class transformers.VideoMAEImageProcessor",anchor:"transformers.VideoMAEImageProcessor",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.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEImageProcessor.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.VideoMAEImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the 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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.25.1/src/transformers/models/videomae/image_processing_videomae.py#L66"}}),Oe=new S({props:{name:"preprocess",anchor:"transformers.VideoMAEImageProcessor.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:"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[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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 [0 - 1].`,name:"do_rescale"},{anchor:"transformers.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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.VideoMAEImageProcessor.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"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/videomae/image_processing_videomae.py#L282"}}),Ue=new ee({}),We=new S({props:{name:"class transformers.VideoMAEModel",anchor:"transformers.VideoMAEModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</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.25.1/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.25.1/src/transformers/models/videomae/modeling_videomae.py#L537"}}),He=new S({props:{name:"forward",anchor:"transformers.VideoMAEModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",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.VideoMAEModel.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.25.1/en/model_doc/videomae#transformers.VideoMAEImageProcessor">VideoMAEImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEModel.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.VideoMAEModel.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.VideoMAEModel.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.VideoMAEModel.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.25.1/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.25.1/src/transformers/models/videomae/modeling_videomae.py#L564",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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.25.1/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</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>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.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new cr({props:{$$slots:{default:[yn]},$$scope:{ctx:$}}}),fe=new ts({props:{anchor:"transformers.VideoMAEModel.forward.example",$$slots:{default:[wn]},$$scope:{ctx:$}}}),Be=new ee({}),Ke=new S({props:{name:"class transformers.VideoMAEForPreTraining",anchor:"transformers.VideoMAEForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</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.25.1/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.25.1/src/transformers/models/videomae/modeling_videomae.py#L734"}}),Xe=new S({props:{name:"forward",anchor:"transformers.VideoMAEForPreTraining.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"bool_masked_pos",val:": BoolTensor"},{name:"head_mask",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.VideoMAEForPreTraining.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.25.1/en/model_doc/videomae#transformers.VideoMAEImageProcessor">VideoMAEImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEForPreTraining.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.VideoMAEForPreTraining.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.VideoMAEForPreTraining.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.VideoMAEForPreTraining.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.25.1/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.25.1/src/transformers/models/videomae/modeling_videomae.py#L752",returnDescription:`
<p>A <code>transformers.models.videomae.modeling_videomae.VideoMAEForPreTrainingOutput</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 (<a
  href="/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Pixel reconstruction loss.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_size ** 2 * num_channels)</code>) \u2014 Pixel reconstruction logits.</li>
<li><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 + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
<li><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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.videomae.modeling_videomae.VideoMAEForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new cr({props:{$$slots:{default:[Vn]},$$scope:{ctx:$}}}),_e=new ts({props:{anchor:"transformers.VideoMAEForPreTraining.forward.example",$$slots:{default:[$n]},$$scope:{ctx:$}}}),Qe=new ee({}),eo=new S({props:{name:"class transformers.VideoMAEForVideoClassification",anchor:"transformers.VideoMAEForVideoClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEForVideoClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</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.25.1/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.25.1/src/transformers/models/videomae/modeling_videomae.py#L905"}}),so=new S({props:{name:"forward",anchor:"transformers.VideoMAEForVideoClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",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.VideoMAEForVideoClassification.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.25.1/en/model_doc/videomae#transformers.VideoMAEImageProcessor">VideoMAEImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEForVideoClassification.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.VideoMAEForVideoClassification.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.VideoMAEForVideoClassification.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.VideoMAEForVideoClassification.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.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.VideoMAEForVideoClassification.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.25.1/src/transformers/models/videomae/modeling_videomae.py#L919",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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.25.1/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</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.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new cr({props:{$$slots:{default:[Tn]},$$scope:{ctx:$}}}),Ee=new ts({props:{anchor:"transformers.VideoMAEForVideoClassification.forward.example",$$slots:{default:[Pn]},$$scope:{ctx:$}}}),{c(){h=s("meta"),b=m(),_=s("h1"),g=s("a"),v=s("span"),E(n.$$.fragment),u=m(),T=s("span"),rs=i("VideoMAE"),gt=m(),R=s("h2"),oe=s("a"),qo=s("span"),E(Ve.$$.fragment),ns=m(),Do=s("span"),is=i("Overview"),ut=m(),q=s("p"),ds=i("The VideoMAE model was proposed in "),$e=s("a"),ls=i("VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),cs=i(` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=s("a"),ms=i("MAE"),ps=i(") to video, claiming state-of-the-art performance on several video classification benchmarks."),_t=m(),io=s("p"),hs=i("The abstract from the paper is the following:"),vt=m(),lo=s("p"),Lo=s("em"),fs=i("Pre-training video transformers on extra large-scale datasets is generally required to achieve premier performance on relatively small datasets. In this paper, we show that video masked autoencoders (VideoMAE) are data-efficient learners for self-supervised video pre-training (SSVP). We are inspired by the recent ImageMAE and propose customized video tube masking and reconstruction. These simple designs turn out to be effective for overcoming information leakage caused by the temporal correlation during video reconstruction. We obtain three important findings on SSVP: (1) An extremely high proportion of masking ratio (i.e., 90% to 95%) still yields favorable performance of VideoMAE. The temporally redundant video content enables higher masking ratio than that of images. (2) VideoMAE achieves impressive results on very small datasets (i.e., around 3k-4k videos) without using any extra data. This is partially ascribed to the challenging task of video reconstruction to enforce high-level structure learning. (3) VideoMAE shows that data quality is more important than data quantity for SSVP. Domain shift between pre-training and target datasets are important issues in SSVP. Notably, our VideoMAE with the vanilla ViT backbone can achieve 83.9% on Kinects-400, 75.3% on Something-Something V2, 90.8% on UCF101, and 61.1% on HMDB51 without using any extra data."),bt=m(),co=s("p"),gs=i("Tips:"),Et=m(),te=s("ul"),Te=s("li"),us=i("One can use "),mo=s("a"),_s=i("VideoMAEImageProcessor"),vs=i(" to prepare videos for the model. It will resize + normalize all frames of a video for you."),bs=m(),po=s("li"),ho=s("a"),Es=i("VideoMAEForPreTraining"),Ms=i(" includes the decoder on top for self-supervised pre-training."),Mt=m(),se=s("img"),At=m(),ae=s("small"),As=i("VideoMAE pre-training. Taken from the "),fo=s("a"),ys=i("original paper"),ws=i("."),yt=m(),D=s("p"),Vs=i("This model was contributed by "),Pe=s("a"),$s=i("nielsr"),Ts=i(`.
The original code can be found `),xe=s("a"),Ps=i("here"),xs=i("."),wt=m(),O=s("h2"),re=s("a"),Ro=s("span"),E(je.$$.fragment),js=m(),Oo=s("span"),ks=i("Resources"),Vt=m(),go=s("p"),zs=i(`A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VideoMAE. If
you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll
review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.`),$t=m(),uo=s("p"),Uo=s("strong"),Is=i("Video classification"),Tt=m(),L=s("ul"),_o=s("li"),ke=s("a"),Cs=i("A notebook"),Fs=i(` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),Ns=m(),Wo=s("li"),ze=s("a"),Ss=i("Video classification task page"),qs=m(),vo=s("li"),Ie=s("a"),Ds=i("A \u{1F917} Space"),Ls=i(" showing how to perform inference with a video classification model."),Pt=m(),U=s("h2"),ne=s("a"),Go=s("span"),E(Ce.$$.fragment),Rs=m(),Jo=s("span"),Os=i("VideoMAEConfig"),xt=m(),P=s("div"),E(Fe.$$.fragment),Us=m(),W=s("p"),Ws=i("This is the configuration class to store the configuration of a "),bo=s("a"),Gs=i("VideoMAEModel"),Js=i(`. It is used to instantiate a
VideoMAE 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 VideoMAE
`),Ne=s("a"),Hs=i("MCG-NJU/videomae-base"),Bs=i(" architecture."),Ks=m(),G=s("p"),Ys=i("Configuration objects inherit from "),Eo=s("a"),Zs=i("PretrainedConfig"),Xs=i(` and can be used to control the model outputs. Read the
documentation from `),Mo=s("a"),Qs=i("PretrainedConfig"),ea=i(" for more information."),oa=m(),E(ie.$$.fragment),jt=m(),J=s("h2"),de=s("a"),Ho=s("span"),E(Se.$$.fragment),ta=m(),Bo=s("span"),sa=i("VideoMAEFeatureExtractor"),kt=m(),z=s("div"),E(qe.$$.fragment),aa=m(),Ko=s("p"),ra=i("Constructs a VideoMAE image processor."),na=m(),le=s("div"),E(De.$$.fragment),ia=m(),Yo=s("p"),da=i("Preprocess an image or a batch of images."),zt=m(),H=s("h2"),ce=s("a"),Zo=s("span"),E(Le.$$.fragment),la=m(),Xo=s("span"),ca=i("VideoMAEImageProcessor"),It=m(),I=s("div"),E(Re.$$.fragment),ma=m(),Qo=s("p"),pa=i("Constructs a VideoMAE image processor."),ha=m(),me=s("div"),E(Oe.$$.fragment),fa=m(),et=s("p"),ga=i("Preprocess an image or batch of images."),Ct=m(),B=s("h2"),pe=s("a"),ot=s("span"),E(Ue.$$.fragment),ua=m(),tt=s("span"),_a=i("VideoMAEModel"),Ft=m(),C=s("div"),E(We.$$.fragment),va=m(),Ge=s("p"),ba=i(`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Je=s("a"),Ea=i("torch.nn.Module"),Ma=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Aa=m(),x=s("div"),E(He.$$.fragment),ya=m(),K=s("p"),wa=i("The "),Ao=s("a"),Va=i("VideoMAEModel"),$a=i(" forward method, overrides the "),st=s("code"),Ta=i("__call__"),Pa=i(" special method."),xa=m(),E(he.$$.fragment),ja=m(),E(fe.$$.fragment),Nt=m(),Y=s("h2"),ge=s("a"),at=s("span"),E(Be.$$.fragment),ka=m(),rt=s("span"),za=i("VideoMAEForPreTraining"),St=m(),F=s("div"),E(Ke.$$.fragment),Ia=m(),Ye=s("p"),Ca=i(`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),Ze=s("a"),Fa=i("torch.nn.Module"),Na=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Sa=m(),j=s("div"),E(Xe.$$.fragment),qa=m(),Z=s("p"),Da=i("The "),yo=s("a"),La=i("VideoMAEForPreTraining"),Ra=i(" forward method, overrides the "),nt=s("code"),Oa=i("__call__"),Ua=i(" special method."),Wa=m(),E(ue.$$.fragment),Ga=m(),E(_e.$$.fragment),qt=m(),X=s("h2"),ve=s("a"),it=s("span"),E(Qe.$$.fragment),Ja=m(),dt=s("span"),Ha=i("VideoMAEForVideoClassification"),Dt=m(),N=s("div"),E(eo.$$.fragment),Ba=m(),oo=s("p"),Ka=i(`VideoMAE Model transformer with a video classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.
This model is a PyTorch `),to=s("a"),Ya=i("torch.nn.Module"),Za=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xa=m(),k=s("div"),E(so.$$.fragment),Qa=m(),Q=s("p"),er=i("The "),wo=s("a"),or=i("VideoMAEForVideoClassification"),tr=i(" forward method, overrides the "),lt=s("code"),sr=i("__call__"),ar=i(" special method."),rr=m(),E(be.$$.fragment),nr=m(),E(Ee.$$.fragment),this.h()},l(e){const c=bn('[data-svelte="svelte-1phssyn"]',document.head);h=a(c,"META",{name:!0,content:!0}),c.forEach(t),b=p(e),_=a(e,"H1",{class:!0});var ao=r(_);g=a(ao,"A",{id:!0,class:!0,href:!0});var ct=r(g);v=a(ct,"SPAN",{});var mt=r(v);M(n.$$.fragment,mt),mt.forEach(t),ct.forEach(t),u=p(ao),T=a(ao,"SPAN",{});var pt=r(T);rs=d(pt,"VideoMAE"),pt.forEach(t),ao.forEach(t),gt=p(e),R=a(e,"H2",{class:!0});var ro=r(R);oe=a(ro,"A",{id:!0,class:!0,href:!0});var ht=r(oe);qo=a(ht,"SPAN",{});var ft=r(qo);M(Ve.$$.fragment,ft),ft.forEach(t),ht.forEach(t),ns=p(ro),Do=a(ro,"SPAN",{});var pr=r(Do);is=d(pr,"Overview"),pr.forEach(t),ro.forEach(t),ut=p(e),q=a(e,"P",{});var Vo=r(q);ds=d(Vo,"The VideoMAE model was proposed in "),$e=a(Vo,"A",{href:!0,rel:!0});var hr=r($e);ls=d(hr,"VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),hr.forEach(t),cs=d(Vo,` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=a(Vo,"A",{href:!0});var fr=r(no);ms=d(fr,"MAE"),fr.forEach(t),ps=d(Vo,") to video, claiming state-of-the-art performance on several video classification benchmarks."),Vo.forEach(t),_t=p(e),io=a(e,"P",{});var gr=r(io);hs=d(gr,"The abstract from the paper is the following:"),gr.forEach(t),vt=p(e),lo=a(e,"P",{});var ur=r(lo);Lo=a(ur,"EM",{});var _r=r(Lo);fs=d(_r,"Pre-training video transformers on extra large-scale datasets is generally required to achieve premier performance on relatively small datasets. In this paper, we show that video masked autoencoders (VideoMAE) are data-efficient learners for self-supervised video pre-training (SSVP). We are inspired by the recent ImageMAE and propose customized video tube masking and reconstruction. These simple designs turn out to be effective for overcoming information leakage caused by the temporal correlation during video reconstruction. We obtain three important findings on SSVP: (1) An extremely high proportion of masking ratio (i.e., 90% to 95%) still yields favorable performance of VideoMAE. The temporally redundant video content enables higher masking ratio than that of images. (2) VideoMAE achieves impressive results on very small datasets (i.e., around 3k-4k videos) without using any extra data. This is partially ascribed to the challenging task of video reconstruction to enforce high-level structure learning. (3) VideoMAE shows that data quality is more important than data quantity for SSVP. Domain shift between pre-training and target datasets are important issues in SSVP. Notably, our VideoMAE with the vanilla ViT backbone can achieve 83.9% on Kinects-400, 75.3% on Something-Something V2, 90.8% on UCF101, and 61.1% on HMDB51 without using any extra data."),_r.forEach(t),ur.forEach(t),bt=p(e),co=a(e,"P",{});var vr=r(co);gs=d(vr,"Tips:"),vr.forEach(t),Et=p(e),te=a(e,"UL",{});var Rt=r(te);Te=a(Rt,"LI",{});var Ot=r(Te);us=d(Ot,"One can use "),mo=a(Ot,"A",{href:!0});var br=r(mo);_s=d(br,"VideoMAEImageProcessor"),br.forEach(t),vs=d(Ot," to prepare videos for the model. It will resize + normalize all frames of a video for you."),Ot.forEach(t),bs=p(Rt),po=a(Rt,"LI",{});var ir=r(po);ho=a(ir,"A",{href:!0});var Er=r(ho);Es=d(Er,"VideoMAEForPreTraining"),Er.forEach(t),Ms=d(ir," includes the decoder on top for self-supervised pre-training."),ir.forEach(t),Rt.forEach(t),Mt=p(e),se=a(e,"IMG",{src:!0,alt:!0,width:!0}),At=p(e),ae=a(e,"SMALL",{});var Ut=r(ae);As=d(Ut,"VideoMAE pre-training. Taken from the "),fo=a(Ut,"A",{href:!0});var Mr=r(fo);ys=d(Mr,"original paper"),Mr.forEach(t),ws=d(Ut,"."),Ut.forEach(t),yt=p(e),D=a(e,"P",{});var $o=r(D);Vs=d($o,"This model was contributed by "),Pe=a($o,"A",{href:!0,rel:!0});var Ar=r(Pe);$s=d(Ar,"nielsr"),Ar.forEach(t),Ts=d($o,`.
The original code can be found `),xe=a($o,"A",{href:!0,rel:!0});var yr=r(xe);Ps=d(yr,"here"),yr.forEach(t),xs=d($o,"."),$o.forEach(t),wt=p(e),O=a(e,"H2",{class:!0});var Wt=r(O);re=a(Wt,"A",{id:!0,class:!0,href:!0});var wr=r(re);Ro=a(wr,"SPAN",{});var Vr=r(Ro);M(je.$$.fragment,Vr),Vr.forEach(t),wr.forEach(t),js=p(Wt),Oo=a(Wt,"SPAN",{});var $r=r(Oo);ks=d($r,"Resources"),$r.forEach(t),Wt.forEach(t),Vt=p(e),go=a(e,"P",{});var Tr=r(go);zs=d(Tr,`A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VideoMAE. If
you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll
review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.`),Tr.forEach(t),$t=p(e),uo=a(e,"P",{});var Pr=r(uo);Uo=a(Pr,"STRONG",{});var xr=r(Uo);Is=d(xr,"Video classification"),xr.forEach(t),Pr.forEach(t),Tt=p(e),L=a(e,"UL",{});var To=r(L);_o=a(To,"LI",{});var dr=r(_o);ke=a(dr,"A",{href:!0,rel:!0});var jr=r(ke);Cs=d(jr,"A notebook"),jr.forEach(t),Fs=d(dr,` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),dr.forEach(t),Ns=p(To),Wo=a(To,"LI",{});var kr=r(Wo);ze=a(kr,"A",{href:!0,rel:!0});var zr=r(ze);Ss=d(zr,"Video classification task page"),zr.forEach(t),kr.forEach(t),qs=p(To),vo=a(To,"LI",{});var lr=r(vo);Ie=a(lr,"A",{href:!0,rel:!0});var Ir=r(Ie);Ds=d(Ir,"A \u{1F917} Space"),Ir.forEach(t),Ls=d(lr," showing how to perform inference with a video classification model."),lr.forEach(t),To.forEach(t),Pt=p(e),U=a(e,"H2",{class:!0});var Gt=r(U);ne=a(Gt,"A",{id:!0,class:!0,href:!0});var Cr=r(ne);Go=a(Cr,"SPAN",{});var Fr=r(Go);M(Ce.$$.fragment,Fr),Fr.forEach(t),Cr.forEach(t),Rs=p(Gt),Jo=a(Gt,"SPAN",{});var Nr=r(Jo);Os=d(Nr,"VideoMAEConfig"),Nr.forEach(t),Gt.forEach(t),xt=p(e),P=a(e,"DIV",{class:!0});var Me=r(P);M(Fe.$$.fragment,Me),Us=p(Me),W=a(Me,"P",{});var Po=r(W);Ws=d(Po,"This is the configuration class to store the configuration of a "),bo=a(Po,"A",{href:!0});var Sr=r(bo);Gs=d(Sr,"VideoMAEModel"),Sr.forEach(t),Js=d(Po,`. It is used to instantiate a
VideoMAE 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 VideoMAE
`),Ne=a(Po,"A",{href:!0,rel:!0});var qr=r(Ne);Hs=d(qr,"MCG-NJU/videomae-base"),qr.forEach(t),Bs=d(Po," architecture."),Po.forEach(t),Ks=p(Me),G=a(Me,"P",{});var xo=r(G);Ys=d(xo,"Configuration objects inherit from "),Eo=a(xo,"A",{href:!0});var Dr=r(Eo);Zs=d(Dr,"PretrainedConfig"),Dr.forEach(t),Xs=d(xo,` and can be used to control the model outputs. Read the
documentation from `),Mo=a(xo,"A",{href:!0});var Lr=r(Mo);Qs=d(Lr,"PretrainedConfig"),Lr.forEach(t),ea=d(xo," for more information."),xo.forEach(t),oa=p(Me),M(ie.$$.fragment,Me),Me.forEach(t),jt=p(e),J=a(e,"H2",{class:!0});var Jt=r(J);de=a(Jt,"A",{id:!0,class:!0,href:!0});var Rr=r(de);Ho=a(Rr,"SPAN",{});var Or=r(Ho);M(Se.$$.fragment,Or),Or.forEach(t),Rr.forEach(t),ta=p(Jt),Bo=a(Jt,"SPAN",{});var Ur=r(Bo);sa=d(Ur,"VideoMAEFeatureExtractor"),Ur.forEach(t),Jt.forEach(t),kt=p(e),z=a(e,"DIV",{class:!0});var jo=r(z);M(qe.$$.fragment,jo),aa=p(jo),Ko=a(jo,"P",{});var Wr=r(Ko);ra=d(Wr,"Constructs a VideoMAE image processor."),Wr.forEach(t),na=p(jo),le=a(jo,"DIV",{class:!0});var Ht=r(le);M(De.$$.fragment,Ht),ia=p(Ht),Yo=a(Ht,"P",{});var Gr=r(Yo);da=d(Gr,"Preprocess an image or a batch of images."),Gr.forEach(t),Ht.forEach(t),jo.forEach(t),zt=p(e),H=a(e,"H2",{class:!0});var Bt=r(H);ce=a(Bt,"A",{id:!0,class:!0,href:!0});var Jr=r(ce);Zo=a(Jr,"SPAN",{});var Hr=r(Zo);M(Le.$$.fragment,Hr),Hr.forEach(t),Jr.forEach(t),la=p(Bt),Xo=a(Bt,"SPAN",{});var Br=r(Xo);ca=d(Br,"VideoMAEImageProcessor"),Br.forEach(t),Bt.forEach(t),It=p(e),I=a(e,"DIV",{class:!0});var ko=r(I);M(Re.$$.fragment,ko),ma=p(ko),Qo=a(ko,"P",{});var Kr=r(Qo);pa=d(Kr,"Constructs a VideoMAE image processor."),Kr.forEach(t),ha=p(ko),me=a(ko,"DIV",{class:!0});var Kt=r(me);M(Oe.$$.fragment,Kt),fa=p(Kt),et=a(Kt,"P",{});var Yr=r(et);ga=d(Yr,"Preprocess an image or batch of images."),Yr.forEach(t),Kt.forEach(t),ko.forEach(t),Ct=p(e),B=a(e,"H2",{class:!0});var Yt=r(B);pe=a(Yt,"A",{id:!0,class:!0,href:!0});var Zr=r(pe);ot=a(Zr,"SPAN",{});var Xr=r(ot);M(Ue.$$.fragment,Xr),Xr.forEach(t),Zr.forEach(t),ua=p(Yt),tt=a(Yt,"SPAN",{});var Qr=r(tt);_a=d(Qr,"VideoMAEModel"),Qr.forEach(t),Yt.forEach(t),Ft=p(e),C=a(e,"DIV",{class:!0});var zo=r(C);M(We.$$.fragment,zo),va=p(zo),Ge=a(zo,"P",{});var Zt=r(Ge);ba=d(Zt,`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Je=a(Zt,"A",{href:!0,rel:!0});var en=r(Je);Ea=d(en,"torch.nn.Module"),en.forEach(t),Ma=d(Zt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zt.forEach(t),Aa=p(zo),x=a(zo,"DIV",{class:!0});var Ae=r(x);M(He.$$.fragment,Ae),ya=p(Ae),K=a(Ae,"P",{});var Io=r(K);wa=d(Io,"The "),Ao=a(Io,"A",{href:!0});var on=r(Ao);Va=d(on,"VideoMAEModel"),on.forEach(t),$a=d(Io," forward method, overrides the "),st=a(Io,"CODE",{});var tn=r(st);Ta=d(tn,"__call__"),tn.forEach(t),Pa=d(Io," special method."),Io.forEach(t),xa=p(Ae),M(he.$$.fragment,Ae),ja=p(Ae),M(fe.$$.fragment,Ae),Ae.forEach(t),zo.forEach(t),Nt=p(e),Y=a(e,"H2",{class:!0});var Xt=r(Y);ge=a(Xt,"A",{id:!0,class:!0,href:!0});var sn=r(ge);at=a(sn,"SPAN",{});var an=r(at);M(Be.$$.fragment,an),an.forEach(t),sn.forEach(t),ka=p(Xt),rt=a(Xt,"SPAN",{});var rn=r(rt);za=d(rn,"VideoMAEForPreTraining"),rn.forEach(t),Xt.forEach(t),St=p(e),F=a(e,"DIV",{class:!0});var Co=r(F);M(Ke.$$.fragment,Co),Ia=p(Co),Ye=a(Co,"P",{});var Qt=r(Ye);Ca=d(Qt,`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),Ze=a(Qt,"A",{href:!0,rel:!0});var nn=r(Ze);Fa=d(nn,"torch.nn.Module"),nn.forEach(t),Na=d(Qt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qt.forEach(t),Sa=p(Co),j=a(Co,"DIV",{class:!0});var ye=r(j);M(Xe.$$.fragment,ye),qa=p(ye),Z=a(ye,"P",{});var Fo=r(Z);Da=d(Fo,"The "),yo=a(Fo,"A",{href:!0});var dn=r(yo);La=d(dn,"VideoMAEForPreTraining"),dn.forEach(t),Ra=d(Fo," forward method, overrides the "),nt=a(Fo,"CODE",{});var ln=r(nt);Oa=d(ln,"__call__"),ln.forEach(t),Ua=d(Fo," special method."),Fo.forEach(t),Wa=p(ye),M(ue.$$.fragment,ye),Ga=p(ye),M(_e.$$.fragment,ye),ye.forEach(t),Co.forEach(t),qt=p(e),X=a(e,"H2",{class:!0});var es=r(X);ve=a(es,"A",{id:!0,class:!0,href:!0});var cn=r(ve);it=a(cn,"SPAN",{});var mn=r(it);M(Qe.$$.fragment,mn),mn.forEach(t),cn.forEach(t),Ja=p(es),dt=a(es,"SPAN",{});var pn=r(dt);Ha=d(pn,"VideoMAEForVideoClassification"),pn.forEach(t),es.forEach(t),Dt=p(e),N=a(e,"DIV",{class:!0});var No=r(N);M(eo.$$.fragment,No),Ba=p(No),oo=a(No,"P",{});var os=r(oo);Ka=d(os,`VideoMAE Model transformer with a video classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.
This model is a PyTorch `),to=a(os,"A",{href:!0,rel:!0});var hn=r(to);Ya=d(hn,"torch.nn.Module"),hn.forEach(t),Za=d(os,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),os.forEach(t),Xa=p(No),k=a(No,"DIV",{class:!0});var we=r(k);M(so.$$.fragment,we),Qa=p(we),Q=a(we,"P",{});var So=r(Q);er=d(So,"The "),wo=a(So,"A",{href:!0});var fn=r(wo);or=d(fn,"VideoMAEForVideoClassification"),fn.forEach(t),tr=d(So," forward method, overrides the "),lt=a(So,"CODE",{});var gn=r(lt);sr=d(gn,"__call__"),gn.forEach(t),ar=d(So," special method."),So.forEach(t),rr=p(we),M(be.$$.fragment,we),nr=p(we),M(Ee.$$.fragment,we),we.forEach(t),No.forEach(t),this.h()},h(){l(h,"name","hf:doc:metadata"),l(h,"content",JSON.stringify(jn)),l(g,"id","videomae"),l(g,"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"),l(g,"href","#videomae"),l(_,"class","relative group"),l(oe,"id","overview"),l(oe,"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"),l(oe,"href","#overview"),l(R,"class","relative group"),l($e,"href","https://arxiv.org/abs/2203.12602"),l($e,"rel","nofollow"),l(no,"href","vit_mae"),l(mo,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEImageProcessor"),l(ho,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEForPreTraining"),En(se.src,mr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/videomae_architecture.jpeg")||l(se,"src",mr),l(se,"alt","drawing"),l(se,"width","600"),l(fo,"href","https://arxiv.org/abs/2203.12602"),l(Pe,"href","https://huggingface.co/nielsr"),l(Pe,"rel","nofollow"),l(xe,"href","https://github.com/MCG-NJU/VideoMAE"),l(xe,"rel","nofollow"),l(re,"id","resources"),l(re,"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"),l(re,"href","#resources"),l(O,"class","relative group"),l(ke,"href","https://github.com/huggingface/notebooks/blob/main/examples/video_classification.ipynb"),l(ke,"rel","nofollow"),l(ze,"href","https://huggingface.co/tasks/video-classification"),l(ze,"rel","nofollow"),l(Ie,"href","https://huggingface.co/spaces/sayakpaul/video-classification-ucf101-subset"),l(Ie,"rel","nofollow"),l(ne,"id","transformers.VideoMAEConfig"),l(ne,"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"),l(ne,"href","#transformers.VideoMAEConfig"),l(U,"class","relative group"),l(bo,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEModel"),l(Ne,"href","https://huggingface.co/MCG-NJU/videomae-base"),l(Ne,"rel","nofollow"),l(Eo,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),l(Mo,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(de,"id","transformers.VideoMAEImageProcessor"),l(de,"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"),l(de,"href","#transformers.VideoMAEImageProcessor"),l(J,"class","relative group"),l(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ce,"id","transformers.VideoMAEImageProcessor"),l(ce,"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"),l(ce,"href","#transformers.VideoMAEImageProcessor"),l(H,"class","relative group"),l(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pe,"id","transformers.VideoMAEModel"),l(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(pe,"href","#transformers.VideoMAEModel"),l(B,"class","relative group"),l(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Je,"rel","nofollow"),l(Ao,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEModel"),l(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"id","transformers.VideoMAEForPreTraining"),l(ge,"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"),l(ge,"href","#transformers.VideoMAEForPreTraining"),l(Y,"class","relative group"),l(Ze,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Ze,"rel","nofollow"),l(yo,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEForPreTraining"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"id","transformers.VideoMAEForVideoClassification"),l(ve,"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"),l(ve,"href","#transformers.VideoMAEForVideoClassification"),l(X,"class","relative group"),l(to,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(to,"rel","nofollow"),l(wo,"href","/docs/transformers/v4.25.1/en/model_doc/videomae#transformers.VideoMAEForVideoClassification"),l(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(N,"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,c){o(document.head,h),f(e,b,c),f(e,_,c),o(_,g),o(g,v),A(n,v,null),o(_,u),o(_,T),o(T,rs),f(e,gt,c),f(e,R,c),o(R,oe),o(oe,qo),A(Ve,qo,null),o(R,ns),o(R,Do),o(Do,is),f(e,ut,c),f(e,q,c),o(q,ds),o(q,$e),o($e,ls),o(q,cs),o(q,no),o(no,ms),o(q,ps),f(e,_t,c),f(e,io,c),o(io,hs),f(e,vt,c),f(e,lo,c),o(lo,Lo),o(Lo,fs),f(e,bt,c),f(e,co,c),o(co,gs),f(e,Et,c),f(e,te,c),o(te,Te),o(Te,us),o(Te,mo),o(mo,_s),o(Te,vs),o(te,bs),o(te,po),o(po,ho),o(ho,Es),o(po,Ms),f(e,Mt,c),f(e,se,c),f(e,At,c),f(e,ae,c),o(ae,As),o(ae,fo),o(fo,ys),o(ae,ws),f(e,yt,c),f(e,D,c),o(D,Vs),o(D,Pe),o(Pe,$s),o(D,Ts),o(D,xe),o(xe,Ps),o(D,xs),f(e,wt,c),f(e,O,c),o(O,re),o(re,Ro),A(je,Ro,null),o(O,js),o(O,Oo),o(Oo,ks),f(e,Vt,c),f(e,go,c),o(go,zs),f(e,$t,c),f(e,uo,c),o(uo,Uo),o(Uo,Is),f(e,Tt,c),f(e,L,c),o(L,_o),o(_o,ke),o(ke,Cs),o(_o,Fs),o(L,Ns),o(L,Wo),o(Wo,ze),o(ze,Ss),o(L,qs),o(L,vo),o(vo,Ie),o(Ie,Ds),o(vo,Ls),f(e,Pt,c),f(e,U,c),o(U,ne),o(ne,Go),A(Ce,Go,null),o(U,Rs),o(U,Jo),o(Jo,Os),f(e,xt,c),f(e,P,c),A(Fe,P,null),o(P,Us),o(P,W),o(W,Ws),o(W,bo),o(bo,Gs),o(W,Js),o(W,Ne),o(Ne,Hs),o(W,Bs),o(P,Ks),o(P,G),o(G,Ys),o(G,Eo),o(Eo,Zs),o(G,Xs),o(G,Mo),o(Mo,Qs),o(G,ea),o(P,oa),A(ie,P,null),f(e,jt,c),f(e,J,c),o(J,de),o(de,Ho),A(Se,Ho,null),o(J,ta),o(J,Bo),o(Bo,sa),f(e,kt,c),f(e,z,c),A(qe,z,null),o(z,aa),o(z,Ko),o(Ko,ra),o(z,na),o(z,le),A(De,le,null),o(le,ia),o(le,Yo),o(Yo,da),f(e,zt,c),f(e,H,c),o(H,ce),o(ce,Zo),A(Le,Zo,null),o(H,la),o(H,Xo),o(Xo,ca),f(e,It,c),f(e,I,c),A(Re,I,null),o(I,ma),o(I,Qo),o(Qo,pa),o(I,ha),o(I,me),A(Oe,me,null),o(me,fa),o(me,et),o(et,ga),f(e,Ct,c),f(e,B,c),o(B,pe),o(pe,ot),A(Ue,ot,null),o(B,ua),o(B,tt),o(tt,_a),f(e,Ft,c),f(e,C,c),A(We,C,null),o(C,va),o(C,Ge),o(Ge,ba),o(Ge,Je),o(Je,Ea),o(Ge,Ma),o(C,Aa),o(C,x),A(He,x,null),o(x,ya),o(x,K),o(K,wa),o(K,Ao),o(Ao,Va),o(K,$a),o(K,st),o(st,Ta),o(K,Pa),o(x,xa),A(he,x,null),o(x,ja),A(fe,x,null),f(e,Nt,c),f(e,Y,c),o(Y,ge),o(ge,at),A(Be,at,null),o(Y,ka),o(Y,rt),o(rt,za),f(e,St,c),f(e,F,c),A(Ke,F,null),o(F,Ia),o(F,Ye),o(Ye,Ca),o(Ye,Ze),o(Ze,Fa),o(Ye,Na),o(F,Sa),o(F,j),A(Xe,j,null),o(j,qa),o(j,Z),o(Z,Da),o(Z,yo),o(yo,La),o(Z,Ra),o(Z,nt),o(nt,Oa),o(Z,Ua),o(j,Wa),A(ue,j,null),o(j,Ga),A(_e,j,null),f(e,qt,c),f(e,X,c),o(X,ve),o(ve,it),A(Qe,it,null),o(X,Ja),o(X,dt),o(dt,Ha),f(e,Dt,c),f(e,N,c),A(eo,N,null),o(N,Ba),o(N,oo),o(oo,Ka),o(oo,to),o(to,Ya),o(oo,Za),o(N,Xa),o(N,k),A(so,k,null),o(k,Qa),o(k,Q),o(Q,er),o(Q,wo),o(wo,or),o(Q,tr),o(Q,lt),o(lt,sr),o(Q,ar),o(k,rr),A(be,k,null),o(k,nr),A(Ee,k,null),Lt=!0},p(e,[c]){const ao={};c&2&&(ao.$$scope={dirty:c,ctx:e}),ie.$set(ao);const ct={};c&2&&(ct.$$scope={dirty:c,ctx:e}),he.$set(ct);const mt={};c&2&&(mt.$$scope={dirty:c,ctx:e}),fe.$set(mt);const pt={};c&2&&(pt.$$scope={dirty:c,ctx:e}),ue.$set(pt);const ro={};c&2&&(ro.$$scope={dirty:c,ctx:e}),_e.$set(ro);const ht={};c&2&&(ht.$$scope={dirty:c,ctx:e}),be.$set(ht);const ft={};c&2&&(ft.$$scope={dirty:c,ctx:e}),Ee.$set(ft)},i(e){Lt||(y(n.$$.fragment,e),y(Ve.$$.fragment,e),y(je.$$.fragment,e),y(Ce.$$.fragment,e),y(Fe.$$.fragment,e),y(ie.$$.fragment,e),y(Se.$$.fragment,e),y(qe.$$.fragment,e),y(De.$$.fragment,e),y(Le.$$.fragment,e),y(Re.$$.fragment,e),y(Oe.$$.fragment,e),y(Ue.$$.fragment,e),y(We.$$.fragment,e),y(He.$$.fragment,e),y(he.$$.fragment,e),y(fe.$$.fragment,e),y(Be.$$.fragment,e),y(Ke.$$.fragment,e),y(Xe.$$.fragment,e),y(ue.$$.fragment,e),y(_e.$$.fragment,e),y(Qe.$$.fragment,e),y(eo.$$.fragment,e),y(so.$$.fragment,e),y(be.$$.fragment,e),y(Ee.$$.fragment,e),Lt=!0)},o(e){w(n.$$.fragment,e),w(Ve.$$.fragment,e),w(je.$$.fragment,e),w(Ce.$$.fragment,e),w(Fe.$$.fragment,e),w(ie.$$.fragment,e),w(Se.$$.fragment,e),w(qe.$$.fragment,e),w(De.$$.fragment,e),w(Le.$$.fragment,e),w(Re.$$.fragment,e),w(Oe.$$.fragment,e),w(Ue.$$.fragment,e),w(We.$$.fragment,e),w(He.$$.fragment,e),w(he.$$.fragment,e),w(fe.$$.fragment,e),w(Be.$$.fragment,e),w(Ke.$$.fragment,e),w(Xe.$$.fragment,e),w(ue.$$.fragment,e),w(_e.$$.fragment,e),w(Qe.$$.fragment,e),w(eo.$$.fragment,e),w(so.$$.fragment,e),w(be.$$.fragment,e),w(Ee.$$.fragment,e),Lt=!1},d(e){t(h),e&&t(b),e&&t(_),V(n),e&&t(gt),e&&t(R),V(Ve),e&&t(ut),e&&t(q),e&&t(_t),e&&t(io),e&&t(vt),e&&t(lo),e&&t(bt),e&&t(co),e&&t(Et),e&&t(te),e&&t(Mt),e&&t(se),e&&t(At),e&&t(ae),e&&t(yt),e&&t(D),e&&t(wt),e&&t(O),V(je),e&&t(Vt),e&&t(go),e&&t($t),e&&t(uo),e&&t(Tt),e&&t(L),e&&t(Pt),e&&t(U),V(Ce),e&&t(xt),e&&t(P),V(Fe),V(ie),e&&t(jt),e&&t(J),V(Se),e&&t(kt),e&&t(z),V(qe),V(De),e&&t(zt),e&&t(H),V(Le),e&&t(It),e&&t(I),V(Re),V(Oe),e&&t(Ct),e&&t(B),V(Ue),e&&t(Ft),e&&t(C),V(We),V(He),V(he),V(fe),e&&t(Nt),e&&t(Y),V(Be),e&&t(St),e&&t(F),V(Ke),V(Xe),V(ue),V(_e),e&&t(qt),e&&t(X),V(Qe),e&&t(Dt),e&&t(N),V(eo),V(so),V(be),V(Ee)}}}const jn={local:"videomae",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.VideoMAEConfig",title:"VideoMAEConfig"},{local:"transformers.VideoMAEImageProcessor",title:"VideoMAEFeatureExtractor"},{local:"transformers.VideoMAEImageProcessor",title:"VideoMAEImageProcessor"},{local:"transformers.VideoMAEModel",title:"VideoMAEModel"},{local:"transformers.VideoMAEForPreTraining",title:"VideoMAEForPreTraining"},{local:"transformers.VideoMAEForVideoClassification",title:"VideoMAEForVideoClassification"}],title:"VideoMAE"};function kn($){return Mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qn extends un{constructor(h){super();_n(this,h,kn,xn,vn,{})}}export{qn as default,jn as metadata};
