Spaces:
Running on Zero
Running on Zero
Download src/model/decoder/decoder.py from akhaliq/InfiniSplat: direct link, hf CLI and curl.
- Browser
- Download file 656 Bytes
-
https://huggingface.co/spaces/akhaliq/InfiniSplat/resolve/refs%2Fpr%2F1/src/model/decoder/decoder.py
- Command line
-
hf download hf://spaces/akhaliq/InfiniSplat@refs/pr/1/src/model/decoder/decoder.py
-
curl -L -o decoder.py https://huggingface.co/spaces/akhaliq/InfiniSplat/resolve/refs%2Fpr%2F1/src/model/decoder/decoder.py
656 Bytes
| from abc import ABC, abstractmethod | |
| from typing import Generic, TypeVar | |
| from jaxtyping import Float | |
| from torch import Tensor, nn | |
| from src.utils.gaussians import Gaussians3D | |
| T = TypeVar("T") | |
| class Decoder(nn.Module, ABC, Generic[T]): | |
| cfg: T | |
| def __init__(self, cfg: T) -> None: | |
| super().__init__() | |
| self.cfg = cfg | |
| def forward( | |
| self, | |
| gaussians: Gaussians3D, | |
| extrinsics: Float[Tensor, "batch view 4 4"], | |
| intrinsics: Float[Tensor, "batch view 3 3"], | |
| image_shape: tuple[int, int], | |
| ) -> Float[Tensor, "batch view 3 height width"]: | |
| raise NotImplementedError | |