Skip to content

Commit 75609e1

Browse files
Merge branch 'dev-vs' of github.com:VincentStimper/normalizing-flows into dev-vs
2 parents 70cfa36 + b3a9a45 commit 75609e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

normflows/distributions/prior.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ class TwoModes(PriorDistribution):
108108
def __init__(self, loc, scale):
109109
"""Distribution 2d with two modes
110110
111-
Distribution 2d with two modes at:
111+
Distribution 2d with two modes at
112112
```z[0] = -loc``` and ```z[0] = loc```
113+
following the density
114+
```
115+
log(p) = 1/2 * ((norm(z) - loc) / (2 * scale)) ** 2
116+
- log(exp(-1/2 * ((z[0] - loc) / (3 * scale)) ** 2) + exp(-1/2 * ((z[0] + loc) / (3 * scale)) ** 2))
117+
```
113118
114119
Args:
115120
loc: distance of modes from the origin

0 commit comments

Comments
 (0)