This aims to shift the design of the package closer to the recommendations here. In doing so, we introduce some breaking changes.
Here is a list of breaking changes:
Distribution and Bijection have been renamed to AbstractDistribution and AbstractBijection respectively. Typehints for distributions and bijections should update to use these.
Custom untransformed distributions should now subtype AbstractStandardDistribution, and explicitly list the shape and cond_shape attributes.
Custom transformed distributions should subtype AbstractTransformed. The shape and cond_shape attributes of AbstractTransformed are now defined as properties on the class (inferred from the base_dist and bijection), so they no longer need to be defined.
Custom bijection implementations must subtype AbstractBijection and explicitly list the shape and cond_shape attributes.
Batch bijection has been removed for now in favour of Vmap.
TanhLinearTails has been renamed to LeakyTanh.
RationalQuadraticSpline no longer has a shape argument, and instead has the default shape of (), and batch dimensions should be constructed using Vmap.
Flows no longer contain the string attribute permute_strategy.
This aims to shift the design of the package closer to the recommendations here. In doing so, we introduce some breaking changes.
Here is a list of breaking changes:
Distribution
andBijection
have been renamed toAbstractDistribution
andAbstractBijection
respectively. Typehints for distributions and bijections should update to use these.AbstractStandardDistribution
, and explicitly list theshape
andcond_shape
attributes.AbstractTransformed
. Theshape
andcond_shape
attributes ofAbstractTransformed
are now defined as properties on the class (inferred from thebase_dist
andbijection
), so they no longer need to be defined.AbstractBijection
and explicitly list theshape
andcond_shape
attributes.Batch
bijection has been removed for now in favour ofVmap
.TanhLinearTails
has been renamed toLeakyTanh
.RationalQuadraticSpline
no longer has ashape
argument, and instead has the default shape of()
, and batch dimensions should be constructed usingVmap
.permute_strategy
.