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

Method log_pdf_fn

model/mixture_model_utils.py:59–69  ·  view source on GitHub ↗

Log probability density function of the Gaussian distribution.

(self, x, means, log_scales)

Source from the content-addressed store, hash-verified

57 )
58
59 def log_pdf_fn(self, x, means, log_scales):
60 """
61 Log probability density function of the Gaussian distribution.
62 """
63 scales = torch.exp(log_scales)
64 var = scales**2
65 return (
66 -((x - means) ** 2) / (2 * var)
67 - log_scales
68 - math.log(math.sqrt(2 * math.pi))
69 )
70
71 def icdf_fn(self, p, means, log_scales):
72 """

Callers 1

sampleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected