MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / __init__

Method __init__

encoders/dinov2_wrapper.py:28–35  ·  view source on GitHub ↗
(self, model_name: str, modulation_dim: int = None, freeze: bool = True)

Source from the content-addressed store, hash-verified

26 Dino v2 wrapper using original implementation, hacked with modulation.
27 """
28 def __init__(self, model_name: str, modulation_dim: int = None, freeze: bool = True):
29 super().__init__()
30 self.modulation_dim = modulation_dim
31 self.model = self._build_dinov2(model_name, modulation_dim=modulation_dim)
32 if freeze:
33 if modulation_dim is not None:
34 raise ValueError("Modulated Dinov2 requires training, freezing is not allowed.")
35 self._freeze()
36
37 def _freeze(self):
38 # logger.warning(f"======== Freezing Dinov2Wrapper ========")

Callers

nothing calls this directly

Calls 2

_build_dinov2Method · 0.95
_freezeMethod · 0.95

Tested by

no test coverage detected