import{s as Tt,f as $t,o as jt,n as be}from"../chunks/scheduler.25b97de1.js";import{S as vt,i as Ct,g as c,s as r,r as h,A as Ut,h as p,f as o,c as i,j as de,u as f,x as w,k as W,y as m,a as s,v as u,d as g,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as st}from"../chunks/Tip.baa67368.js";import{D as Me}from"../chunks/Docstring.ffac8efa.js";import{C as Qe}from"../chunks/CodeBlock.e6cd0d95.js";import{E as rt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as kt}from"../chunks/PipelineTag.5f100392.js";import{H as ce,E as xt}from"../chunks/EditOnGithub.91d95064.js";function Zt(T){let a,y="Example:",l,d,M;return d=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMElKZXBhQ29uZmlnJTJDJTIwSUplcGFNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBJSkVQQSUyMGlqZXBhLWJhc2UtcGF0Y2gxNi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwSUplcGFDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwaWplcGEtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSUplcGFNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> IJepaConfig, IJepaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a IJEPA ijepa-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = IJepaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the ijepa-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = IJepaModel(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`,wrap:!1}}),{c(){a=c("p"),a.textContent=y,l=r(),h(d.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),l=i(n),f(d.$$.fragment,n)},m(n,J){s(n,a,J),s(n,l,J),u(d,n,J),M=!0},p:be,i(n){M||(g(d.$$.fragment,n),M=!0)},o(n){_(d.$$.fragment,n),M=!1},d(n){n&&(o(a),o(l)),b(d,n)}}}function Wt(T){let a,y=`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(){a=c("p"),a.innerHTML=y},l(l){a=p(l,"P",{"data-svelte-h":!0}),w(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(l,d){s(l,a,d)},p:be,d(l){l&&o(a)}}}function Ft(T){let a,y="Example:",l,d,M;return d=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMElKZXBhTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGaWplcGFfdml0aDE0XzFrJTIyKSUwQW1vZGVsJTIwJTNEJTIwSUplcGFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZpamVwYV92aXRoMTRfMWslMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, IJepaModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/ijepa_vith14_1k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = IJepaModel.from_pretrained(<span class="hljs-string">&quot;facebook/ijepa_vith14_1k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, 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">&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">256</span>, <span class="hljs-number">1280</span>]`,wrap:!1}}),{c(){a=c("p"),a.textContent=y,l=r(),h(d.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),l=i(n),f(d.$$.fragment,n)},m(n,J){s(n,a,J),s(n,l,J),u(d,n,J),M=!0},p:be,i(n){M||(g(d.$$.fragment,n),M=!0)},o(n){_(d.$$.fragment,n),M=!1},d(n){n&&(o(a),o(l)),b(d,n)}}}function Et(T){let a,y=`Note that it’s possible to fine-tune IJepa on higher resolution images than the ones it has been trained on, by
setting <code>interpolate_pos_encoding</code> to <code>True</code> in the forward of the model. This will interpolate the pre-trained
position embeddings to the higher resolution.`;return{c(){a=c("p"),a.innerHTML=y},l(l){a=p(l,"P",{"data-svelte-h":!0}),w(a)!=="svelte-lhh59f"&&(a.innerHTML=y)},m(l,d){s(l,a,d)},p:be,d(l){l&&o(a)}}}function zt(T){let a,y=`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(){a=c("p"),a.innerHTML=y},l(l){a=p(l,"P",{"data-svelte-h":!0}),w(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(l,d){s(l,a,d)},p:be,d(l){l&&o(a)}}}function Bt(T){let a,y="Example:",l,d,M;return d=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMElKZXBhRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZpamVwYV92aXRoMTRfMWslMjIpJTBBbW9kZWwlMjAlM0QlMjBJSmVwYUZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGaWplcGFfdml0aDE0XzFrJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, IJepaForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/ijepa_vith14_1k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = IJepaForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/ijepa_vith14_1k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, 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>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet 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])
Egyptian cat`,wrap:!1}}),{c(){a=c("p"),a.textContent=y,l=r(),h(d.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),l=i(n),f(d.$$.fragment,n)},m(n,J){s(n,a,J),s(n,l,J),u(d,n,J),M=!0},p:be,i(n){M||(g(d.$$.fragment,n),M=!0)},o(n){_(d.$$.fragment,n),M=!1},d(n){n&&(o(a),o(l)),b(d,n)}}}function Gt(T){let a,y,l,d,M,n,J,we,X,it=`The I-JEPA model was proposed in <a href="https://arxiv.org/abs/2301.08243" rel="nofollow">Image-based Joint-Embedding Predictive Architecture</a> by Mahmoud Assran, Quentin Duval, Ishan Misra, Piotr Bojanowski, Pascal Vincent, Michael Rabbat, Yann LeCun, Nicolas Ballas.
I-JEPA is a self-supervised learning method that predicts the representations of one part of an image based on other parts of the same image. This approach focuses on learning semantic features without relying on pre-defined invariances from hand-crafted data transformations, which can bias specific tasks, or on filling in pixel-level details, which often leads to less meaningful representations.`,Je,Q,lt="The abstract from the paper is the following:",Ie,P,dt="This paper demonstrates an approach for learning highly semantic image representations without relying on hand-crafted data-augmentations. We introduce the Image- based Joint-Embedding Predictive Architecture (I-JEPA), a non-generative approach for self-supervised learning from images. The idea behind I-JEPA is simple: from a single context block, predict the representations of various target blocks in the same image. A core design choice to guide I-JEPA towards producing semantic representations is the masking strategy; specifically, it is crucial to (a) sample tar- get blocks with sufficiently large scale (semantic), and to (b) use a sufficiently informative (spatially distributed) context block. Empirically, when combined with Vision Transform- ers, we find I-JEPA to be highly scalable. For instance, we train a ViT-Huge/14 on ImageNet using 16 A100 GPUs in under 72 hours to achieve strong downstream performance across a wide range of tasks, from linear classification to object counting and depth prediction.",Te,E,ct,$e,S,pt='I-JEPA architecture. Taken from the <a href="https://arxiv.org/abs/2301.08243">original paper.</a>',je,H,mt=`This model was contributed by <a href="https://huggingface.co/jmtzt" rel="nofollow">jmtzt</a>.
The original code can be found <a href="https://github.com/facebookresearch/ijepa" rel="nofollow">here</a>.`,ve,Y,Ce,q,ht="Here is how to use this model for image feature extraction:",Ue,A,ke,L,xe,D,ft="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with I-JEPA.",Ze,O,We,K,ut='<li><a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaForImageClassification">IJepaForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',Fe,ee,Ee,$,te,Pe,pe,gt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaModel">IJepaModel</a>. It is used to instantiate an IJEPA
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 I-JEPA
<a href="https://huggingface.co/facebook/ijepa_vith14_1k" rel="nofollow">facebook/ijepa_vith14_1k</a> architecture.`,Se,me,_t=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,He,z,ze,ae,Be,U,oe,Ye,he,bt=`The bare IJepa 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.`,qe,v,ne,Ae,fe,yt='The <a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaModel">IJepaModel</a> forward method, overrides the <code>__call__</code> special method.',Le,B,De,G,Ge,se,Re,I,re,Oe,ue,Mt=`IJepa Model transformer with an image classification head on top (a linear layer on top of the final hidden states)
e.g. for ImageNet.`,Ke,R,et,ge,wt=`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.`,tt,C,ie,at,_e,Jt='The <a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaForImageClassification">IJepaForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ot,V,nt,N,Ve,le,Ne,ye,Xe;return M=new ce({props:{title:"I-JEPA",local:"i-jepa",headingTag:"h1"}}),J=new ce({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Y=new ce({props:{title:"How to use",local:"how-to-use",headingTag:"h2"}}),A=new Qe({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0b3JjaC5ubi5mdW5jdGlvbmFsJTIwaW1wb3J0JTIwY29zaW5lX3NpbWlsYXJpdHklMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsJTJDJTIwQXV0b1Byb2Nlc3NvciUwQSUwQXVybF8xJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQXVybF8yJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMjE5NTc4LmpwZyUyMiUwQWltYWdlXzElMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmxfMSUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFpbWFnZV8yJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsXzIlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRmlqZXBhX3ZpdGgxNF8xayUyMiUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEElMEElNDB0b3JjaC5ub19ncmFkKCklMEFkZWYlMjBpbmZlcihpbWFnZSklM0ElMEElMjAlMjAlMjAlMjBpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlLm1lYW4oZGltJTNEMSklMEElMEElMEFlbWJlZF8xJTIwJTNEJTIwaW5mZXIoaW1hZ2VfMSklMEFlbWJlZF8yJTIwJTNEJTIwaW5mZXIoaW1hZ2VfMiklMEElMEFzaW1pbGFyaXR5JTIwJTNEJTIwY29zaW5lX3NpbWlsYXJpdHkoZW1iZWRfMSUyQyUyMGVtYmVkXzIpJTBBcHJpbnQoc2ltaWxhcml0eSk=",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> torch.nn.functional <span class="hljs-keyword">import</span> cosine_similarity

<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel, AutoProcessor

url_1 = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
url_2 = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000219578.jpg&quot;</span>
image_1 = Image.<span class="hljs-built_in">open</span>(requests.get(url_1, stream=<span class="hljs-literal">True</span>).raw)
image_2 = Image.<span class="hljs-built_in">open</span>(requests.get(url_2, stream=<span class="hljs-literal">True</span>).raw)

model_id = <span class="hljs-string">&quot;facebook/ijepa_vith14_1k&quot;</span>
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id)

<span class="hljs-meta">@torch.no_grad()</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">infer</span>(<span class="hljs-params">image</span>):
    inputs = processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
    outputs = model(**inputs)
    <span class="hljs-keyword">return</span> outputs.last_hidden_state.mean(dim=<span class="hljs-number">1</span>)


embed_1 = infer(image_1)
embed_2 = infer(image_2)

similarity = cosine_similarity(embed_1, embed_2)
<span class="hljs-built_in">print</span>(similarity)`,wrap:!1}}),L=new ce({props:{title:"Resources",local:"resources",headingTag:"h2"}}),O=new kt({props:{pipeline:"image-classification"}}),ee=new ce({props:{title:"IJepaConfig",local:"transformers.IJepaConfig",headingTag:"h2"}}),te=new Me({props:{name:"class transformers.IJepaConfig",anchor:"transformers.IJepaConfig",parameters:[{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:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.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.IJepaConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/ijepa/configuration_ijepa.py#L20"}}),z=new rt({props:{anchor:"transformers.IJepaConfig.example",$$slots:{default:[Zt]},$$scope:{ctx:T}}}),ae=new ce({props:{title:"IJepaModel",local:"transformers.IJepaModel",headingTag:"h2"}}),oe=new Me({props:{name:"class transformers.IJepaModel",anchor:"transformers.IJepaModel",parameters:[{name:"config",val:": IJepaConfig"},{name:"add_pooling_layer",val:": bool = False"},{name:"use_mask_token",val:": bool = False"}],parametersDescription:[{anchor:"transformers.IJepaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaConfig">IJepaConfig</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/main/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/main/src/transformers/models/ijepa/modeling_ijepa.py#L547"}}),ne=new Me({props:{name:"forward",anchor:"transformers.IJepaModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{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:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.IJepaModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <code>IJepaImageProcessor.__call__</code>
for details.`,name:"pixel_values"},{anchor:"transformers.IJepaModel.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.IJepaModel.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.IJepaModel.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.IJepaModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.IJepaModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.IJepaModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/ijepa/modeling_ijepa.py#L575",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaConfig"
>IJepaConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),B=new st({props:{$$slots:{default:[Wt]},$$scope:{ctx:T}}}),G=new rt({props:{anchor:"transformers.IJepaModel.forward.example",$$slots:{default:[Ft]},$$scope:{ctx:T}}}),se=new ce({props:{title:"IJepaForImageClassification",local:"transformers.IJepaForImageClassification",headingTag:"h2"}}),re=new Me({props:{name:"class transformers.IJepaForImageClassification",anchor:"transformers.IJepaForImageClassification",parameters:[{name:"config",val:": IJepaConfig"}],parametersDescription:[{anchor:"transformers.IJepaForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/ijepa#transformers.IJepaConfig">IJepaConfig</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/main/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/main/src/transformers/models/ijepa/modeling_ijepa.py#L649"}}),R=new st({props:{$$slots:{default:[Et]},$$scope:{ctx:T}}}),ie=new Me({props:{name:"forward",anchor:"transformers.IJepaForImageClassification.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:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.IJepaForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <code>IJepaImageProcessor.__call__</code>
for details.`,name:"pixel_values"},{anchor:"transformers.IJepaForImageClassification.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.IJepaForImageClassification.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.IJepaForImageClassification.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.IJepaForImageClassification.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.IJepaForImageClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.IJepaForImageClassification.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/main/src/transformers/models/ijepa/modeling_ijepa.py#L677",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/ijepa#transformers.IJepaConfig"
>IJepaConfig</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),V=new st({props:{$$slots:{default:[zt]},$$scope:{ctx:T}}}),N=new rt({props:{anchor:"transformers.IJepaForImageClassification.forward.example",$$slots:{default:[Bt]},$$scope:{ctx:T}}}),le=new xt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/ijepa.md"}}),{c(){a=c("meta"),y=r(),l=c("p"),d=r(),h(M.$$.fragment),n=r(),h(J.$$.fragment),we=r(),X=c("p"),X.innerHTML=it,Je=r(),Q=c("p"),Q.textContent=lt,Ie=r(),P=c("p"),P.textContent=dt,Te=r(),E=c("img"),$e=r(),S=c("small"),S.innerHTML=pt,je=r(),H=c("p"),H.innerHTML=mt,ve=r(),h(Y.$$.fragment),Ce=r(),q=c("p"),q.textContent=ht,Ue=r(),h(A.$$.fragment),ke=r(),h(L.$$.fragment),xe=r(),D=c("p"),D.textContent=ft,Ze=r(),h(O.$$.fragment),We=r(),K=c("ul"),K.innerHTML=ut,Fe=r(),h(ee.$$.fragment),Ee=r(),$=c("div"),h(te.$$.fragment),Pe=r(),pe=c("p"),pe.innerHTML=gt,Se=r(),me=c("p"),me.innerHTML=_t,He=r(),h(z.$$.fragment),ze=r(),h(ae.$$.fragment),Be=r(),U=c("div"),h(oe.$$.fragment),Ye=r(),he=c("p"),he.innerHTML=bt,qe=r(),v=c("div"),h(ne.$$.fragment),Ae=r(),fe=c("p"),fe.innerHTML=yt,Le=r(),h(B.$$.fragment),De=r(),h(G.$$.fragment),Ge=r(),h(se.$$.fragment),Re=r(),I=c("div"),h(re.$$.fragment),Oe=r(),ue=c("p"),ue.textContent=Mt,Ke=r(),h(R.$$.fragment),et=r(),ge=c("p"),ge.innerHTML=wt,tt=r(),C=c("div"),h(ie.$$.fragment),at=r(),_e=c("p"),_e.innerHTML=Jt,ot=r(),h(V.$$.fragment),nt=r(),h(N.$$.fragment),Ve=r(),h(le.$$.fragment),Ne=r(),ye=c("p"),this.h()},l(e){const t=Ut("svelte-u9bgzb",document.head);a=p(t,"META",{name:!0,content:!0}),t.forEach(o),y=i(e),l=p(e,"P",{}),de(l).forEach(o),d=i(e),f(M.$$.fragment,e),n=i(e),f(J.$$.fragment,e),we=i(e),X=p(e,"P",{"data-svelte-h":!0}),w(X)!=="svelte-1bycs9t"&&(X.innerHTML=it),Je=i(e),Q=p(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-vfdo9a"&&(Q.textContent=lt),Ie=i(e),P=p(e,"P",{"data-svelte-h":!0}),w(P)!=="svelte-1urhz7d"&&(P.textContent=dt),Te=i(e),E=p(e,"IMG",{src:!0,alt:!0,width:!0}),$e=i(e),S=p(e,"SMALL",{"data-svelte-h":!0}),w(S)!=="svelte-pcs53f"&&(S.innerHTML=pt),je=i(e),H=p(e,"P",{"data-svelte-h":!0}),w(H)!=="svelte-1rsx8jp"&&(H.innerHTML=mt),ve=i(e),f(Y.$$.fragment,e),Ce=i(e),q=p(e,"P",{"data-svelte-h":!0}),w(q)!=="svelte-6hgymu"&&(q.textContent=ht),Ue=i(e),f(A.$$.fragment,e),ke=i(e),f(L.$$.fragment,e),xe=i(e),D=p(e,"P",{"data-svelte-h":!0}),w(D)!=="svelte-1mr8fcj"&&(D.textContent=ft),Ze=i(e),f(O.$$.fragment,e),We=i(e),K=p(e,"UL",{"data-svelte-h":!0}),w(K)!=="svelte-1ukrali"&&(K.innerHTML=ut),Fe=i(e),f(ee.$$.fragment,e),Ee=i(e),$=p(e,"DIV",{class:!0});var k=de($);f(te.$$.fragment,k),Pe=i(k),pe=p(k,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-d8odtj"&&(pe.innerHTML=gt),Se=i(k),me=p(k,"P",{"data-svelte-h":!0}),w(me)!=="svelte-o55m63"&&(me.innerHTML=_t),He=i(k),f(z.$$.fragment,k),k.forEach(o),ze=i(e),f(ae.$$.fragment,e),Be=i(e),U=p(e,"DIV",{class:!0});var F=de(U);f(oe.$$.fragment,F),Ye=i(F),he=p(F,"P",{"data-svelte-h":!0}),w(he)!=="svelte-9hqxou"&&(he.innerHTML=bt),qe=i(F),v=p(F,"DIV",{class:!0});var x=de(v);f(ne.$$.fragment,x),Ae=i(x),fe=p(x,"P",{"data-svelte-h":!0}),w(fe)!=="svelte-1j2g6ne"&&(fe.innerHTML=yt),Le=i(x),f(B.$$.fragment,x),De=i(x),f(G.$$.fragment,x),x.forEach(o),F.forEach(o),Ge=i(e),f(se.$$.fragment,e),Re=i(e),I=p(e,"DIV",{class:!0});var j=de(I);f(re.$$.fragment,j),Oe=i(j),ue=p(j,"P",{"data-svelte-h":!0}),w(ue)!=="svelte-1htoj90"&&(ue.textContent=Mt),Ke=i(j),f(R.$$.fragment,j),et=i(j),ge=p(j,"P",{"data-svelte-h":!0}),w(ge)!=="svelte-1gjh92c"&&(ge.innerHTML=wt),tt=i(j),C=p(j,"DIV",{class:!0});var Z=de(C);f(ie.$$.fragment,Z),at=i(Z),_e=p(Z,"P",{"data-svelte-h":!0}),w(_e)!=="svelte-tqpz4e"&&(_e.innerHTML=Jt),ot=i(Z),f(V.$$.fragment,Z),nt=i(Z),f(N.$$.fragment,Z),Z.forEach(o),j.forEach(o),Ve=i(e),f(le.$$.fragment,e),Ne=i(e),ye=p(e,"P",{}),de(ye).forEach(o),this.h()},h(){W(a,"name","hf:doc:metadata"),W(a,"content",Rt),$t(E.src,ct="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ijepa_architecture.jpg")||W(E,"src",ct),W(E,"alt","drawing"),W(E,"width","600"),W($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(I,"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,t){m(document.head,a),s(e,y,t),s(e,l,t),s(e,d,t),u(M,e,t),s(e,n,t),u(J,e,t),s(e,we,t),s(e,X,t),s(e,Je,t),s(e,Q,t),s(e,Ie,t),s(e,P,t),s(e,Te,t),s(e,E,t),s(e,$e,t),s(e,S,t),s(e,je,t),s(e,H,t),s(e,ve,t),u(Y,e,t),s(e,Ce,t),s(e,q,t),s(e,Ue,t),u(A,e,t),s(e,ke,t),u(L,e,t),s(e,xe,t),s(e,D,t),s(e,Ze,t),u(O,e,t),s(e,We,t),s(e,K,t),s(e,Fe,t),u(ee,e,t),s(e,Ee,t),s(e,$,t),u(te,$,null),m($,Pe),m($,pe),m($,Se),m($,me),m($,He),u(z,$,null),s(e,ze,t),u(ae,e,t),s(e,Be,t),s(e,U,t),u(oe,U,null),m(U,Ye),m(U,he),m(U,qe),m(U,v),u(ne,v,null),m(v,Ae),m(v,fe),m(v,Le),u(B,v,null),m(v,De),u(G,v,null),s(e,Ge,t),u(se,e,t),s(e,Re,t),s(e,I,t),u(re,I,null),m(I,Oe),m(I,ue),m(I,Ke),u(R,I,null),m(I,et),m(I,ge),m(I,tt),m(I,C),u(ie,C,null),m(C,at),m(C,_e),m(C,ot),u(V,C,null),m(C,nt),u(N,C,null),s(e,Ve,t),u(le,e,t),s(e,Ne,t),s(e,ye,t),Xe=!0},p(e,[t]){const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),z.$set(k);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),B.$set(F);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),G.$set(x);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),R.$set(j);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),V.$set(Z);const It={};t&2&&(It.$$scope={dirty:t,ctx:e}),N.$set(It)},i(e){Xe||(g(M.$$.fragment,e),g(J.$$.fragment,e),g(Y.$$.fragment,e),g(A.$$.fragment,e),g(L.$$.fragment,e),g(O.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(z.$$.fragment,e),g(ae.$$.fragment,e),g(oe.$$.fragment,e),g(ne.$$.fragment,e),g(B.$$.fragment,e),g(G.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(R.$$.fragment,e),g(ie.$$.fragment,e),g(V.$$.fragment,e),g(N.$$.fragment,e),g(le.$$.fragment,e),Xe=!0)},o(e){_(M.$$.fragment,e),_(J.$$.fragment,e),_(Y.$$.fragment,e),_(A.$$.fragment,e),_(L.$$.fragment,e),_(O.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(z.$$.fragment,e),_(ae.$$.fragment,e),_(oe.$$.fragment,e),_(ne.$$.fragment,e),_(B.$$.fragment,e),_(G.$$.fragment,e),_(se.$$.fragment,e),_(re.$$.fragment,e),_(R.$$.fragment,e),_(ie.$$.fragment,e),_(V.$$.fragment,e),_(N.$$.fragment,e),_(le.$$.fragment,e),Xe=!1},d(e){e&&(o(y),o(l),o(d),o(n),o(we),o(X),o(Je),o(Q),o(Ie),o(P),o(Te),o(E),o($e),o(S),o(je),o(H),o(ve),o(Ce),o(q),o(Ue),o(ke),o(xe),o(D),o(Ze),o(We),o(K),o(Fe),o(Ee),o($),o(ze),o(Be),o(U),o(Ge),o(Re),o(I),o(Ve),o(Ne),o(ye)),o(a),b(M,e),b(J,e),b(Y,e),b(A,e),b(L,e),b(O,e),b(ee,e),b(te),b(z),b(ae,e),b(oe),b(ne),b(B),b(G),b(se,e),b(re),b(R),b(ie),b(V),b(N),b(le,e)}}}const Rt='{"title":"I-JEPA","local":"i-jepa","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"How to use","local":"how-to-use","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"IJepaConfig","local":"transformers.IJepaConfig","sections":[],"depth":2},{"title":"IJepaModel","local":"transformers.IJepaModel","sections":[],"depth":2},{"title":"IJepaForImageClassification","local":"transformers.IJepaForImageClassification","sections":[],"depth":2}],"depth":1}';function Vt(T){return jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class At extends vt{constructor(a){super(),Ct(this,a,Vt,Gt,Tt,{})}}export{At as component};
