MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / cdf_fn

Method cdf_fn

model/mixture_model_utils.py:50–57  ·  view source on GitHub ↗

Cumulative distribution function of the Gaussian distribution.

(self, x, means, log_scales)

Source from the content-addressed store, hash-verified

48 return means.squeeze(-1), log_scales.squeeze(-1), 1.0
49
50 def cdf_fn(self, x, means, log_scales):
51 """
52 Cumulative distribution function of the Gaussian distribution.
53 """
54 inv_std = torch.exp(-log_scales)
55 return 0.5 * (
56 1 + torch.erf((x - means) * inv_std / math.sqrt(2))
57 )
58
59 def log_pdf_fn(self, x, means, log_scales):
60 """

Callers 1

sampleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected