danielward27 / flowjax

https://danielward27.github.io/flowjax/
MIT License
82 stars 10 forks source link

Add clipping for numerical stability #152

Closed danielward27 closed 4 months ago

danielward27 commented 5 months ago

In certain cases, due to numerical instability, the spline transform could map from within [-interval, interval] to outside it. Added clipping so that if x is within the interval, then y is clipped to be within the interval too (and the same for the inverse transform). Outside the interval, the identity transform is still used.