Equimo 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/PKG-INFO +1 -1
- {equimo-0.2.1 → equimo-0.2.2}/PKG-INFO +1 -1
- {equimo-0.2.1 → equimo-0.2.2}/equimo/io.py +1 -0
- {equimo-0.2.1 → equimo-0.2.2}/pyproject.toml +1 -1
- {equimo-0.2.1 → equimo-0.2.2}/tests/test_models.py +13 -0
- {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/SOURCES.txt +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/dependency_links.txt +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/requires.txt +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/top_level.txt +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/LICENSE.md +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/README.md +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/__init__.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/__init__.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/dinov2.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/utils.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/__init__.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/attention.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/convolution.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/downsample.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/dropout.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/ffn.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/generic.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/mamba.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/norm.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/patch.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/posemb.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/sharing.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/squeeze_excite.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/__init__.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/emamodel.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/fastervit.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/mlla.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/partialformer.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/shvit.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/vit.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/models/vssd.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/ops/scan.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/equimo/utils.py +0 -0
- {equimo-0.2.1 → equimo-0.2.2}/setup.cfg +0 -0
|
@@ -102,6 +102,7 @@ def download(identifier: str, repository: str) -> Path:
|
|
|
102
102
|
|
|
103
103
|
url = f"{repository}/{identifier}.tar.lz4"
|
|
104
104
|
path = Path(f"~/.cache/equimo/{identifier}.tar.lz4").expanduser()
|
|
105
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
105
106
|
|
|
106
107
|
if path.exists():
|
|
107
108
|
logger.info("Archive already downloaded, using cached file.")
|
|
@@ -120,3 +120,16 @@ def test_save_load_model_uncompressed():
|
|
|
120
120
|
loaded_output = loaded_model.features(x, key=key)
|
|
121
121
|
|
|
122
122
|
assert jnp.allclose(original_output, loaded_output, atol=1e-5)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def test_load_pretrained_model():
|
|
126
|
+
"""Test loading a pretrained model from the repository."""
|
|
127
|
+
key = jr.PRNGKey(42)
|
|
128
|
+
model = load_model(cls="vit", identifier="dinov2_vits14_reg")
|
|
129
|
+
|
|
130
|
+
# Test inference
|
|
131
|
+
x = jr.normal(key, (3, 224, 224))
|
|
132
|
+
features = model.features(x, key=key)
|
|
133
|
+
|
|
134
|
+
assert features.shape[-1] == 384 # DINOv2-S has embedding dimension of 384
|
|
135
|
+
assert jnp.all(jnp.isfinite(features)) # Check for NaN/Inf values
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|