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

Method __init__

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

Source from the content-addressed store, hash-verified

27
28class StaticEncoder(nn.Module):
29 def __init__(self, opt: Options, **model_kwargs):
30 super(StaticEncoder, self).__init__()
31 self.opt = opt
32 self.model = GSPredictor(opt, **model_kwargs)
33 if hasattr(opt, 'compile') and opt.compile:
34 self.model = torch.compile(self.model)
35 self.gaussian_renderer = gaussian_renderer_dynamic.render
36 self.background = torch.tensor(opt.background_color, dtype=torch.float32, device="cuda")
37
38 # LPIPS loss
39 self.lpips_loss = LPIPS(net='vgg')
40 self.lpips_loss.eval()
41 self.lpips_loss.requires_grad_(False)
42
43 def state_dict(self, **kwargs):
44 # remove lpips_loss

Callers

nothing calls this directly

Calls 1

GSPredictorClass · 0.90

Tested by

no test coverage detected