MCPcopy Create free account
hub / github.com/cvg/NoPoSplat / resample_kernel

Function resample_kernel

src/misc/weight_modify.py:75–77  ·  view source on GitHub ↗
(kernel)

Source from the content-addressed store, hash-verified

73 resize_mat_pinv = torch.tensor(np.linalg.pinv(resize_mat.T), device=patch_embed.device)
74
75 def resample_kernel(kernel):
76 resampled_kernel = resize_mat_pinv @ kernel.reshape(-1)
77 return resampled_kernel.reshape(new_size)
78
79 v_resample_kernel = vmap(vmap(resample_kernel, 0, 0), 1, 1)
80 orig_dtype = patch_embed.dtype

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected