MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / pdf_to_weight

Function pdf_to_weight

utils/stepfun.py:70–72  ·  view source on GitHub ↗

Turn a PDF that integrates to 1 into a vector of weights that sums to 1.

(t, p)

Source from the content-addressed store, hash-verified

68
69
70def pdf_to_weight(t, p):
71 """Turn a PDF that integrates to 1 into a vector of weights that sums to 1."""
72 return p * (t[..., 1:] - t[..., :-1])
73
74
75def max_dilate(t, w, dilation, domain=(-torch.inf, torch.inf)):

Callers 1

max_dilate_weightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected