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

Function unwindow

k_diffusion/models/modules.py:280–284  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

278
279
280def unwindow(x):
281 *b, h, w, wh, ww, c = x.shape
282 x = torch.permute(x, (*range(len(b)), -5, -3, -4, -2, -1))
283 x = torch.reshape(x, (*b, h * wh, w * ww, c))
284 return x
285
286
287def shifted_window(window_size, window_shift, x):

Callers 1

shifted_unwindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected