MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / shifted_window

Function shifted_window

k_diffusion/models/modules.py:287–290  ·  view source on GitHub ↗
(window_size, window_shift, x)

Source from the content-addressed store, hash-verified

285
286
287def shifted_window(window_size, window_shift, x):
288 x = torch.roll(x, shifts=(window_shift, window_shift), dims=(-2, -3))
289 windows = window(window_size, x)
290 return windows
291
292
293def shifted_unwindow(window_shift, x):

Callers 1

apply_window_attentionFunction · 0.85

Calls 1

windowFunction · 0.85

Tested by

no test coverage detected