import{s as $t,f as Tt,o as jt,n as be}from"../chunks/scheduler.25b97de1.js";import{S as vt,i as Ct,g as d,s as r,r as h,A as Ut,h as p,f as o,c as l,j as ce,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 Pe}from"../chunks/CodeBlock.e6cd0d95.js";import{E as rt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Zt}from"../chunks/PipelineTag.5f100392.js";import{H as de,E as kt}from"../chunks/EditOnGithub.91d95064.js";function xt($){let a,y="Example:",i,c,M;return c=new Pe({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=d("p"),a.textContent=y,i=r(),h(c.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),i=l(n),f(c.$$.fragment,n)},m(n,J){s(n,a,J),s(n,i,J),u(c,n,J),M=!0},p:be,i(n){M||(g(c.$$.fragment,n),M=!0)},o(n){_(c.$$.fragment,n),M=!1},d(n){n&&(o(a),o(i)),b(c,n)}}}function Wt($){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=d("p"),a.innerHTML=y},l(i){a=p(i,"P",{"data-svelte-h":!0}),w(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(i,c){s(i,a,c)},p:be,d(i){i&&o(a)}}}function Ft($){let a,y="Example:",i,c,M;return c=new Pe({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">197</span>, <span class="hljs-number">768</span>]`,wrap:!1}}),{c(){a=d("p"),a.textContent=y,i=r(),h(c.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),i=l(n),f(c.$$.fragment,n)},m(n,J){s(n,a,J),s(n,i,J),u(c,n,J),M=!0},p:be,i(n){M||(g(c.$$.fragment,n),M=!0)},o(n){_(c.$$.fragment,n),M=!1},d(n){n&&(o(a),o(i)),b(c,n)}}}function Et($){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=d("p"),a.innerHTML=y},l(i){a=p(i,"P",{"data-svelte-h":!0}),w(a)!=="svelte-lhh59f"&&(a.innerHTML=y)},m(i,c){s(i,a,c)},p:be,d(i){i&&o(a)}}}function zt($){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=d("p"),a.innerHTML=y},l(i){a=p(i,"P",{"data-svelte-h":!0}),w(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(i,c){s(i,a,c)},p:be,d(i){i&&o(a)}}}function Rt($){let a,y="Example:",i,c,M;return c=new Pe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMElKZXBhRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGaWplcGEtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMElKZXBhRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGaWplcGEtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",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;google/ijepa-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = IJepaForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/ijepa-base-patch16-224&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=d("p"),a.textContent=y,i=r(),h(c.$$.fragment)},l(n){a=p(n,"P",{"data-svelte-h":!0}),w(a)!=="svelte-11lpom8"&&(a.textContent=y),i=l(n),f(c.$$.fragment,n)},m(n,J){s(n,a,J),s(n,i,J),u(c,n,J),M=!0},p:be,i(n){M||(g(c.$$.fragment,n),M=!0)},o(n){_(c.$$.fragment,n),M=!1},d(n){n&&(o(a),o(i)),b(c,n)}}}function Gt($){let a,y,i,c,M,n,J,we,V,lt=`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,P,it="The abstract from the paper is the following:",Ie,Q,ct="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.",$e,E,dt,Te,S,pt='I-JEPA architecture. Taken from the <a href="https://arxiv.org/abs/2301.08243">original paper.</a>',je,Y,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,q,Ce,H,ht="Here is how to use this model for image feature extraction:",Ue,A,Ze,L,ke,D,ft="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with I-JEPA.",xe,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,T,te,Qe,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/google/ijepa-base-patch16-224" rel="nofollow">google/ijepa-base-patch16-224</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.`,Ye,z,ze,ae,Re,U,oe,qe,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.`,He,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,R,De,G,Ge,se,Be,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,B,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,le,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,N,nt,X,Ne,ie,Xe,ye,Ve;return M=new de({props:{title:"I-JEPA",local:"i-jepa",headingTag:"h1"}}),J=new de({props:{title:"Overview",local:"overview",headingTag:"h2"}}),q=new de({props:{title:"How to use",local:"how-to-use",headingTag:"h2"}}),A=new Pe({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 de({props:{title:"Resources",local:"resources",headingTag:"h2"}}),O=new Zt({props:{pipeline:"image-classification"}}),ee=new de({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:[xt]},$$scope:{ctx:$}}}),ae=new de({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#L545"}}),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#L573",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>
`}}),R=new st({props:{$$slots:{default:[Wt]},$$scope:{ctx:$}}}),G=new rt({props:{anchor:"transformers.IJepaModel.forward.example",$$slots:{default:[Ft]},$$scope:{ctx:$}}}),se=new de({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#L648"}}),B=new st({props:{$$slots:{default:[Et]},$$scope:{ctx:$}}}),le=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#L676",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>
`}}),N=new st({props:{$$slots:{default:[zt]},$$scope:{ctx:$}}}),X=new rt({props:{anchor:"transformers.IJepaForImageClassification.forward.example",$$slots:{default:[Rt]},$$scope:{ctx:$}}}),ie=new kt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/ijepa.md"}}),{c(){a=d("meta"),y=r(),i=d("p"),c=r(),h(M.$$.fragment),n=r(),h(J.$$.fragment),we=r(),V=d("p"),V.innerHTML=lt,Je=r(),P=d("p"),P.textContent=it,Ie=r(),Q=d("p"),Q.textContent=ct,$e=r(),E=d("img"),Te=r(),S=d("small"),S.innerHTML=pt,je=r(),Y=d("p"),Y.innerHTML=mt,ve=r(),h(q.$$.fragment),Ce=r(),H=d("p"),H.textContent=ht,Ue=r(),h(A.$$.fragment),Ze=r(),h(L.$$.fragment),ke=r(),D=d("p"),D.textContent=ft,xe=r(),h(O.$$.fragment),We=r(),K=d("ul"),K.innerHTML=ut,Fe=r(),h(ee.$$.fragment),Ee=r(),T=d("div"),h(te.$$.fragment),Qe=r(),pe=d("p"),pe.innerHTML=gt,Se=r(),me=d("p"),me.innerHTML=_t,Ye=r(),h(z.$$.fragment),ze=r(),h(ae.$$.fragment),Re=r(),U=d("div"),h(oe.$$.fragment),qe=r(),he=d("p"),he.innerHTML=bt,He=r(),v=d("div"),h(ne.$$.fragment),Ae=r(),fe=d("p"),fe.innerHTML=yt,Le=r(),h(R.$$.fragment),De=r(),h(G.$$.fragment),Ge=r(),h(se.$$.fragment),Be=r(),I=d("div"),h(re.$$.fragment),Oe=r(),ue=d("p"),ue.textContent=Mt,Ke=r(),h(B.$$.fragment),et=r(),ge=d("p"),ge.innerHTML=wt,tt=r(),C=d("div"),h(le.$$.fragment),at=r(),_e=d("p"),_e.innerHTML=Jt,ot=r(),h(N.$$.fragment),nt=r(),h(X.$$.fragment),Ne=r(),h(ie.$$.fragment),Xe=r(),ye=d("p"),this.h()},l(e){const t=Ut("svelte-u9bgzb",document.head);a=p(t,"META",{name:!0,content:!0}),t.forEach(o),y=l(e),i=p(e,"P",{}),ce(i).forEach(o),c=l(e),f(M.$$.fragment,e),n=l(e),f(J.$$.fragment,e),we=l(e),V=p(e,"P",{"data-svelte-h":!0}),w(V)!=="svelte-1bycs9t"&&(V.innerHTML=lt),Je=l(e),P=p(e,"P",{"data-svelte-h":!0}),w(P)!=="svelte-vfdo9a"&&(P.textContent=it),Ie=l(e),Q=p(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-1urhz7d"&&(Q.textContent=ct),$e=l(e),E=p(e,"IMG",{src:!0,alt:!0,width:!0}),Te=l(e),S=p(e,"SMALL",{"data-svelte-h":!0}),w(S)!=="svelte-pcs53f"&&(S.innerHTML=pt),je=l(e),Y=p(e,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-1rsx8jp"&&(Y.innerHTML=mt),ve=l(e),f(q.$$.fragment,e),Ce=l(e),H=p(e,"P",{"data-svelte-h":!0}),w(H)!=="svelte-6hgymu"&&(H.textContent=ht),Ue=l(e),f(A.$$.fragment,e),Ze=l(e),f(L.$$.fragment,e),ke=l(e),D=p(e,"P",{"data-svelte-h":!0}),w(D)!=="svelte-1mr8fcj"&&(D.textContent=ft),xe=l(e),f(O.$$.fragment,e),We=l(e),K=p(e,"UL",{"data-svelte-h":!0}),w(K)!=="svelte-1ukrali"&&(K.innerHTML=ut),Fe=l(e),f(ee.$$.fragment,e),Ee=l(e),T=p(e,"DIV",{class:!0});var Z=ce(T);f(te.$$.fragment,Z),Qe=l(Z),pe=p(Z,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-1uwv6bn"&&(pe.innerHTML=gt),Se=l(Z),me=p(Z,"P",{"data-svelte-h":!0}),w(me)!=="svelte-o55m63"&&(me.innerHTML=_t),Ye=l(Z),f(z.$$.fragment,Z),Z.forEach(o),ze=l(e),f(ae.$$.fragment,e),Re=l(e),U=p(e,"DIV",{class:!0});var F=ce(U);f(oe.$$.fragment,F),qe=l(F),he=p(F,"P",{"data-svelte-h":!0}),w(he)!=="svelte-9hqxou"&&(he.innerHTML=bt),He=l(F),v=p(F,"DIV",{class:!0});var k=ce(v);f(ne.$$.fragment,k),Ae=l(k),fe=p(k,"P",{"data-svelte-h":!0}),w(fe)!=="svelte-1j2g6ne"&&(fe.innerHTML=yt),Le=l(k),f(R.$$.fragment,k),De=l(k),f(G.$$.fragment,k),k.forEach(o),F.forEach(o),Ge=l(e),f(se.$$.fragment,e),Be=l(e),I=p(e,"DIV",{class:!0});var j=ce(I);f(re.$$.fragment,j),Oe=l(j),ue=p(j,"P",{"data-svelte-h":!0}),w(ue)!=="svelte-1htoj90"&&(ue.textContent=Mt),Ke=l(j),f(B.$$.fragment,j),et=l(j),ge=p(j,"P",{"data-svelte-h":!0}),w(ge)!=="svelte-1gjh92c"&&(ge.innerHTML=wt),tt=l(j),C=p(j,"DIV",{class:!0});var x=ce(C);f(le.$$.fragment,x),at=l(x),_e=p(x,"P",{"data-svelte-h":!0}),w(_e)!=="svelte-tqpz4e"&&(_e.innerHTML=Jt),ot=l(x),f(N.$$.fragment,x),nt=l(x),f(X.$$.fragment,x),x.forEach(o),j.forEach(o),Ne=l(e),f(ie.$$.fragment,e),Xe=l(e),ye=p(e,"P",{}),ce(ye).forEach(o),this.h()},h(){W(a,"name","hf:doc:metadata"),W(a,"content",Bt),Tt(E.src,dt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ijepa_architecture.jpg")||W(E,"src",dt),W(E,"alt","drawing"),W(E,"width","600"),W(T,"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,i,t),s(e,c,t),u(M,e,t),s(e,n,t),u(J,e,t),s(e,we,t),s(e,V,t),s(e,Je,t),s(e,P,t),s(e,Ie,t),s(e,Q,t),s(e,$e,t),s(e,E,t),s(e,Te,t),s(e,S,t),s(e,je,t),s(e,Y,t),s(e,ve,t),u(q,e,t),s(e,Ce,t),s(e,H,t),s(e,Ue,t),u(A,e,t),s(e,Ze,t),u(L,e,t),s(e,ke,t),s(e,D,t),s(e,xe,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,t),u(te,T,null),m(T,Qe),m(T,pe),m(T,Se),m(T,me),m(T,Ye),u(z,T,null),s(e,ze,t),u(ae,e,t),s(e,Re,t),s(e,U,t),u(oe,U,null),m(U,qe),m(U,he),m(U,He),m(U,v),u(ne,v,null),m(v,Ae),m(v,fe),m(v,Le),u(R,v,null),m(v,De),u(G,v,null),s(e,Ge,t),u(se,e,t),s(e,Be,t),s(e,I,t),u(re,I,null),m(I,Oe),m(I,ue),m(I,Ke),u(B,I,null),m(I,et),m(I,ge),m(I,tt),m(I,C),u(le,C,null),m(C,at),m(C,_e),m(C,ot),u(N,C,null),m(C,nt),u(X,C,null),s(e,Ne,t),u(ie,e,t),s(e,Xe,t),s(e,ye,t),Ve=!0},p(e,[t]){const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),z.$set(Z);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),R.$set(F);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),G.$set(k);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),B.$set(j);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),N.$set(x);const It={};t&2&&(It.$$scope={dirty:t,ctx:e}),X.$set(It)},i(e){Ve||(g(M.$$.fragment,e),g(J.$$.fragment,e),g(q.$$.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(R.$$.fragment,e),g(G.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(B.$$.fragment,e),g(le.$$.fragment,e),g(N.$$.fragment,e),g(X.$$.fragment,e),g(ie.$$.fragment,e),Ve=!0)},o(e){_(M.$$.fragment,e),_(J.$$.fragment,e),_(q.$$.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),_(R.$$.fragment,e),_(G.$$.fragment,e),_(se.$$.fragment,e),_(re.$$.fragment,e),_(B.$$.fragment,e),_(le.$$.fragment,e),_(N.$$.fragment,e),_(X.$$.fragment,e),_(ie.$$.fragment,e),Ve=!1},d(e){e&&(o(y),o(i),o(c),o(n),o(we),o(V),o(Je),o(P),o(Ie),o(Q),o($e),o(E),o(Te),o(S),o(je),o(Y),o(ve),o(Ce),o(H),o(Ue),o(Ze),o(ke),o(D),o(xe),o(We),o(K),o(Fe),o(Ee),o(T),o(ze),o(Re),o(U),o(Ge),o(Be),o(I),o(Ne),o(Xe),o(ye)),o(a),b(M,e),b(J,e),b(q,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(R),b(G),b(se,e),b(re),b(B),b(le),b(N),b(X),b(ie,e)}}}const Bt='{"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 Nt($){return jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class At extends vt{constructor(a){super(),Ct(this,a,Nt,Gt,$t,{})}}export{At as component};
