Spaces:
Running on Zero
Running on Zero
Download src/model/encoder/encoder.py from akhaliq/InfiniSplat: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/spaces/akhaliq/InfiniSplat/resolve/refs%2Fpr%2F1/src/model/encoder/encoder.py
- Command line
-
hf download hf://spaces/akhaliq/InfiniSplat@refs/pr/1/src/model/encoder/encoder.py
-
curl -L -o encoder.py https://huggingface.co/spaces/akhaliq/InfiniSplat/resolve/refs%2Fpr%2F1/src/model/encoder/encoder.py
554 Bytes
| from abc import ABC, abstractmethod | |
| from typing import Any, Generic, TypeVar | |
| from torch import nn | |
| from src.model.types import BatchedViews | |
| EncoderOutput = dict[str, Any] | |
| T = TypeVar("T") | |
| class Encoder(nn.Module, ABC, Generic[T]): | |
| cfg: T | |
| def __init__(self, cfg: T) -> None: | |
| super().__init__() | |
| self.cfg = cfg | |
| def forward( | |
| self, | |
| context: BatchedViews, | |
| ) -> EncoderOutput: | |
| """Encode context views into the Gaussian scene representation.""" | |
| raise NotImplementedError | |