MCPcopy Index your code
hub / github.com/MoonInTheRiver/DiffSinger / gaussian

Function gaussian

modules/commons/ssim.py:319–321  ·  view source on GitHub ↗
(window_size, sigma)

Source from the content-addressed store, hash-verified

317
318
319def gaussian(window_size, sigma):
320 gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)])
321 return gauss / gauss.sum()
322
323
324def create_window(window_size, channel):

Callers 1

create_windowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected