import{s as nt,o as ot,n as Ee}from"../chunks/scheduler.9bc65507.js";import{S as lt,i as rt,g as n,s as c,u as y,A as it,h as o,f as s,c as m,j as f,v as j,y as M,k as h,o as r,a as i,w as T,d as w,t as b,x as J}from"../chunks/index.78c82d43.js";import{T as at}from"../chunks/Tip.87d55b76.js";import{D as Se}from"../chunks/Docstring.f3d04bd2.js";import{C as Zs}from"../chunks/CodeBlock.48618ec2.js";import{I as Ie}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Cs}from"../chunks/ExampleCodeBlock.872b014d.js";function ct(v){let l,g="Example:",p,d,u;return d=new Zs({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRpbWVzZm9ybWVyQ29uZmlnJTJDJTIwVGltZXNmb3JtZXJNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBUaW1lU2Zvcm1lciUyMHRpbWVzZm9ybWVyLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwVGltZXNmb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBUaW1lc2Zvcm1lck1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TimesformerConfig, TimesformerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a TimeSformer timesformer-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = TimesformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TimesformerModel(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(){l=n("p"),l.textContent=g,p=c(),y(d.$$.fragment)},l(t){l=o(t,"P",{"data-svelte-h":!0}),M(l)!=="svelte-11lpom8"&&(l.textContent=g),p=m(t),j(d.$$.fragment,t)},m(t,_){i(t,l,_),i(t,p,_),T(d,t,_),u=!0},p:Ee,i(t){u||(w(d.$$.fragment,t),u=!0)},o(t){b(d.$$.fragment,t),u=!1},d(t){t&&(s(l),s(p)),J(d,t)}}}function mt(v){let l,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=n("p"),l.innerHTML=g},l(p){l=o(p,"P",{"data-svelte-h":!0}),M(l)!=="svelte-fincs2"&&(l.innerHTML=g)},m(p,d){i(p,l,d)},p:Ee,d(p){p&&s(l)}}}function pt(v){let l,g="Examples:",p,d,u;return d=new Zs({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> AutoImageProcessor, TimesformerModel
<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 8 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">8</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, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TimesformerModel.from_pretrained(<span class="hljs-string">&quot;facebook/timesformer-base-finetuned-k400&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">1569</span>, <span class="hljs-number">768</span>]`}}),{c(){l=n("p"),l.textContent=g,p=c(),y(d.$$.fragment)},l(t){l=o(t,"P",{"data-svelte-h":!0}),M(l)!=="svelte-kvfsh7"&&(l.textContent=g),p=m(t),j(d.$$.fragment,t)},m(t,_){i(t,l,_),i(t,p,_),T(d,t,_),u=!0},p:Ee,i(t){u||(w(d.$$.fragment,t),u=!0)},o(t){b(d.$$.fragment,t),u=!1},d(t){t&&(s(l),s(p)),J(d,t)}}}function dt(v){let l,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=n("p"),l.innerHTML=g},l(p){l=o(p,"P",{"data-svelte-h":!0}),M(l)!=="svelte-fincs2"&&(l.innerHTML=g)},m(p,d){i(p,l,d)},p:Ee,d(p){p&&s(l)}}}function ht(v){let l,g="Examples:",p,d,u;return d=new Zs({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> 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> AutoImageProcessor, TimesformerForVideoClassification
<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 8 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">8</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, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base-finetuned-kinetics&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TimesformerForVideoClassification.from_pretrained(<span class="hljs-string">&quot;facebook/timesformer-base-finetuned-k400&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(){l=n("p"),l.textContent=g,p=c(),y(d.$$.fragment)},l(t){l=o(t,"P",{"data-svelte-h":!0}),M(l)!=="svelte-kvfsh7"&&(l.textContent=g),p=m(t),j(d.$$.fragment,t)},m(t,_){i(t,l,_),i(t,p,_),T(d,t,_),u=!0},p:Ee,i(t){u||(w(d.$$.fragment,t),u=!0)},o(t){b(d.$$.fragment,t),u=!1},d(t){t&&(s(l),s(p)),J(d,t)}}}function ft(v){let l,g,p,d,u,t,_,P,is,ue,Is="TimeSformer",Xe,W,A,Be,q,cs,Me,Bs="Overview",Ne,K,Ws=`The TimeSformer model was proposed in <a href="https://arxiv.org/abs/2102.05095" rel="nofollow">TimeSformer: Is Space-Time Attention All You Need for Video Understanding?</a> by Facebook Research.
This work is a milestone in action-recognition field being the first video transformer. It inspired many transformer based video understanding and classification papers.`,ze,D,Gs="The abstract from the paper is the following:",Qe,O,ks='<em>We present a convolution-free approach to video classification built exclusively on self-attention over space and time. Our method, named “TimeSformer,” adapts the standard Transformer architecture to video by enabling spatiotemporal feature learning directly from a sequence of frame-level patches. Our experimental study compares different self-attention schemes and suggests that “divided attention,” where temporal attention and spatial attention are separately applied within each block, leads to the best video classification accuracy among the design choices considered. Despite the radically new design, TimeSformer achieves state-of-the-art results on several action recognition benchmarks, including the best reported accuracy on Kinetics-400 and Kinetics-600. Finally, compared to 3D convolutional networks, our model is faster to train, it can achieve dramatically higher test efficiency (at a small drop in accuracy), and it can also be applied to much longer video clips (over one minute long). Code and models are available at: <a href="https://github.com/facebookresearch/TimeSformer" rel="nofollow">this https URL</a>.</em>',Ye,ee,xs="Tips:",Re,se,Vs="There are many pretrained variants. Select your pretrained model based on the dataset it is trained on. Moreover, the number of input frames per clip changes based on the model size so you should consider this parameter while selecting your pretrained model.",He,te,As=`This model was contributed by <a href="https://huggingface.co/fcakyon" rel="nofollow">fcakyon</a>.
The original code can be found <a href="https://github.com/facebookresearch/TimeSformer" rel="nofollow">here</a>.`,Le,G,$,We,ae,ms,ge,$s="Documentation resources",Pe,ne,Fs='<li><a href="../tasks/video_classification">Video classification task guide</a></li>',qe,k,F,Ge,oe,ps,ye,Ss="TimesformerConfig",Ke,U,le,ds,je,Es=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/timesformer#transformers.TimesformerModel">TimesformerModel</a>. It is used to instantiate a
TimeSformer 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 TimeSformer
<a href="https://huggingface.co/facebook/timesformer-base-finetuned-k600" rel="nofollow">facebook/timesformer-base-finetuned-k600</a>
architecture.`,hs,Te,Xs=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,fs,S,De,x,E,ke,re,us,we,Ns="TimesformerModel",Oe,I,ie,Ms,be,zs=`The bare TimeSformer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,gs,C,ce,ys,Je,Qs='The <a href="/docs/transformers/v4.33.3/en/model_doc/timesformer#transformers.TimesformerModel">TimesformerModel</a> forward method, overrides the <code>__call__</code> special method.',js,X,Ts,N,es,V,z,xe,me,ws,_e,Ys="TimesformerForVideoClassification",ss,B,pe,bs,Ue,Rs=`TimeSformer 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 <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Js,Z,de,_s,ve,Hs='The <a href="/docs/transformers/v4.33.3/en/model_doc/timesformer#transformers.TimesformerForVideoClassification">TimesformerForVideoClassification</a> forward method, overrides the <code>__call__</code> special method.',Us,Q,vs,Y,ts,Ve,as;return P=new Ie({}),q=new Ie({}),ae=new Ie({}),oe=new Ie({}),le=new Se({props:{name:"class transformers.TimesformerConfig",anchor:"transformers.TimesformerConfig",parameters:[{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"num_frames",val:" = 8"},{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-06"},{name:"qkv_bias",val:" = True"},{name:"attention_type",val:" = 'divided_space_time'"},{name:"drop_path_rate",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The number of frames in each video.`,name:"num_frames"},{anchor:"transformers.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.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.TimesformerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.TimesformerConfig.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.TimesformerConfig.attention_type",description:`<strong>attention_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;divided_space_time&quot;</code>) &#x2014;
The attention type to use. Must be one of <code>&quot;divided_space_time&quot;</code>, <code>&quot;space_only&quot;</code>, <code>&quot;joint_space_time&quot;</code>.`,name:"attention_type"},{anchor:"transformers.TimesformerConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout ratio for stochastic depth.`,name:"drop_path_rate"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/timesformer/configuration_timesformer.py#L28"}}),S=new Cs({props:{anchor:"transformers.TimesformerConfig.example",$$slots:{default:[ct]},$$scope:{ctx:v}}}),re=new Ie({}),ie=new Se({props:{name:"class transformers.TimesformerModel",anchor:"transformers.TimesformerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TimesformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/timesformer#transformers.TimesformerConfig">TimesformerConfig</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.3/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.3/src/transformers/models/timesformer/modeling_timesformer.py#L534"}}),ce=new Se({props:{name:"forward",anchor:"transformers.TimesformerModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{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.TimesformerModel.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.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.33.3/en/model_doc/videomae#transformers.VideoMAEImageProcessor.preprocess">VideoMAEImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TimesformerModel.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.TimesformerModel.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.TimesformerModel.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.3/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.3/src/transformers/models/timesformer/modeling_timesformer.py#L558",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.33.3/en/model_doc/timesformer#transformers.TimesformerConfig"
>TimesformerConfig</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>) — 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>) — 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>) — 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.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),X=new at({props:{$$slots:{default:[mt]},$$scope:{ctx:v}}}),N=new Cs({props:{anchor:"transformers.TimesformerModel.forward.example",$$slots:{default:[pt]},$$scope:{ctx:v}}}),me=new Ie({}),pe=new Se({props:{name:"class transformers.TimesformerForVideoClassification",anchor:"transformers.TimesformerForVideoClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TimesformerForVideoClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/timesformer#transformers.TimesformerConfig">TimesformerConfig</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.3/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.3/src/transformers/models/timesformer/modeling_timesformer.py#L676"}}),de=new Se({props:{name:"forward",anchor:"transformers.TimesformerForVideoClassification.forward",parameters:[{name:"pixel_values",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.TimesformerForVideoClassification.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.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.33.3/en/model_doc/videomae#transformers.VideoMAEImageProcessor.preprocess">VideoMAEImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TimesformerForVideoClassification.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.TimesformerForVideoClassification.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.TimesformerForVideoClassification.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TimesformerForVideoClassification.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.3/src/transformers/models/timesformer/modeling_timesformer.py#L689",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.3/en/model_doc/timesformer#transformers.TimesformerConfig"
>TimesformerConfig</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) — 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>) — 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>) — 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>) — 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.3/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new at({props:{$$slots:{default:[dt]},$$scope:{ctx:v}}}),Y=new Cs({props:{anchor:"transformers.TimesformerForVideoClassification.forward.example",$$slots:{default:[ht]},$$scope:{ctx:v}}}),{c(){l=n("meta"),g=c(),p=n("p"),d=c(),u=n("h1"),t=n("a"),_=n("span"),y(P.$$.fragment),is=c(),ue=n("span"),ue.textContent=Is,Xe=c(),W=n("h2"),A=n("a"),Be=n("span"),y(q.$$.fragment),cs=c(),Me=n("span"),Me.textContent=Bs,Ne=c(),K=n("p"),K.innerHTML=Ws,ze=c(),D=n("p"),D.textContent=Gs,Qe=c(),O=n("p"),O.innerHTML=ks,Ye=c(),ee=n("p"),ee.textContent=xs,Re=c(),se=n("p"),se.textContent=Vs,He=c(),te=n("p"),te.innerHTML=As,Le=c(),G=n("h2"),$=n("a"),We=n("span"),y(ae.$$.fragment),ms=c(),ge=n("span"),ge.textContent=$s,Pe=c(),ne=n("ul"),ne.innerHTML=Fs,qe=c(),k=n("h2"),F=n("a"),Ge=n("span"),y(oe.$$.fragment),ps=c(),ye=n("span"),ye.textContent=Ss,Ke=c(),U=n("div"),y(le.$$.fragment),ds=c(),je=n("p"),je.innerHTML=Es,hs=c(),Te=n("p"),Te.innerHTML=Xs,fs=c(),y(S.$$.fragment),De=c(),x=n("h2"),E=n("a"),ke=n("span"),y(re.$$.fragment),us=c(),we=n("span"),we.textContent=Ns,Oe=c(),I=n("div"),y(ie.$$.fragment),Ms=c(),be=n("p"),be.innerHTML=zs,gs=c(),C=n("div"),y(ce.$$.fragment),ys=c(),Je=n("p"),Je.innerHTML=Qs,js=c(),y(X.$$.fragment),Ts=c(),y(N.$$.fragment),es=c(),V=n("h2"),z=n("a"),xe=n("span"),y(me.$$.fragment),ws=c(),_e=n("span"),_e.textContent=Ys,ss=c(),B=n("div"),y(pe.$$.fragment),bs=c(),Ue=n("p"),Ue.innerHTML=Rs,Js=c(),Z=n("div"),y(de.$$.fragment),_s=c(),ve=n("p"),ve.innerHTML=Hs,Us=c(),y(Q.$$.fragment),vs=c(),y(Y.$$.fragment),ts=c(),Ve=n("p"),this.h()},l(e){const a=it("svelte-1phssyn",document.head);l=o(a,"META",{name:!0,content:!0}),a.forEach(s),g=m(e),p=o(e,"P",{}),f(p).forEach(s),d=m(e),u=o(e,"H1",{class:!0});var he=f(u);t=o(he,"A",{id:!0,class:!0,href:!0});var Ae=f(t);_=o(Ae,"SPAN",{});var $e=f(_);j(P.$$.fragment,$e),$e.forEach(s),Ae.forEach(s),is=m(he),ue=o(he,"SPAN",{"data-svelte-h":!0}),M(ue)!=="svelte-c43tho"&&(ue.textContent=Is),he.forEach(s),Xe=m(e),W=o(e,"H2",{class:!0});var fe=f(W);A=o(fe,"A",{id:!0,class:!0,href:!0});var Fe=f(A);Be=o(Fe,"SPAN",{});var Ls=f(Be);j(q.$$.fragment,Ls),Ls.forEach(s),Fe.forEach(s),cs=m(fe),Me=o(fe,"SPAN",{"data-svelte-h":!0}),M(Me)!=="svelte-1jsw1pg"&&(Me.textContent=Bs),fe.forEach(s),Ne=m(e),K=o(e,"P",{"data-svelte-h":!0}),M(K)!=="svelte-i6ab1x"&&(K.innerHTML=Ws),ze=m(e),D=o(e,"P",{"data-svelte-h":!0}),M(D)!=="svelte-vfdo9a"&&(D.textContent=Gs),Qe=m(e),O=o(e,"P",{"data-svelte-h":!0}),M(O)!=="svelte-j68dli"&&(O.innerHTML=ks),Ye=m(e),ee=o(e,"P",{"data-svelte-h":!0}),M(ee)!=="svelte-axv494"&&(ee.textContent=xs),Re=m(e),se=o(e,"P",{"data-svelte-h":!0}),M(se)!=="svelte-7832el"&&(se.textContent=Vs),He=m(e),te=o(e,"P",{"data-svelte-h":!0}),M(te)!=="svelte-1wsudhb"&&(te.innerHTML=As),Le=m(e),G=o(e,"H2",{class:!0});var ns=f(G);$=o(ns,"A",{id:!0,class:!0,href:!0});var Ps=f($);We=o(Ps,"SPAN",{});var qs=f(We);j(ae.$$.fragment,qs),qs.forEach(s),Ps.forEach(s),ms=m(ns),ge=o(ns,"SPAN",{"data-svelte-h":!0}),M(ge)!=="svelte-n3f0j0"&&(ge.textContent=$s),ns.forEach(s),Pe=m(e),ne=o(e,"UL",{"data-svelte-h":!0}),M(ne)!=="svelte-gz9vpw"&&(ne.innerHTML=Fs),qe=m(e),k=o(e,"H2",{class:!0});var os=f(k);F=o(os,"A",{id:!0,class:!0,href:!0});var Ks=f(F);Ge=o(Ks,"SPAN",{});var Ds=f(Ge);j(oe.$$.fragment,Ds),Ds.forEach(s),Ks.forEach(s),ps=m(os),ye=o(os,"SPAN",{"data-svelte-h":!0}),M(ye)!=="svelte-h1dv0a"&&(ye.textContent=Ss),os.forEach(s),Ke=m(e),U=o(e,"DIV",{class:!0});var R=f(U);j(le.$$.fragment,R),ds=m(R),je=o(R,"P",{"data-svelte-h":!0}),M(je)!=="svelte-oaupqm"&&(je.innerHTML=Es),hs=m(R),Te=o(R,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-cfh5wl"&&(Te.innerHTML=Xs),fs=m(R),j(S.$$.fragment,R),R.forEach(s),De=m(e),x=o(e,"H2",{class:!0});var ls=f(x);E=o(ls,"A",{id:!0,class:!0,href:!0});var Os=f(E);ke=o(Os,"SPAN",{});var et=f(ke);j(re.$$.fragment,et),et.forEach(s),Os.forEach(s),us=m(ls),we=o(ls,"SPAN",{"data-svelte-h":!0}),M(we)!=="svelte-13arlj1"&&(we.textContent=Ns),ls.forEach(s),Oe=m(e),I=o(e,"DIV",{class:!0});var Ce=f(I);j(ie.$$.fragment,Ce),Ms=m(Ce),be=o(Ce,"P",{"data-svelte-h":!0}),M(be)!=="svelte-gln3qs"&&(be.innerHTML=zs),gs=m(Ce),C=o(Ce,"DIV",{class:!0});var H=f(C);j(ce.$$.fragment,H),ys=m(H),Je=o(H,"P",{"data-svelte-h":!0}),M(Je)!=="svelte-ut3v9c"&&(Je.innerHTML=Qs),js=m(H),j(X.$$.fragment,H),Ts=m(H),j(N.$$.fragment,H),H.forEach(s),Ce.forEach(s),es=m(e),V=o(e,"H2",{class:!0});var rs=f(V);z=o(rs,"A",{id:!0,class:!0,href:!0});var st=f(z);xe=o(st,"SPAN",{});var tt=f(xe);j(me.$$.fragment,tt),tt.forEach(s),st.forEach(s),ws=m(rs),_e=o(rs,"SPAN",{"data-svelte-h":!0}),M(_e)!=="svelte-1ngdtme"&&(_e.textContent=Ys),rs.forEach(s),ss=m(e),B=o(e,"DIV",{class:!0});var Ze=f(B);j(pe.$$.fragment,Ze),bs=m(Ze),Ue=o(Ze,"P",{"data-svelte-h":!0}),M(Ue)!=="svelte-1ancuo0"&&(Ue.innerHTML=Rs),Js=m(Ze),Z=o(Ze,"DIV",{class:!0});var L=f(Z);j(de.$$.fragment,L),_s=m(L),ve=o(L,"P",{"data-svelte-h":!0}),M(ve)!=="svelte-12f7vbo"&&(ve.innerHTML=Hs),Us=m(L),j(Q.$$.fragment,L),vs=m(L),j(Y.$$.fragment,L),L.forEach(s),Ze.forEach(s),ts=m(e),Ve=o(e,"P",{}),f(Ve).forEach(s),this.h()},h(){h(l,"name","hf:doc:metadata"),h(l,"content",JSON.stringify(ut)),h(t,"id","timesformer"),h(t,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(t,"href","#timesformer"),h(u,"class","relative group"),h(A,"id","overview"),h(A,"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"),h(A,"href","#overview"),h(W,"class","relative group"),h($,"id","documentation-resources"),h($,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h($,"href","#documentation-resources"),h(G,"class","relative group"),h(F,"id","transformers.TimesformerConfig"),h(F,"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"),h(F,"href","#transformers.TimesformerConfig"),h(k,"class","relative group"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(E,"id","transformers.TimesformerModel"),h(E,"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"),h(E,"href","#transformers.TimesformerModel"),h(x,"class","relative group"),h(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(z,"id","transformers.TimesformerForVideoClassification"),h(z,"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"),h(z,"href","#transformers.TimesformerForVideoClassification"),h(V,"class","relative group"),h(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(B,"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,a){r(document.head,l),i(e,g,a),i(e,p,a),i(e,d,a),i(e,u,a),r(u,t),r(t,_),T(P,_,null),r(u,is),r(u,ue),i(e,Xe,a),i(e,W,a),r(W,A),r(A,Be),T(q,Be,null),r(W,cs),r(W,Me),i(e,Ne,a),i(e,K,a),i(e,ze,a),i(e,D,a),i(e,Qe,a),i(e,O,a),i(e,Ye,a),i(e,ee,a),i(e,Re,a),i(e,se,a),i(e,He,a),i(e,te,a),i(e,Le,a),i(e,G,a),r(G,$),r($,We),T(ae,We,null),r(G,ms),r(G,ge),i(e,Pe,a),i(e,ne,a),i(e,qe,a),i(e,k,a),r(k,F),r(F,Ge),T(oe,Ge,null),r(k,ps),r(k,ye),i(e,Ke,a),i(e,U,a),T(le,U,null),r(U,ds),r(U,je),r(U,hs),r(U,Te),r(U,fs),T(S,U,null),i(e,De,a),i(e,x,a),r(x,E),r(E,ke),T(re,ke,null),r(x,us),r(x,we),i(e,Oe,a),i(e,I,a),T(ie,I,null),r(I,Ms),r(I,be),r(I,gs),r(I,C),T(ce,C,null),r(C,ys),r(C,Je),r(C,js),T(X,C,null),r(C,Ts),T(N,C,null),i(e,es,a),i(e,V,a),r(V,z),r(z,xe),T(me,xe,null),r(V,ws),r(V,_e),i(e,ss,a),i(e,B,a),T(pe,B,null),r(B,bs),r(B,Ue),r(B,Js),r(B,Z),T(de,Z,null),r(Z,_s),r(Z,ve),r(Z,Us),T(Q,Z,null),r(Z,vs),T(Y,Z,null),i(e,ts,a),i(e,Ve,a),as=!0},p(e,[a]){const he={};a&2&&(he.$$scope={dirty:a,ctx:e}),S.$set(he);const Ae={};a&2&&(Ae.$$scope={dirty:a,ctx:e}),X.$set(Ae);const $e={};a&2&&($e.$$scope={dirty:a,ctx:e}),N.$set($e);const fe={};a&2&&(fe.$$scope={dirty:a,ctx:e}),Q.$set(fe);const Fe={};a&2&&(Fe.$$scope={dirty:a,ctx:e}),Y.$set(Fe)},i(e){as||(w(P.$$.fragment,e),w(q.$$.fragment,e),w(ae.$$.fragment,e),w(oe.$$.fragment,e),w(le.$$.fragment,e),w(S.$$.fragment,e),w(re.$$.fragment,e),w(ie.$$.fragment,e),w(ce.$$.fragment,e),w(X.$$.fragment,e),w(N.$$.fragment,e),w(me.$$.fragment,e),w(pe.$$.fragment,e),w(de.$$.fragment,e),w(Q.$$.fragment,e),w(Y.$$.fragment,e),as=!0)},o(e){b(P.$$.fragment,e),b(q.$$.fragment,e),b(ae.$$.fragment,e),b(oe.$$.fragment,e),b(le.$$.fragment,e),b(S.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(ce.$$.fragment,e),b(X.$$.fragment,e),b(N.$$.fragment,e),b(me.$$.fragment,e),b(pe.$$.fragment,e),b(de.$$.fragment,e),b(Q.$$.fragment,e),b(Y.$$.fragment,e),as=!1},d(e){e&&(s(g),s(p),s(d),s(u),s(Xe),s(W),s(Ne),s(K),s(ze),s(D),s(Qe),s(O),s(Ye),s(ee),s(Re),s(se),s(He),s(te),s(Le),s(G),s(Pe),s(ne),s(qe),s(k),s(Ke),s(U),s(De),s(x),s(Oe),s(I),s(es),s(V),s(ss),s(B),s(ts),s(Ve)),s(l),J(P),J(q),J(ae),J(oe),J(le),J(S),J(re),J(ie),J(ce),J(X),J(N),J(me),J(pe),J(de),J(Q),J(Y)}}}const ut={local:"timesformer",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.TimesformerConfig",title:"TimesformerConfig"},{local:"transformers.TimesformerModel",title:"TimesformerModel"},{local:"transformers.TimesformerForVideoClassification",title:"TimesformerForVideoClassification"}],title:"TimeSformer"};function Mt(v){return ot(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _t extends lt{constructor(l){super(),rt(this,l,Mt,ft,nt,{})}}export{_t as component};
