Spaces:
Running on Zero
Running on Zero
Download src/model/encoder/backbone/backbone.py from timfromhcs/AnySplat: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/spaces/timfromhcs/AnySplat/resolve/main/src/model/encoder/backbone/backbone.py
- Command line
-
hf download hf://spaces/timfromhcs/AnySplat/src/model/encoder/backbone/backbone.py
-
curl -L -o backbone.py https://huggingface.co/spaces/timfromhcs/AnySplat/resolve/main/src/model/encoder/backbone/backbone.py
569 Bytes
| from abc import ABC, abstractmethod | |
| from typing import Generic, TypeVar | |
| from jaxtyping import Float | |
| from torch import Tensor, nn | |
| from src.dataset.types import BatchedViews | |
| T = TypeVar("T") | |
| class Backbone(nn.Module, ABC, Generic[T]): | |
| cfg: T | |
| def __init__(self, cfg: T) -> None: | |
| super().__init__() | |
| self.cfg = cfg | |
| def forward( | |
| self, | |
| context: BatchedViews, | |
| ) -> Float[Tensor, "batch view d_out height width"]: | |
| pass | |
| def d_out(self) -> int: | |
| pass | |