You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a single line of code and got a 66% speed-up. Most of our distributions have various bound checks. pm.Normal.logp for example checks that sigma > 0for every logp eval.
These checks are useful when building a new model, for example, if I put a pm.Normal on my sigma and it proposes negative values I want the logp to become -inf.
However, once I have built the model and know that all my parameters can only take on valid ranges I don't need these checks anymore.
So just by making bound() return logp directly (i.e turning it into a noop) I got a nice 66% speed-up on the stochastic vol model.
My question is how do we best allow the user to configure this.
One idea is with pm.Model(disable_bounds_check=True).
The text was updated successfully, but these errors were encountered:
I added a single line of code and got a 66% speed-up. Most of our distributions have various bound checks.
pm.Normal.logp
for example checks thatsigma > 0
for every logp eval.These checks are useful when building a new model, for example, if I put a
pm.Normal
on my sigma and it proposes negative values I want the logp to become-inf
.However, once I have built the model and know that all my parameters can only take on valid ranges I don't need these checks anymore.
So just by making
bound()
returnlogp
directly (i.e turning it into a noop) I got a nice 66% speed-up on the stochastic vol model.My question is how do we best allow the user to configure this.
One idea is
with pm.Model(disable_bounds_check=True)
.The text was updated successfully, but these errors were encountered: