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
Tidy up DistributionSlicingTest a little, to prevent spurious failures.
The difficulty is that the test asks to compute log_prob(sample) with
validations on, and expects the results to be the same across sliced
and non-sliced distributions.
This CL removes two sources of error:
- The non-sliced distribution, if a TransformedDistribution, will
presumably trigger the bijector cache, whereas the sliced one will
not. So we force-break the cache to push them into the same code
path.
- Defer even trying to compute the sliced log_prob until after the
Eigen packetization consistency check, because packetization
differences could lead to the sliced log_prob failing validation
even though the non-sliced version passed.
PiperOrigin-RevId: 387830762
0 commit comments