Skip to content

Fix: TensorTanhNormal and TensorIndependent

Choose a tag to compare

@mctigger mctigger released this 23 Jul 17:07
· 212 commits to main since this release
e1cec97

Key Fixes and Improvements

  • TensorIndependent Shape Bug: A bug where reinterpreted_batch_ndims=0 resulted in an incorrect shape has been fixed. The shape calculation now correctly returns the full shape of the base distribution in this case.
  • TensorTanhNormal Simplification: The reinterpreted_batch_ndims parameter has been removed from TensorTanhNormal to enforce a clearer separation of concerns. To achieve this functionality, users should now wrap TensorTanhNormal with TensorIndependent. The class also now includes new statistical properties like mean, variance, and standard deviation.
  • SamplingDistribution Enhancements: This class has been rewritten for better performance and reliability. It now uses __slots__ for memory efficiency, includes better caching for statistical properties, improves error handling, and adds input validation.

Impact and Migration

This update introduces a breaking change: the reinterpreted_batch_ndims parameter is no longer available in TensorTanhNormal.