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

Function downscale_pos

k_diffusion/models/modules.py:56–58  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

54
55
56def downscale_pos(pos):
57 pos = rearrange(pos, "... (h nh) (w nw) e -> ... h w (nh nw) e", nh=2, nw=2)
58 return torch.mean(pos, dim=-2)
59
60
61# Param tags

Callers 1

forwardMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected