A simple and readable implementation of a 1-dimensional planar flow:
z_K = z_0 + u * h(wz_0 + b)
Arguments
- u
Scalar parameter controlling the magnitude of the deformation.
- w
Scalar parameter controlling the slope of the activation.
- b
Scalar bias term.
Value
A flow model object with methods:
sampleq(n)
logq(z0)
applyflow(z0)
Details
where:
This flow is mainly useful for pedagogical purposes or as a lightweight
building block in variational inference.