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.
Files changed (39) hide show
  1. {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/PKG-INFO +1 -1
  2. {equimo-0.2.1 → equimo-0.2.2}/PKG-INFO +1 -1
  3. {equimo-0.2.1 → equimo-0.2.2}/equimo/io.py +1 -0
  4. {equimo-0.2.1 → equimo-0.2.2}/pyproject.toml +1 -1
  5. {equimo-0.2.1 → equimo-0.2.2}/tests/test_models.py +13 -0
  6. {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/SOURCES.txt +0 -0
  7. {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/dependency_links.txt +0 -0
  8. {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/requires.txt +0 -0
  9. {equimo-0.2.1 → equimo-0.2.2}/Equimo.egg-info/top_level.txt +0 -0
  10. {equimo-0.2.1 → equimo-0.2.2}/LICENSE.md +0 -0
  11. {equimo-0.2.1 → equimo-0.2.2}/README.md +0 -0
  12. {equimo-0.2.1 → equimo-0.2.2}/equimo/__init__.py +0 -0
  13. {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/__init__.py +0 -0
  14. {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/dinov2.py +0 -0
  15. {equimo-0.2.1 → equimo-0.2.2}/equimo/converters/utils.py +0 -0
  16. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/__init__.py +0 -0
  17. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/attention.py +0 -0
  18. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/convolution.py +0 -0
  19. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/downsample.py +0 -0
  20. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/dropout.py +0 -0
  21. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/ffn.py +0 -0
  22. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/generic.py +0 -0
  23. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/mamba.py +0 -0
  24. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/norm.py +0 -0
  25. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/patch.py +0 -0
  26. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/posemb.py +0 -0
  27. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/sharing.py +0 -0
  28. {equimo-0.2.1 → equimo-0.2.2}/equimo/layers/squeeze_excite.py +0 -0
  29. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/__init__.py +0 -0
  30. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/emamodel.py +0 -0
  31. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/fastervit.py +0 -0
  32. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/mlla.py +0 -0
  33. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/partialformer.py +0 -0
  34. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/shvit.py +0 -0
  35. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/vit.py +0 -0
  36. {equimo-0.2.1 → equimo-0.2.2}/equimo/models/vssd.py +0 -0
  37. {equimo-0.2.1 → equimo-0.2.2}/equimo/ops/scan.py +0 -0
  38. {equimo-0.2.1 → equimo-0.2.2}/equimo/utils.py +0 -0
  39. {equimo-0.2.1 → equimo-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: Equimo
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Implementation of popular vision models in Jax
5
5
  Classifier: Development Status :: 4 - Beta
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: Equimo
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Implementation of popular vision models in Jax
5
5
  Classifier: Development Status :: 4 - Beta
6
6
  Classifier: Intended Audience :: Developers
@@ -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.")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Equimo"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "Implementation of popular vision models in Jax"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -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