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

Method __init__

model/splat_model.py:26–41  ·  view source on GitHub ↗
(self, opt: Options, **model_kwargs)

Source from the content-addressed store, hash-verified

24
25class SplatModel(StaticEncoder):
26 def __init__(self, opt: Options, **model_kwargs):
27 super().__init__(opt)
28 self.opt = opt
29 self.model = SplatPredictor(opt, **model_kwargs)
30 if hasattr(opt, 'compile') and opt.compile:
31 self.model = torch.compile(self.model)
32 self.gaussian_renderer = gaussian_renderer_dynamic.render
33 self.background = torch.tensor(opt.background_color, dtype=torch.float32, device="cuda")
34
35 # LPIPS loss
36 if self.opt.lambda_lpips > 0:
37 self.lpips_loss = LPIPS(net='vgg')
38 self.lpips_loss.requires_grad_(False)
39 self.lpips_loss.eval()
40 if hasattr(opt, 'compile') and opt.compile:
41 self.lpips_loss = torch.compile(self.lpips_loss)
42
43 def train(self, mode=True):
44 super().train(mode)

Callers

nothing calls this directly

Calls 1

SplatPredictorClass · 0.90

Tested by

no test coverage detected