MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / gaussian_kernel

Function gaussian_kernel

utils.py:137–141  ·  view source on GitHub ↗
(kernel_size: int, sigma: float)

Source from the content-addressed store, hash-verified

135
136
137def gaussian_kernel(kernel_size: int, sigma: float):
138 x = torch.linspace(-(kernel_size - 1) / 2, (kernel_size - 1) / 2,
139 kernel_size)
140 gauss = torch.exp(-x**2 / (2 * sigma**2))
141 return gauss / gauss.sum()
142
143
144def smooth_motion_rep(motion_rep, kernel_size: int, sigma: float):

Callers 1

smooth_motion_repFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected