Skip to content

Commit

Permalink
Merge branch 'dev-vs' of github.com:VincentStimper/normalizing-flows …
Browse files Browse the repository at this point in the history
…into dev-vs
  • Loading branch information
VincentStimper committed Jan 23, 2023
2 parents 70cfa36 + b3a9a45 commit 75609e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion normflows/distributions/prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ class TwoModes(PriorDistribution):
def __init__(self, loc, scale):
"""Distribution 2d with two modes
Distribution 2d with two modes at:
Distribution 2d with two modes at
```z[0] = -loc``` and ```z[0] = loc```
following the density
```
log(p) = 1/2 * ((norm(z) - loc) / (2 * scale)) ** 2
- log(exp(-1/2 * ((z[0] - loc) / (3 * scale)) ** 2) + exp(-1/2 * ((z[0] + loc) / (3 * scale)) ** 2))
```
Args:
loc: distance of modes from the origin
Expand Down

0 comments on commit 75609e1

Please sign in to comment.