MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / gaussian

Function gaussian

utils/loss_utils.py:45–47  ·  view source on GitHub ↗
(window_size, sigma)

Source from the content-addressed store, hash-verified

43 return ((network_output - gt) ** 2).mean()
44
45def gaussian(window_size, sigma):
46 gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)])
47 return gauss / gauss.sum()
48
49def create_window(window_size, channel):
50 _1D_window = gaussian(window_size, 1.5).unsqueeze(1)

Callers 1

create_windowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected