bayinx 0.2.25__py3-none-any.whl → 0.2.26__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,22 @@ class FullAffine(Flow):
33
33
  "scale": jnp.zeros((dim, dim)),
34
34
  }
35
35
 
36
- self.constraints = {"scale": lambda m: jnp.tril(jnp.exp(m))}
36
+ self.constraints = {"scale": lambda m: jnp.tril(m)}
37
+
38
+ def transform_pars(self):
39
+ # Get constrained parameters
40
+ params = self.constrain_pars()
41
+
42
+ # Extract diagonal and apply exponential
43
+ diag: Array = jnp.exp(jnp.diag(params['scale']))
44
+
45
+ # Fill diagonal
46
+ params['scale'] = jnp.fill_diagonal(params['scale'], diag)
47
+
48
+
49
+ return params
50
+
51
+
37
52
 
38
53
  @eqx.filter_jit
39
54
  def forward(self, draws: Array) -> Array:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bayinx
3
- Version: 0.2.25
3
+ Version: 0.2.26
4
4
  Summary: Bayesian Inference with JAX
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: equinox>=0.11.12
@@ -19,10 +19,10 @@ bayinx/mhx/vi/meanfield.py,sha256=LNLwfjKO9os7YBmRBpGEiFxlxonuN7DHVFEmXV3hvfI,38
19
19
  bayinx/mhx/vi/normalizing_flow.py,sha256=nj7bpIoMJl6GTOXPxQCAsPArchbHd5vwwqMm3cLbMII,4791
20
20
  bayinx/mhx/vi/standard.py,sha256=HaJsIz70Qo1Ql2hMQ-GQhcnfWiOGtyxgkOsm_yQaDKI,1718
21
21
  bayinx/mhx/vi/flows/__init__.py,sha256=Hn0Wqvvyv8Vr-mFmimwgNKCByxj-fjrlIvdR7tUSolg,180
22
- bayinx/mhx/vi/flows/fullaffine.py,sha256=2QbOtA1Jmu-yRcJeFmCKc8N1atm8G7JXYMLEZaEXKV0,1711
22
+ bayinx/mhx/vi/flows/fullaffine.py,sha256=TUcjXuDeFLHL9SYOLEU6kQSkEiyijztfBY2AAis7Pn0,2034
23
23
  bayinx/mhx/vi/flows/planar.py,sha256=u9ZVwEeOv4fMfwiORlseCz463atsWMuid_9crRg05Z8,1919
24
24
  bayinx/mhx/vi/flows/radial.py,sha256=c-SWybGn_jmgBQk9ZMQ5uHKPzcdhowNp8MD8t1-8VZM,2501
25
25
  bayinx/mhx/vi/flows/sylvester.py,sha256=ppK0BmS_ThvrCEhJiP_-p-kj67TQHSlU_RUZpDbIhsQ,469
26
- bayinx-0.2.25.dist-info/METADATA,sha256=9TI5NY4M1EBtYwA8E-EDds-QkOECwrfVaaEWq3pTdu4,3058
27
- bayinx-0.2.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- bayinx-0.2.25.dist-info/RECORD,,
26
+ bayinx-0.2.26.dist-info/METADATA,sha256=EReEQKQXgy71MtuqSgFRkn0YhVOUKT1hFECt12YEXxE,3058
27
+ bayinx-0.2.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ bayinx-0.2.26.dist-info/RECORD,,