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

Function centers

k_diffusion/models/axial_rope.py:31–33  ·  view source on GitHub ↗
(start, stop, num, dtype=None, device=None)

Source from the content-addressed store, hash-verified

29
30
31def centers(start, stop, num, dtype=None, device=None):
32 edges = torch.linspace(start, stop, num + 1, dtype=dtype, device=device)
33 return (edges[:-1] + edges[1:]) / 2
34
35
36def make_grid(h_pos, w_pos):

Callers 1

make_axial_posFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected