Spaces:
Running on Zero
Running on Zero
Download tests/test_sampling_utils.py from ricklon/InfiniSplat: direct link, hf CLI and curl.
- Browser
- Download file 359 Bytes
-
https://huggingface.co/spaces/ricklon/InfiniSplat/resolve/main/tests/test_sampling_utils.py
- Command line
-
hf download hf://spaces/ricklon/InfiniSplat/tests/test_sampling_utils.py
-
curl -L -o test_sampling_utils.py https://huggingface.co/spaces/ricklon/InfiniSplat/resolve/main/tests/test_sampling_utils.py
359 Bytes
| import torch | |
| from src.model.encoder.depth.infinidepth.sampling_utils import ( | |
| compute_image_gradient_strength, | |
| ) | |
| def test_compute_image_gradient_strength_returns_finite_map() -> None: | |
| image = torch.rand(3, 8, 12) | |
| strength = compute_image_gradient_strength(image) | |
| assert strength.shape == (8, 12) | |
| assert torch.isfinite(strength).all() | |